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/TMS570LC4357: How to use pre-defined registers?

Part Number: TMS570LC4357
Other Parts Discussed in Thread: HALCOGEN

Tool/software: Code Composer Studio

I used HALCOGEN to generate a template and merged with CCS.   Now I want to set the ECC_DETECT_EN register of SRAM.   I typed the following code

ECC_DETECT_EN = 0x5h;

When I try to compile the program the compiler says the register is not defined.   I can try to set the register at its physical address.   However I prefer to know how to use these names for the registers.  So my question is where is the register defined?  What file should I include?

Thanks,

Xiangguang Feng

  • Hello,

    L2RAMW Module registers and are defined in reg_tcram.h . You can access L2RAMW Module Control Register (RAMCTRL) using those definitions. For example:

    tcram1REG->RAMCTRL = 0x0005010AU;

    Bits [3-0] represents ECC_DETECT_EN field.

    Best regards,
    Miro