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.

CCS/LAUNCHXL-F28379D: can_ex3_external_transmit.c example doesn't work

Part Number: LAUNCHXL-F28379D


Tool/software: Code Composer Studio

Hi, im currently experiencing some problem while working on the can_ex3_external_transmit.c example provided by texas instruments.

I will try to describe the situation as detailed as possible. The F28379D launchboard is connected via usb to my pc. I import the project can_ex3_external_transmit in my workspace of Code Composer Studio v9.2.0.00013 and then build CPU1_RAM. No errors or warnings, of course.

Then i try to debug, and in the expression tab i watch the variables rxMsgData, txMsgData, rxMsgCount and errorFlag. Here's what happens if i try to run the application by clicking Resume: The txMsgData is set to [18,52,86,120] (as it should be, according to lines 219-222 of can_ex3_external_transmit.c).

Then the errorFlag is set to 1 (since the rxMsgData remains [0,0,0,0], no message is received) Then it appears that the program goes two times through the lines 267-270, because now the txMsgData is [20,54,88,122], and finally the application stops at line 240.

I tried to contact the TI support and follow their instruction with no results.

I tried to modify the example by using the CANB instead of CANA, and changing the DEVICE_GPIO_CFGRXB to GPIO_17_CANRXB and the DEVICE_GPIO_CFGTXB to GPIO_12_CANRXB.

I also tried to read the sent message using a CAN sniffer (Kvaser BlackBird V2), but no message is detected.
Any suggestion is appreciated

  • Hi,

        This example is designed to work with control card by looping back CAN A and CAN B modules with external wires. 

        For launch pad you can use examples ex4 and ex5, by externally connecting CAN A modules of two boards (one will act as transmitter and other the other as receiver).

    Regards

    Baskaran

  • Have you tried setting the baud rate to 250k on your CAN sniffer (even though the code specifies 500k)?

    do a find in your project for cana and make sure everything is canb 

    also try switching the can_H and can_L probes on your transceiver 

    Why you are looking at rxMsgData since you are only transmitting?

  • This actually solved my issue, thank you very much!
    In the can_ex4_external_transmit.c example i switched from canA to canB, set the DEVICE_GPIO_CFGRXB to GPIO_17_CANRXB and the DEVICE_GPIO_CFGTXB to GPIO_12_CANRXB, and setting the bus speed of my can sniffer to 250kbs, now it works like a charm!