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.

TMS570LS0332: Regarding register read back feature of L2L3 configuration registers

Part Number: TMS570LS0332
Other Parts Discussed in Thread: HALCOGEN

Hi,

I have safeTI library ported for my project. I am using TMS570L0332 in my design. The safeTI library refers to the function called "L2L3GetConfigValue" for reading the configuration registers. I do not see this function is being generated in HalCoGen files.

I am using HalCoGen 04.06.00.  When can I expect this function to be integrated into HalCoGen generated drivers? Or is there any other way I can implement this manually? (i.e., by adding into user code section)

Thanks & Best regards,

Sreekanth challa

  • Hello Challa,

    L2L3GetConfigValue function and the structure l2l3_config_reg_t are not defined in HalCoGen generated code, and are not defined the safety Lib demo code either. You need to define it by yourself. For LS0332, you only need to read the value of the PCR registers back.

    Regards,

    QJ

  • Hi QJ,

    Thanks for your quick response. I have seen the below function in sys_pcr.c file.

    void pcrGetConfigValue(pcr_config_reg_t *config_reg, config_value_type_t type)
    {
    if (type == InitialValue)
    {/* Do not pass Initial value as parameter as there is no PCR initialization API */
    }
    else
    {
    /*SAFETYMCUSW 134 S MR:12.2 <APPROVED> "LDRA Tool issue" */
    config_reg->CONFIG_PMPROTSET0 = pcrREG->PMPROTSET0;
    config_reg->CONFIG_PMPROTSET1 = pcrREG->PMPROTSET1;
    config_reg->CONFIG_PPROTSET0 = pcrREG->PPROTSET0;
    config_reg->CONFIG_PPROTSET1 = pcrREG->PPROTSET1;
    config_reg->CONFIG_PPROTSET2 = pcrREG->PPROTSET2;
    config_reg->CONFIG_PPROTSET3 = pcrREG->PPROTSET3;
    config_reg->CONFIG_PCSPWRDWNSET0 = pcrREG->PCSPWRDWNSET0;
    config_reg->CONFIG_PCSPWRDWNSET1 = pcrREG->PCSPWRDWNSET1;
    config_reg->CONFIG_PSPWRDWNSET0 = pcrREG->PSPWRDWNSET0;
    config_reg->CONFIG_PSPWRDWNSET1 = pcrREG->PSPWRDWNSET1;
    config_reg->CONFIG_PSPWRDWNSET2 = pcrREG->PSPWRDWNSET2;
    config_reg->CONFIG_PSPWRDWNSET3 = pcrREG->PSPWRDWNSET3;
    }
    }


    There is no code inside the "if (type == InitialValue)". So i can not baseline the values of the registers for comparing periodically.

    Are there values change during the runtime of the micro contoller? (i.e., once we enter main code)

    Thanks in advance.

    Best regards,
    sreekanth challa