How to get the no ack error in LISTEN_ONLY_MODE

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to get the no ack error in LISTEN_ONLY_MODE

Jump to solution
1,240 Views
arhar001
Contributor I

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,

 

 

0 Kudos
1 Solution
1,230 Views
PetrS
NXP TechSupport
NXP TechSupport

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

View solution in original post

0 Kudos
7 Replies
1,231 Views
PetrS
NXP TechSupport
NXP TechSupport

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

0 Kudos
1,227 Views
arhar001
Contributor I

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

0 Kudos
1,225 Views
PetrS
NXP TechSupport
NXP TechSupport

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

0 Kudos
1,219 Views
arhar001
Contributor I

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?

arhar001_0-1644400853616.png

 

BR, Jun

 

0 Kudos
1,207 Views
PetrS
NXP TechSupport
NXP TechSupport

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

0 Kudos
1,198 Views
arhar001
Contributor I

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

0 Kudos
1,185 Views
PetrS
NXP TechSupport
NXP TechSupport

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

0 Kudos