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.

RM41L232: SafeTI:The meaning and useage of Reg_Read_Compare in demo_app project

Part Number: RM41L232
Other Parts Discussed in Thread: HALCOGEN

Hello,

I am tyring to use SafeTI library on our system.

On the directory where the CCS version is installed:demo_app/common/source, I don't clearly know the useage of [Reg_Read_compare] function in register_readback.c.

typedef enum _CfgRegRdBk_Mode {
 BASELINE  = 0xAB,
 COMPARE  = 0xCD,
 REBASELINE  = 0xEF
}CfgRegRdBk_Mode;

Reg_Read_compare has three kinds of input parameter:BASELINE,COMPARE and REBASELINE.

By using Reg_Read_compare, could it verify whether the selected module's register configuration values were changed at the place where Reg_Read_compare(moduleName, COMPARE) is called?

If so,by using Reg_Read_compare could it realize the following  diagnostic from safety manual of RM42x and RM41x?

:  ESM1(Periodic Software Readback of StaticConfiguration Registers) and ESM4(Software Readback of Written Configuration)

Thanks.

  • Hello Lily,

    The Reg_Read_Compare() function is designed for the configuration register read back and compare functionalities. It can be used for 3 modes as you said. The compare mode is used for read back compare and other modes are used to update the value of the registers which are used for future comparison. For each module, there are a set of values called "baseline" value which are used for comparison. During comparison (COMPARE mode) the values in the 'baseline' is compared against the current set of configuration registers for that module. The other 2 modes are provided so that the user can update the configuration registers with the default values(BASELINE) or the current values(REBASELINE).

    In the BASELINE mode, the function selects the value from HALCoGen as the baseline value.

    In the REBASELINE mode, the current set of values of the configuration register is selected as the baseline value.

    In the COMPARE mode, the baseline values are compared against the current value of the configuration register. In case the function is called with COMPARE without prior baselining, a REBASELINE is done before comparison.

    So you can this function for SW read back of configuration registers.

    Regards,
    QJ