This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Dear Experts,
my customer is facing an issue when running the "mcan_ex9_transmit" example and try to debug the application using breakpoints or pausing the execution. They are using an external CAN receiver.
After loading the code and running the example, my customer would like to debug the code and enter breakpoints.
He noticed, that after inserting a breakpoint, stopping at the breakpoint and then let the code run again, the CAN communication is not working anymore. So something breaks, when entering CPU debug state.
Is there a way to debug the application without breaking the MCAN communication or without the need to PoR the complete device?
Could you please let me know, if there is a way to reset the MCAN controller/communication only and will this be sufficient to restart proper Tx/Rx of MCAN packets?
Thanks and best regards,
Gregor
Hi Gregor,
There is clock stop that happens during a debug event. It is possible that that is at play here. Is it possible to check the value of MCAN_CCCR register when this condition occurs?
On your question on resetting the MCAN controller, you can reset just the module using the 'SysCtl_resetPeripheral(SYSCTL_PERIPH_RES_MCANA);' function instead of POR the device
Regards,
Praveen
Hi Praveen,
thank you for looking into this. Customer was able to get the MCAN communication going even after entering debug mode by enabling
"initParams.emulationEnable = 0x1U;"
When setting this value to 1, Tx_CAN frames were sent properly also after leaving the debug state and continue with code execution.
No need to reset the CAN controller or the device.
Thanks and best regards,
Gregor