Hi everybody,
I am using the Motor Control Toolbox for the mpc5643L. In my CAN Network are 2 TRK-USB-MPC5643L and the PCAN-USB Interface. Sending my message with the ID 001h works perfectly fine.
In the Background the RTR-Frame with the ID 1FFFFFFFh is running cyclical with 0.7. The cyclical appearence of this RTR-Frame appears only when I use more than one TRK-USB-MPC5643L in my CAN-Network.
How can I suppress the sending of this frame?
What is the usage of this Frame?
Thank you very much for any advise or Help
Julian
Hello,
I am facing the same problem. Did you finally find the solution?
Best regards
Hi Julian,
Can you tell us more about your application configuration when using 2 or more devices like:
- both devices are sending messages at regular intervals or just when you press some buttons ?
- is there any chance that both devices to try to transmit the msg in the same time ?
- are you using different IDs for the messages ?
- can you link this 0.7 cycle time with any ISR from your applications ?
Best regards,
Daniel
Hi Julian,
The RTR is defined in the Chip reference manual http://www.nxp.com/assets/documents/data/en/reference-manuals/MPC5643LRM.pdf
The basic idea behind the Remote Frame is that the Destination Node can send/trigger this remote frame based on its received buffer message to cause the Source Node to automatically transmit its message.
This is helpful for reducing the CPU time to process the CAN messages, allowing the CAN controller to store pre-formatted msg in one of its mailbox and sent out it immediately on Remote Frame request.
I do not have hardware similar with yours - but i would start to investigate from the Simulink generated code for each of the sending and receiving models.
Couple of hints:
- For the transmitter check the flexcan_564xl_buffer_transmit(). As far as i can see the RTR is set to 0 (CAN_0.BUF[BufferNo].CS.B.RTR = 0;)
- Check if anywhere in the generated code the RTR is set to 1.
"Remote frame is a special kind of frame. The user can program an MB to be a Request Remote Frame by
writing the MB as Transmit with the RTR bit set to ‘1’. After the Remote Request frame is transmitted
successfully, the MB becomes a Receive Message Buffer, with the same ID as before."
- I would also try a live debug session to attach with a debugging tool like CW for MCU 10.7 in order to check what are the values of the CAN and Message Buffers during runtime.
One more thing - are you using a terminal 120ohm resistor for your CAN network ?
Best regards,
Daniel