Hello,
I'm using the TMS320F28379D microcontroller and I'm trying to use the TxOk bit in the CAN_ES register in my interrupt routine to determine whether CAN is communicating successfully.
As expected, the TxOk bit remains low before I plug in the CAN communication cable. Then, the TxOk bit goes high when I plug in the CAN communication cable. However, when I disconnect the CAN communication cable, the TxOk remains high forever, rather than going low.
Why is this happening? Based on the technical reference manual, it says
Transmission status Bit: This bit indicates the status of transmission.
The bit will be reset after the CPU reads the register.
0 No message has been successfully transmitted since the last time
when this bit was read by the CPU. This bit is never reset by CAN
internal events.
1 A message has been successfully transmitted (error free and
acknowledged by at least one other node) since the last time when
this bit was cleared by a read access of the CPU.
Based on this, I would expect the bit to go back low after I unplug the CAN communication cable since obviously no message could have been successfully transmitted and acknowledged since my last read attempt of this register in the previous call of the interrupt routine.
Thanks,
Kevin