I gave gone through confusion after reading reference manual of S32K. I dont see there is way to put Flexcan0 to sleep mode . I read about STOP mode , Disable mode , Pretending network mode etc . Iam exactly not sure how do i meet my requirement using these features .
My requirement is like this -> In the absence of CAN traffic after certain period, i would like to force the Flexcan0 to sleep mode ( Low Power mode ) and then Transciever to sleep mode . On reception of any message in the bus /specific messages should trigger the CAN wakeup.
Can any one explain what is best way to achieve this in S32K146 microcontroller ?
Hi,
FlexCAN's Pretended Networking mode together with MCU STOP mode can be used to wake up MCU on incoming specific CAN message.
If also transceiver will be put in sleep mode then above will not work for sure as on first message transceiver will be woken up and message does not pass to FlexCAN to be recognized as dedicated wakeup message.
Some examples to show PN mode and wakeup MCU from STOP mode are posted at
https://community.nxp.com/t5/S32K-Knowledge-Base/Example-S32K144-FlexCAN-Pretended-Networking-STOP-m...
https://community.nxp.com/t5/S32K-Knowledge-Base/Example-S32K116-FlexCAN-PN-STOP-S32DS-ARM-2-2/ta-p/...
BR, Petr
If i understand correctly, stop mode will put the entire controller to sleep ? I want to put CAN controller to sleep, not the micro controller . Is there any other method ?
How about following step ?
when there is no bus activity
1. Disable CAN clock
2. Put transiever to standby mode
3. Configure Rx pin as input pin to generate interrupt on message wakeup
The above will complete the sleep cycle
On wakeup , in the interrupt routine enable the clock to CAN
Thanks
GB