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.

TMS320F28377D: CAN TX is not working . No output from CAN H pin while probing with oscilloscope

Part Number: TMS320F28377D
Other Parts Discussed in Thread: C2000WARE

I used  the CAN simple transmit example code from C2000  . I am  getting  output when I tried the same code in EVALUATION BOARD LAUNCHXL-F29379D

But I have custom board which is TMS320F28377D.  I am not  getting any  output when i tried to probe with Oscilloscope.

This is the transceiver circuit . I am using CAN B transmit .CAN_2_TX and CAN_2_RX are the pins coming from Controller.  

  • I checked the EVALUATION BOARD LAUNCHXL-F29379D output through CAN analyzer. I am getting output

    But I have custom board which is TMS320F28377D  . I am not  getting any  output when i tried to probe with Oscilloscope and CAN analyzer

     

  • 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.

  • Sivaraman,

                You have rejected my response without giving any reason. This is a hardware issue that needs to be debugged on your end. Issues like this cannot be debugged remotely without access to the complete schematics and the H/W itself. This is the reason I created a comprehensive debug checklist in SPRACE5.

  • Still I am not getting any output from CAN TX pin when I tried with can analyzer

  • Please report back on what you observed for each one of the debug tips I have provided.

  • Hey Hareesh Janakiraman!! I also have a similar issue. I am using the can_ex4_simple_transmit code from the examples for the launch-xl F28379D. I am using a Can Debugger from Kvaser CanKing to get the data from the MCU and i am able to get the data on the output window of the Kvaser CanKing software . I also have a F28377D-ep MCU on a custom board and i want to do the same on the custom board too. On the launch-xl board we have GPIO 12 and 17 connected to the j12 header as see below.

    I have GPIO 38 and 39 on my MCU connected to a transceiver as seen below.

    I have changed the GPIO 12 and 17 to GPIO 38 and 39 to test the same code on my custom board, but i am unsuccessful to do so. 

    I can see the data getting populated as seen below.

    Thanks for the debug document that you have provided above. I will report my observation with regards to the document on this thread. 

    Thanks & Regards,

    Denzil Rhodes.

  • Refer to 4.1.1 How to Change the GPIO Assignment for the CAN Pins in SPRACE5. I have clearly explained the steps involved in changing the GPIO pins.

  • Hey Hareesh Janakiraman, 

    I believe i have configured the GPIO Pins correctly according to 4.1.1,

     ---> in main.c

     --->in device.h

     ---> in pin_map.h

    Here is also the pin allocation from the MCU to CANTXB and CANRXB,

    Thanks & Regards,

    Denzil Rhodes.

  • You need to remove the symbol _LAUNCHXL_F28379D from your project (everything under that #ifdef should appear greyed out).

  • Yes I have removed the symbol  _LAUNCHXL_F28379D  from my project.

  • Hello Hareesh , 

    I  have posted the register values  by referring your checklist .

    Debug Checklist

    Programming Issues

    1. Clock is enabled through a bit in the PCLKCR10 register

              2.No EDIS used in my code .

             3. No interrupts used in my code

              4.Mailboxes been enabled

    • RAM_INIT_DONE --> CAN Mailbox RAM initialization status:

    0 Read: Initialization is on-going or initialization not initiated.

    1 Read: Initialization complete

     

    • TxRqst --> Transmission Request Bits (for all message objects)

    0 -  No transmission has been requested for this message object.

    1 - The transmission of this message object is requested and is not

           yet done.

    Note : Bit 0 is for mailbox 1, Bit 1 is for mailbox 2, Bit 2 is for mailbox , ……..

               Bit 31 is for mailbox 32

    • TxRqstReg1 --> Transmit Request Register 1 flag:

    Bit 0 - represents byte 0 of CAN_TXRQ_21 Register. If one or more                                              

               bits in that byte are set, then bit 0 will be set.

    Bit 1 -  represents byte 1 of CAN_TXRQ_21 Register. If one or more

               bits in that byte are set, then bit 1 will be set.

     

     

    • MsgValReg1 - Message Valid Register 1 flag:

    Bit 0 - represents byte 0 of CAN_ MVAL _21 Register. If one or more

              bits in that byte are set, then bit 0 will be set.

    Bit 1 - represents byte 1 of CAN_ MVAL _21 Register. If one or more

             bits in that byte are set, then bit 1 will be set.

    --------------------------------------------------------------------------------------------------------

    So these are the values I noticed in the CAN B registers .

    Is there any registers , I missed to Enable ?

  • Hey Hareesh, I have same results on my end too. 

    Thanks & Regards,

    Denzil Rhodes.

  • The c2000ware example is a tested example and you have verified that on the LP yourself. There are only 3 things I can think of when you move to your H/W: (i) i/p clock on your H/W (2) GPIO mapping (3) CANA Vs CANB mapping - Make sure your code is operating on CANB, not CANA. The c2000ware example is for CANA. You need to change all instances of CANA to CANB in your code. 

    I am afraid I cannot help beyond this.

  • Hey Hareesh!! I have swapped CAN A to CAN B in my code. Thanks for your time. The document helped alot.

    Thanks & Regards,

    Denzil Rhodes.

  • Denzil,

        Glad I was able to help.