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.

TMS320F28075: CAN communication failure

Part Number: TMS320F28075


Hi Team,

Recently, I used CAN to realize the communication between two DSPs (one host and one target. The host sent data to the target every 1s. After receiving the data, the slave would enter the CAN interrupt to read the data and return a piece of data to the host. After the host received the data, it would also enter the corresponding interrupt to receive the data.

However, in the actual test I ran into the following two problems.

1. There was an issue regarding the frequency of sending data. In the program, the data sending command of TI was called every 1s to control the host to send data to the target. In this way, the frequency of sending data should be very low. However, I could see through the oscilloscope that during the interval of 1s, high-frequency data transmission signals could still be read on the bus. Does this mean that data had been automatically sent after a piece of data was sent?

2. At the beginning, the data sent from the host to the target could be received correctly by the target in the interrupt. However, after several tests, I found that the target no longer entered the interrupt of reading data and would not return data to the host. However, the host was still sending data and could read the data sent by the target. On the oscilloscope I observed the CAN transmission line signal and simultaneously read the MSGID sent from the host to the target and the MSGID sent back from the target to the host. But through the flag, I could see that the target had not entered the CAN and was interrupted, so it would not send data to the host. What could be the reason for this situation?

3. In the CAN control register, there was an automatic retransmission configuration bit Disable Automatic Retransmission that was enabled by default. Is it because the target keeps trying to resend data? In this case, although it didn't enter the CAN interrupt of the target to send data, did the target use this Automatic Retransmission to realize the repeated sending of data?

Kind regards,

Katherine

    1. If the host is transmitting a frame every 1s, you should only see that. It is hard for me to say what those "high-frequency data transmission signals" are, without looking at the waveform. Please capture those signals and attach it to the thread. The waveform should look clean like the ones you see in www.ti.com/lit/SPRACQ3. For general debug tips, refer to www.ti.com/lit/SPRACE5
    2. The fact that the communication was working fine initially tells me that there are no hardware issues. If you have a CAN bus analyzer, you will get better visibility to the bus activity than with an oscilloscope. I am unable to tell you why the interrupt routine in the target is not executed, especially when the host continues to send the correct data. You need to connect CCS debugger to the target and analyze. 
    3. Automatic retransmission is applicable in case of lost arbitration. If there are only two nodes in the network and the target only responds after receiving a frame from the host, there is no possibility of loss of arbitration.