How to wakeup from LPU_STOP mode with FlexCAN? We used Freescale AUTOSAR OS.
I modify NXP website's project as the hello_pll_interrupt of AN4830. The example can to receive CAN message in the Run mode.
The message format:
payload 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x41
It can't to receive the same message in the STOP mode with the Pretended Networking mode via FlexCan0.
How modify my program to wake up system to the RUN mode
Pretended Networking mode adds specific wake up functionality in low power mode (Stop mode). When Pretended Network mode (PN) is enabled by asserting the PNET_EN bit in the Module Configuration Register (CAN_MCR)), FlexCAN continues processing Rx CAN messages under low power mode, able to detect specific wake up messages by filtering them against ID and payload target values using a pre-selected matching criteria. Wake up functionality is not available for messages in CAN FD format. While in Pretended Networking mode, CAN FD format messages are ignored.
When your CAN recive wake up message it trigger interrupt
In the Self Wake mechanism, if the SLFWAK bit in CAN_MCR Register was set at the time FlexCAN entered Stop mode, then upon detection of a recessive to dominant transition on the CAN bus, FlexCAN sets the WAKINT bit in the CAN_ESR Register and, if enabled by the WAKMSK bit in CAN_MCR, generates a Wake Up interrupt to the CPU. Upon receiving the interrupt, the CPU should resume the clocks and remove the Stop mode request.
Retrieving data ...