hi all,
I need to get all can error in listen mode.
I only can get the BIT0ERR from CAN_ESR1 in listen mode when the other can node transmitting a message without ACK.
Why the ACKERR in CAN_ESR1 is not been set?
best regards,
解決済! 解決策の投稿を見る。
Hi,
yes, the module works this way.
In LOM mode, transmission is disabled, all error counters are frozen, and the module operates in a CAN Error Passive mode. Only messages acknowledged by another CAN node will be received. If FlexCAN detects a message that has not been acknowledged, it will flag a BIT0 error (without changing the REC), as if it was trying to acknowledge the message.
BR, Petr
Hi,
yes, the module works this way.
In LOM mode, transmission is disabled, all error counters are frozen, and the module operates in a CAN Error Passive mode. Only messages acknowledged by another CAN node will be received. If FlexCAN detects a message that has not been acknowledged, it will flag a BIT0 error (without changing the REC), as if it was trying to acknowledge the message.
BR, Petr
hi Petr,
Thanks for help,when I get the BIT0 error in this mode,how can i get the can_id and the can_data?
there is no data in CAN_RXIMRn.
BR,Jun
Hi,
RXIMR is mask register, no data will be stored there, but probably you meant some message buffer.
Only acknowledged message is received, so if you get error, a message is not stored into MB.
BR,Petr
Hi Petr,
Thank you again,do you mean that ID and data cannot be obtained when there is an error(ack or crc error) on the CAN bus?
Is this mcu not supported the functions as shown in the figure below?
BR, Jun
Hi,
you did not specify the MCU, but generally for FlexCAN module, if any CAN protocol error is detected then the MB is not updated with received frame, so you have no indication of ID, data, etc.
BR, Petr
Hi,Petr
The mcu is spc5748GBVKU6, Is the MB the first register to get the data from the CAN bus? Can I read can frame from other registers before MB data is updated。
BR,Jun
Hi,
yes, a message buffer MB is the RAM space where frame's content can be read from, if frame was received without error, otherwise MB is not updated.
BR, Petr