Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable
Hello,

i have created a project for the XMC4500 Relax Kit with 4 uarts an 4 TCP Ports. The software should simply transfer data incomming from one uart to one tcp port. For testing purposes i have connected a simulation device to 2 of the uart ports which generates the data packets. Each packet is 16 bytes long with a sample rate of 4kHz. The software on the XMC 4500 runs for a short period of time (between 30 minutes to 2 Hours) an than simply hangs. The debugger shows no problem when the software crashes, but i can see when it hangs, because i have a additional LED blinking within the software. If it hangs, i pause the debugger, but all i can see is "BusFault_Handler". Is there any chance to know what happend?

best regards
Sven
0 Likes
1 Reply
User6412
Level 4
Level 4
This is one of the few CPU exceptions. You can react on such exceptions by the software handler. Just define this exception handler in your code like this:


void BusFault_Handler(void) {
// Reinitilizing communication
.....
}


You have to erase the exception flag, and your code will continue to run.
There are some more possible CPU exceptions:
NMI_Handler
HardFault_Handler
MemManage_Handler
UsageFault_Handler (this one for example caused by integer division by zero)
0 Likes