How to get the no ack error in LISTEN_ONLY_MODE

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to get the no ack error in LISTEN_ONLY_MODE

ソリューションへジャンプ
1,679件の閲覧回数
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 件の賞賛
返信
1 解決策
1,669件の閲覧回数
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 件の賞賛
返信
7 返答(返信)
1,670件の閲覧回数
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 件の賞賛
返信
1,666件の閲覧回数
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 件の賞賛
返信
1,664件の閲覧回数
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 件の賞賛
返信
1,658件の閲覧回数
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 件の賞賛
返信
1,646件の閲覧回数
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 件の賞賛
返信
1,637件の閲覧回数
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 件の賞賛
返信
1,624件の閲覧回数
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 件の賞賛
返信