CAN RTR (Remote transmission request) frames: request and response

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

CAN RTR (Remote transmission request) frames: request and response

ソリューションへジャンプ
2,067件の閲覧回数
francisco_rico
Contributor II

Dear NXP support,

Do you have any sample code for CAN RTR messaging, on the receiver side (the one that receives the message and issues the response)?

 

I'd like to know:

1) if the buffer has to be filled every time, after the response is issued.

2) if there is any restriction on filling the buffer (as I've seen in other microcontrollers that a double response could be issued when filling the buffer while the RTR frame is received).

#s32k144

Thank you,

Javier Rico

ラベル(1)
タグ(3)
0 件の賞賛
1 解決策
1,952件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

Hi Francisco,

yes, this could be an option if you do not want to have automatic response.

BR, Petr

元の投稿で解決策を見る

0 件の賞賛
5 返答(返信)
2,048件の閲覧回数
francisco_rico
Contributor II

Thanks Petr, 

It is still not clear to me how the mailbox can be filled without the risk of the CAN RTR message being received in the middle of this process, resulting in sending a response that is incomplete or mixing old and new data in the same message. Any advice?

Regards,

Javier

0 件の賞賛
2,002件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

Hi,

updating the MB with new data should be done when MB is inactive. So if you inactive used MB and it is done before content moving-out into SMB, then no response will be send. If inactivation is done after message is in Tx SMB, then response will be transmitted, but you will not see double response. 

BR, Petr

0 件の賞賛
1,961件の閲覧回数
francisco_rico
Contributor II
Hi Petr,

Main intention is to always send a response. For what you mention, the best course of action would be to assert CTRL2[RRS] to avoid sending an automatic response, and then explicitly send such response.
0 件の賞賛
1,953件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

Hi Francisco,

yes, this could be an option if you do not want to have automatic response.

BR, Petr

0 件の賞賛
2,052件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

Hi,

per my understanding, the FLEXCAN_DRV_ConfigRemoteResponseMb function can be used to prepare MB for remote request response. This need to be called just once, you need not to config MB every time.
No restriction should be there.

BR, Petr

0 件の賞賛