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.

TMS570LS0432: Software readback of written configuration

Part Number: TMS570LS0432
Other Parts Discussed in Thread: HALCOGEN,

Many of the TMS570 modules include a safety mechanism that requires for the user application to read back any written configuration.

In practice, almost always the configuration registers are altered by Halcogen functions. However, no code on those functions performs this check, and blocks of code on those functions are autogenerated.

Does it mean that the user should manually insert between USER CODE tags in every halcogen function a check that the registers' values before exiting the function are as intended?

Are there some recommended practices in your experience to fulfill those safety mechanisms?

  • Yes

    I also have this doubt.

    The response from my certification company is that all codes generated by HCG need to be tested

  • Hello,

    Please refer to the feedbacks in the thread:

    You are right, you need to write your won function to perform the readback of the written registers.

  • I see, thank you both for your answers, somehow I missed this thread because it relates to the other Safety Mechanisms about periodic readback as opposed to after writing.

    The Halcogen functions have to be all tested with Halcogen TAU or other tool anyway, I just wanted to verify that all of them must be complemented.

  • Hello

    you can periodic test   registers by  this function "Reg_Read_Compare"

  • Indeed, however note that this seems to be work in progress. There are comments in that file like "(temporarily done - remove inversion b4 release)", or "reserved for enhancements", "DO NOT USE THESE MACROS".

    Some modules do not have their own xxGetConfigValue() functions, like FEE or L2L3 if I am not mistaken. In case you implement those on your own, take care that non-static registers must be omitted (if a register is expected to be able to change value due to normal operation, like a status register). So only config registers should be read back.

  • Hello

    This function have FEE or L2L3

    typedef enum _ModuleId {
    INVALID = 0, /**< Reserved, do not use */
    _NOT_SUPPORTED_1 = 1, /**< Reserved, do not use */
    PMM = 2, /**< Power Management Module - Power State Controller */
    DCC1 = 3, /**< DCC1 */
    DCC2 = 4, /**< DCC2 */
    SYSTEM = 5, /**< System (SYS) Module */
    ESM = 6, /**< Error Signaling Module */
    CCMR4 = 7, /**< Cortex-R4 Compare Module */
    TCMFLASH = 8, /**< On-Chip Flash TCM (ATCM) */
    FEE = 9, /**< Flash EEPROM Emulation Module */
    SRAM = 10, /**< SRAM Modules (BTCM & Peripheral SRAMs) */
    L2L3 = 11, /**< Level2 & Level3 Interconnect Subsystem */
    EFC = 12, /**< EFuse Module */
    OTP = 13, /**< OTP Module */
    IOMM = 14, /**< IO Multiplex Module */
    VIM = 15, /**< Vectored Interrupt Module */
    RTI = 16, /**< Real Time Interrupt Module (Timer) */
    PBIST = 17, /**< PBIST */
    STC = 18 /**< Self Test Controller */
    } ModuleId;

  • yes, but on the register_readback.c

    #if L2L3_ENABLED
    		case L2L3:		details->baseline=&l2l3Baseline;
    						details->size = sizeof(l2l3_config_reg_t);
    						/*SAFETYMCUSW 95 S MR:11.1,11.4- <INSPECTED> "Reason -  Implementation constraint"*/
    						details->getConfiReg=(getConfiReg_t)l2l3GetConfigValue;
    						break;
    #endif

    Does l2l3GetConfigValue exist? In which file? Maybe I am missing some halcogen flag?

  • According to

    https://e2e.ti.com/support/microcontrollers/hercules/f/312/t/849644?RM48L940-L2L3-Register-Readback

    it can be replaced with pcrGetConfigValue()

    Similarly, I think there is no iommGetConfigValue, replaced it with pinmuxGetConfigValue()

  • Yes  

    you are right.

    Do you want to change the“ l2l3GetConfigValue” to “pcrGetConfigValue”?and change “iommGetConfigValue ”to “pinmuxGetConfigValue”

    in the register_readback.c?

    I see #if IOMM_ENABLED and #if L2L3_ENABLED in my TMS570 program isnot enable.Is it related to the CPU model?

    and the Safety_library is different.

  • Yes, I am using safeti 2.4.0_LDRA_Less library and the rest of the code is based on the demo app for SL_TMS570LS0432_NoOS

    By default those tags are disabled and there is a comment on not to enable them. If your application however relies on those modules as well you need to adapt the program and enable them. I found those modifications needed.

  • Hello 

     Me too

     I also use safeti 2.4.0_LDRA_Less library.

     I dont know ,What is your safety output and what is the safety risk.

     I think your safety risk.There are some circumstances. But it can be protected by the judgment of some flag bits in your program.

    Even if there is a problem with the register, will it cause your risk output??