Referring to the sample code provided by the official, CAN configure PE clock source to; PE clock source is 8MHz; it cannot be awakened in Jlink mode.PE clock source is configured as Peripheral clock, and the PE clock is 48MHz. It can be normally awakened during JLink debugging. However, after taking down JLink to run the connection can and sending a message to MCU to STOP2 mode, it cannot be awakened by sending another message.Please help me, thank you!
Hello Zheng,
For the CAN module to be able to wake up the MCU, it needs to be in Pretended Network mode, for more information about the PNET mode please check the section 55.5.5 Receive process under Pretended Networking mode.
Also, if you are using any STOP mode I will not suggest using to connect an external debugger, if you are using the debugger is possible that the Low Power Mode is not called.
Best Regards,
Alexis Andalon