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.
Hi,
we have configured CAN-A for TMS320F28002x microcontroller (i.e GPIO4 as Tx and GPIO5 as Rx).We have tested the working of CAN by loopback example from C2000 SDK, it is working properly for standard can message format. But we have customized message packet for our application(i.e CAN_ID(2 Bytes )followed by data(8 Bytes) , when we are trying to send customized packets it is entering to ISR due to raising error status . we even tried to change the settings of registers and API in CAN drivers according to our format ,but still we facing same issue.
Below are the my can registers values after one transaction and datasheet we are following.
CAN_CTL 0x0000000B 0x0001140E
CAN_ES 0x0000000B 0x00000062
CAN_ERRC 0x0000000B 0x0000FF00
CAN_BTR 0x0000000B 0x00007AC9
CAN_INT 0x0000000B 0x00008000
CAN_TEST 0x0000000B 0x00000000
CAN_PERR 0x0000000B 0x00000020
CAN_RAM_INIT 0x0000000B 0x00000025
CAN_GLB_INT_EN 0x0000000B 0x00000001
CAN_GLB_INT_FLG 0x0000000B 0x00000001
CAN_GLB_INT_CLR 0x0000000B 0x00000000
CAN_ABOTR 0x0000000B 0x00000000
CAN_TXRQ_X 0x0000000B 0x00000000
CAN_TXRQ_21 0x0000000B 0x00000000
CAN_NDAT_X 0x0000000B 0x00000000
CAN_NDAT_21 0x0000000B 0x00000000
CAN_IPEN_X 0x0000000B 0x00000000
CAN_IPEN_21 0x0000000B 0x00000000
CAN_MVAL_X 0x0000000B 0x00000001
CAN_MVAL_21 0x0000000B 0x00000001
CAN_IP_MUX21 0x0000000B 0x00000000
CAN_IF1CMD 0x0000000B 0x00F00001
CAN_IF1MSK 0x0000000B 0x20000000
CAN_IF1ARB 0x0000000B 0xC0000101
CAN_IF1MCTL 0x0000000B 0x00000480
CAN_IF1DATA 0x0000000B 0x00000000
CAN_IF1DATB 0x0000000B 0x00000000
CAN_IF2CMD 0x0000000B 0x00000001
CAN_IF2MSK 0x0000000B 0xFFFFFFFF
CAN_IF2ARB 0x0000000B 0x00000000
CAN_IF2MCTL 0x0000000B 0x00000000
CAN_IF2DATA 0x0000000B 0x00000000
CAN_IF2DATB 0x0000000B 0x00000000
CAN_IF3OBS 0x0000000B 0x00000000
CAN_IF3MSK 0x0000000B 0xFFFFFFFF
CAN_IF3ARB 0x0000000B 0x00000000
CAN_IF3MCTL 0x0000000B 0x00000000
CAN_IF3DATA 0x0000000B 0x00000000
CAN_IF3DATB 0x0000000B 0x00000000
CAN_IF3UPD 0x0000000B 0x00000000
Can you please let us know what has to be done for sending and receiving our can customized messages.
Regards,
Revathi
Revathi,
Please download my Application report http://www.ti.com/lit/SPRACE5 and look at the Debug tips provided. Most CAN issues can be resolved by going through this checklist. I have created a video to help with the first communication project using DCAN: https://training.ti.com/getting-started-dcan-module. Please take a look.
The TRM chapter explains the CAN protocol implementation in the MCU. i.e. it explains the functions of the various registers/bits. However, it does not explain the protocol itself. For protocol information, refer to these excellent videos: