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.

TMS320F280049: CCP not working

Part Number: TMS320F280049

Hi,

Maybe this is due to my lack of knowledge of how to make this work but I've been trying to implement CCP on my TMS320F280049 and I'm failing miserably.

I have added the "CAN Calibration Protocol" block for C28x with the CCPconfig options.

 

My code builds fine and then the tool I have (at the moment) to test this is Pi Snoop (from Pi Innovo) which is a trial but I already informed myself with them and it should still allow me to monitor signals.

I can establish comms and see the DTO which is being sent by the chip "0x6FB" (the CCP IDs are greyed out in this software but it's just for displaying purposes, this is cyclically updating):

In my model I've defined the signals as canlib.Signal with storage class Daq_List_Signal_Processing and the parameters as tic2000demospkg.Parameter  with storage class const_data_ramfuncs just as the example available "c28x_ccp_ert" but I'm using sldd data.

I can see the command on 0x6FA flickering between CONNECT (0x01), SHORT_UP (0x0F) and GET_S_STATUS(0x0D) but 0x6FB always replies "acknowledge / no error" (0xFF) with no error code (byte 1) and a (matching 0x6FA) rolling counter on byte 2.

My A2L has all the addresses defined correctly and the tool sees the correct addresses but can't somehow get an answer from the chip. I'm not sure if it's the tool or if I'm doing something wrong but I also cannot do CCP comms with the example code "c28x_ccp_ert", the behaviour is exactly the same.

I'm using eCAN A and tried both 500kbps and 1MBps just for the sake of it and neither worked, the behaviour is identical. 

Here's my A2L in case you want to have a look:

https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/171/CcuBrd_5F00_f28004x_5F00_ert.7z

Many thanks for your time, I hope you can give some suggestions.

  • Hi Celso,

    In the GUI for C28x CCP config options, where there is a pulldown menu for CAN module,  what are the choices available?  I see that you have chosen eCAN_A.  In C28x family, there are two types of CAN 2.0 modules - eCAN and DCAN.  Both module types support CAN protocol however there are register implementation differences between the two modules.  The C28x part that you are using (F28004x) has DCAN.  Can you try changing that option?

    Regards,

    Joseph 

  • Celso,

                    We will be happy to help you with any issues pertaining to the CAN module on F280049. However, we may not be able to help you with issues related to CCP. You may want to post your issue on other forums pertaining to CCP. I presume CCP is a product from Mathworks. If so, please post your issue on Mathworks' forum. 

    Are you able to transmit/receive from the DCAN? Please try this without involving CCP etc. Just simple transmit and receive of raw data from/to the DCAN. Please download my Application report http://www.ti.com/lit/sprace5 . It has many tested examples. I also urge you to look at the Debug tips provided.

  • Hi,

    Thank you for your attempt, I don't have the DCAN option on that pull down.

    In the meanwhile I have managed to make it work and it was a tool problem, I can use it with CANape which was the only one validated by mathworks:

    uk.mathworks.com/.../c28xcancalibrationprotocol.html

    Just as an FYI I'm using now canlib.Signal and canlib.Parameter, both with ExternalGlobal storage class and this works fine.

    Slightly different from this example which uses custom storage classes but the standard ExternalGlobal works just fine.

    https://uk.mathworks.com/help/supportpkg/texasinstrumentsc2000/ug/can-calibration-protocol-and-external-mode.html

    I can't use DAQ lists so I'm polling all the data but honestly I don't mind and don't understand enough about those DAQ lists just yet.

    since I've done some trying around with classes here are my results just for everyone's info:

    Class

    Storage Class

    Visible/editable via CCP

    canlib.Signal

    Daq_List_Signal_Processing

    yes

    tic2000demospkg.Parameter

    const_data_ramfuncs

    No

    Simulink.Signal

    ExportedGlobal

    Yes

    canlib.Signal

    ExportedGlobal

    Yes

    tic2000demospkg.Parameter

    ExportedGlobal

    Yes

    tic2000demospkg.Parameter

    Auto

    Ignored in A2L

    canlib.Parameter

    ExportedGlobal

    Yes

    canlib.Parameter

    Auto

    Ignored in A2L

    I've selected the highlighted ones so that I can just stick to standard storage classes and with canlib class just for tidiness.

    My only issue at the moment (or at least that I can see) is that my enumerations are going crazy, somehow they are moving, while polled via CCP but static via CAN (since I'm outputting it on the CAN bus)

    I can see this is only happening to my SLONG signals:

    /begin MEASUREMENT
    /* Name */ OSM_State_enum
    /* Long identifier */ "Module state machine state"
    /* Data type */ SLONG
    /* Conversion method */ CcuBrd_f28004x_ert_CM_OSM_STATE_ENUM_enum
    /* Resolution (Not used) */ 0
    /* Accuracy (Not used) */ 0
    /* Lower limit */ 5
    /* Upper limit */ 80
    ECU_ADDRESS 0x0000c781
    /end MEASUREMENT

    Any help on this brand new issue is much appreciated.

  • Hi Celso,

    As Hareesh pointed out, can you post this to Mathworks forum to see if they can help?

    Thanks,

    Joseph

  • Celso,

         I regret we will not be able to help you with this. As mentioned in the previous post, we can certainly help you with any issues pertaining to the CAN module on the device. Questions pertaining to any register/bits of the module or the module behavior. But not related to third party tools that use the DCAN module.