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/TMS320F280025C: CAN_IF register are zero when run the example code

Part Number: TMS320F280025C
Other Parts Discussed in Thread: C2000WARE

Tool/software: Code Composer Studio

Hi Team,

I download the CAN example can_ex2_loopback_interrupts from C2000Ware_3_02_00_00 to F28002x control card by CCS10.1, and run the code, see the CAN_IF registers are all zero as below, which should be initialization in the code, what is the problem?

  • Hi Strong,

    If you single step over the Device_Init() call, do you see some of the register values update?

    Thanks

    ki

  • Hi,

    Although I don't see all registers as zero, I see it seems that something is not right with the way the register view is reading the values. 

    If you right-click on a register and select View Memory at Address, you should have a direct memory access of the registers. 

    You can also see the registers by issuing a direct access from the Expressions view. 

    Examples are shown in the screenshot below, where the device ran past the line CAN_initModule(CANA_BASE);

    I will have to do some additional investigation. 

    Regards,

    Rafael

  • Hi,

    I found that the file that specifies the CAN registers for the F28002x family of devices is incorrect. Specifically for this register bank, the same file for the F28004x family of devices is correct. 

    If you want to workaround only for this register bank (I am unaware of other register banks with problems), you can try to do the following;

    - Close CCS
    - Browse to the directory C:\ti\ccs1010\ccs\ccs_base\common\targetdb\Modules\C2000
    - Locate the file f28002x_can_regs.xml and create a backup copy
    - Locate the file f28004x_can_regs.xml and copy as f28002x_can_regs.xml
    - Clear the CCS temporary files: browse to %LOCALAPPDATA%\Texas Instruments\CCS and empty the subdirectory ti or ccs1010 (it will be automatically re-created)
    - Start CCS

    With this, you should have the CAN registers mapped to the correct offsets for the F280025 device. 

    Please keep in mind this is a workaround and a definitive fix will be available in a future version of CCS. Try at your own risk.

    A bug report will be filed. 

    I apologize for the inconvenience, 

    Rafael