Hi,
I am using LPC4357 controller and Keil mdk 5.36 software. When I am in debug mode, and everything is working fine. if I stops code using breakpoint for some seconds and then allowing code to run without any break point then I am not able to receive CAN data but before stopping code CAN receive and transmitting is working fine. But I am able to send data after resuming the code. I checked through a CAN analyzer the data is available in the bus but I am not able to read. when I reset controller then again I am able to read data. what can be issue?
here CAN error register data just after CAN communication stopped.
Hi @Jaga123
I think there are three more possibilities
1. CAN Controller Buffer Overrun:
While the code is paused, the CAN peripheral continues to receive messages. If these messages are not handled (processed and cleared), the receive buffer may overflow, causing the CAN controller to stop receiving new messages.
2. Interrupt Handling:
When the debug mode is paused, pending CAN interrupts may not be serviced. Upon resuming, the CAN controller may remain in a state waiting for interrupt flags to be cleared.
3. Debug Behavior Settings:
The debugger may disable peripheral clocks or interrupt handling during a pause, preventing the CAN peripheral from functioning correctly.
BR
Harry