Hi Pon,
I don't see your project, from my understanding, your program can't well run in standalone mode(without connecting debugger), Correct? I can provide you some tips FYI.
1. verify if your code is successfully downloaded to flash. to test it, toggle a led in your code, in standalone running mode, can you see the led blinking?
2. if step 1 is passed test successfully, please verify if the problem is only in CAN module? can you also check other CLOCK involved modules function normal? Some peripheral relies on accurate clock setting. when use debugger download code, clock is trimmed by debug tool automatically. While in standalone mode, clock is not trimmed. If the problem is because of the inaccurate clock, please trim clock manually in code.
Have a great day,
Jennie Zhang
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------