This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS570LC4357: How to disable CAN auto-answer on RTR message / request

Expert 2025 points
Part Number: TMS570LC4357
Other Parts Discussed in Thread: HALCOGEN

I've configured this message box for RTR, and it gets invoked when RTR request arrives. See pic below:

But, I have unwanted behavior , fact that the CAN controller seems automatically fires replies with whatever it had last loaded into this message box. 

So, for example, if I hold the CPU halted with debugger, and send RTR frame from PC host, I get reply from the devboard, even though the code is not running, so the CAN controller seems handling this request automatically.
Which I do not want at all, I need to reply to this request from the code.

And because I also have my own send response, now I get effectively two responses from the card: one which it always fires automatically, followed by my the reply as from code.  

My CAN trace would look like this:  

 I read for other TI chip (here : https://www.ti.com/lit/ug/sprueu0/sprueu0.pdf?ts=1598526170937&ref_url=https%253A%252F%252Fwww.google.com%252F)  allows to disable this "Auto-Answer" mailbox/object feature, but I do not see how / where to do this with TMS570.

Is it possible to remove this automatic handling?  To pre-load values in advance into that box is not a good thing for me.

  • If the RmtEn bit is set, a matching received Remote Frame will cause the TxRqst bit to be set; the Remote Frame will autonomously be answered by a Data Frame. This is the feature.

  • QJ Wang,

    Yes, I have read that in the manual. So what that means, it is not possible to turn off "autonomously" answering?

    How does one need to set it up then :  If I have set it to RX direction && enable RTR, then I do not get the host's RTR message at all - I do not get the frame in. (without RTR I receive the frames).

    And if I'm forced to use that "autonomous" feature, how to pre-fill that buffer for auto-answer? I'm sketchy / if at all know how/where to do this...

    UPDATE: I see you can fill message object data (HalCoGen -> canFillMessageObjectData);   but still un-sure the proper way to pre-fill this specific box the very first time then, before first Tx request which comes already after the frame was sent out by the controller. 

  • Also, QJ Wang,

    With this "autonomously" answering,  is it possible to map more than one CAN id then to same message box, how? 
    If I have say 10 ids mapped to same box,  which value will it send automatically back on RTR request?  ... I see only single hardware buffer , and TxRqst seems set after the frame was already sent out, so ..

    Is it possible to have more than 1 id per message box with RTR feature?

  • No, each message object has only one unique message ID at a time. You can update the ID if you want. 

    You can get message with different message IDs by changing MASK to ignore some bits. 

    Writing 0 to a bit of MASK[28:0], the corresponding bit in the message identifier is not used for acceptance filtering (don't care).