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.

TMS320F280021: CAN COMMUNICATION - C2000 COMPILER WITH CODE COMPOSER STUDIO

Part Number: TMS320F280021
Other Parts Discussed in Thread: C2000WARE, SYSCONFIG

I AM WORKING WITH THE TMS320F280021 MICROCONTROLLER. WHEN COMING WITH CAN COMMUNICATION I USED THE SAMPLE CODE GIVEN IN THE TI C2000 WARE.

THE CODE I TRIED IS "can_ex1_loopback.c", IN THE C2000 WARE. 

THE CONFIGURATION CHANGES I MADE ARE 

1. THE COMMUNICATION CHANNEL FOR Tx IS GPIO2 

2. THE COMMUNICATION CHANNEL FOR Rx IS GPIO3

THE CODE MODIFICATION I MADE ARE GIVEN BELOW.

1.

#define DEVICE_GPIO_PIN_CANTXA 2U // GPIO number for CANTXA
#define DEVICE_GPIO_PIN_CANRXA 3U // GPIO number for CANRXA
#define DEVICE_GPIO_CFG_CANRXA GPIO_3_CANA_RX // "pinConfig" for CANA RX GPIO_3_CANA_RX
#define DEVICE_GPIO_CFG_CANTXA GPIO_2_CANA_TX // "pinConfig" for CANA TX GPIO_2_CANA_TX

2. THE MICROCONTROLLER PIN AND CAN TRANSMITTER IS ISOLATED BY REMOVING THE CONNECTION BETWEEN THEM.

AFTER DEBUGGING THE CODE COMPOSER STUDIO DOESN'T GIVE ANY ERROR. BUT THE PIN USED DOESNT GIVE ANY DATA TRANSMISSION. THE PIN IS ACTIVE HIGH ALWAYS (+3.3V) EVEN IF THE CODE ITSELF IS IN CONTINUOUSLY RUNNING.

THE SYNTAX USED FOR THE TRANSMITTING DATA IS GIVEN BELOW.

"CAN_sendMessage(CANA_BASE, TX_MSG_OBJ_ID, MSG_DATA_LENGTH,txMsgData);"

DURING THE DEBUGGING I MADE SOME BREAK POINTS OVER THE CODE. THE RESULTS SHOW THAT THE ISR (INTERRUPT SERVICE ROUTINE ) IS NOT EXECUTING AFTER ONE COMPLETE CYCLE,

THE CODE I AM USED CAN BE FOUND FROM THE TI C2000 WARE ITSELF.  

PLEASE GO THROUGH IT.

THE CODE