Part Number: TMS320F280039C
Other Parts Discussed in Thread: C2000WARE
Hi folks.
I am trying out some application using the CAN remote / response mechanism.
I first ran the example code from the C2000Ware, the can_exp7_loopback_tx_rx_remote_frame.c, and it operates as expected with no issue, showing that the received data is exactly the pre-set value in the IF1DATA & IF1DATB registers send buffer.


And then in my application, I have a local variable that is changing, and every a while an external device will send a remote frame to request it. I am expecting on the launchpad it should prepare the instant value of the variable in the register, so to be responded upon remote request. So I made some modification to the can_exp7_loopback_tx_rx_remote_frame.c like

basically, the code is just same as the chunck in can_exp7_loopback_tx_rx_remote_frame.c, but moved into a while loop, since I hope to refresh the variable's value every a while (and get ready to new request). Also, I changed the message_obj_id to 5, different with the example in can_exp7_loopback_tx_rx_remote_frame.c in which is 2. I assume the HWREG_BP(CANA_BASE + CAN_O_IF1CMD) = 0x00830005UL; in my code is doing the right thing.
I tried with this script, and ensure that hardware connection is all fine. But I noticed that I can only receive the reponse from the other end for only once, (the value it got is correct. but after that, the new remote requests got no response.) which is not what I expect.
What did I miss here? Thanks for your advice.
Regards,
Wei