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