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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

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

跳至解决方案
3,530 次查看
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 解答
3,415 次查看
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 回复数
3,511 次查看
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 项奖励
回复
3,465 次查看
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 项奖励
回复
3,424 次查看
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 项奖励
回复
3,416 次查看
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 项奖励
回复
3,515 次查看
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 项奖励
回复