Hello, big guys, I have a problem about the Sleep wake up of MM9ZJ638, which is mainly related to the Sleep of can module. I found through the manual that CAN Sleep module CAN automatically enter the sleep mode after writing SLPRQ bit of CANCTL0 and waiting for CAN module to check the completion of sending and receiving. The SLPAK bit of CANCTL1 CAN be confirmed by reading the SLPAK bit of CANCTL1. In the test, I found that when my control board was in Busoff state, after setting the SLPRQ bit of CANCTL0, the SLPAK bit of CANCTL1 of CAN module was always in 0 state and was not updated to sleep state. What register configuration should I check to ensure that I CAN sleep in Busoff state? Please help me, thank you!
Hi,
The MM9Z1_638 features three main operation modes: Normal operation, Stop mode, and Sleep mode.
Sleep mode of CAN is different from sleep mode of the MCU.
a device's DS mentions the MSCAN enters Sleep mode, when requested, after all scheduled TX MBs are empty.
You wrote you are in Bus Off state, which occurs during message transmission if error is detected. Thus the MCU does not set MB flag as message was not transmitted successfully. Most probably this prevents the module to acknowledge Sleep mode request. I can recommend to check TXEx flags in CANTFLG, if any is cleared, try to Abort message using respective bit in CANTAAK before Sleep request.
Best regards,
Ladislav