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.

TMS320F28379D: TMS320F28379D: DCAN IF3 not working properly

Part Number: TMS320F28379D


Hello,

I am trying to use the IF3 registers to retrieve the data bytes form newly received messages. The code polls the IF3Upd bit in the CAN_IF3OBS register to see if the IF3 data registers have been updated with a new message. I’ve set the IF3 Update Enable register for message object 1 and not set any of the observation flags in the CAN_IF3OBS register so that no DMA is needed. Here is the code snippet related to the issue:

CanbRegs.CAN_IF3OBS.all = 0;

CanbRegs.CAN_IF3UPD = 1;

while (!CanbRegs.CAN_IF3OBS.bit.IF3Upd){;}

tmp1 = CanbRegs.CAN_IF3DATA.all;

tmp2 = CanbRegs.CAN_IF3DATB.all;

With CCS 6.2 I can see that each time I send a message to mailbox 1, the IF3 data registers do get updated correctly but the IF3Upd bit never gets set (always 0). So the polling never works and the code gets stuck there. Is this a right way to use IF3? Other than this issue, the CAN works fine. It can send and receive messages and the received message can be retrieved using IF2 registers and polling CAN_NDAT_21.

 Thank you,

 Su