Hi I encountered a CAN-related problem when applying S9S12G192F0VLFR and need help.
Question:
CANOE periodically sends messages with DLC=0, MSCAN enters the error passive state, CANRFLG register Bit0 (RXF) is never set to 1, and the message cannot be received normally. The current value of the register is as follows CANRFLG=0x20, CANCTL0=0x54, CANRXERR=0x81, CANTXERR=0x0.
How to optimize the software to receive messages normally.
thanks
Hi,
Anything can be wrong. I suggest you to investigate the communication in a loopback mode. Then it is worth to check CAN bitrate setup and clock by means of scope.
I have attached simple example and you can also look at similar examples for different MCU but the peripheral is the same. S12G is the simplest successor of the master device S12XEP100.
CAN setup can be calculated by attached excel file.
However, the first is loopback mode to be sure you are able to see communication.
Best regards,
Ladislav