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.

TMS570LC4357: Discrepancy between the initial value of systemREG2->VCLKACON1 and SYS2_VCLKACON1_CONFIGVALUE

Part Number: TMS570LC4357
Other Parts Discussed in Thread: HALCOGEN

Hello,

I am using the TMS570LC4357 and I have a question about the initial configuration value for one of the system registers, Peripheral Asynchronous Clock Configuration 1 Register (VCLKACON1).

In HL_system.c the function systemGetConfigValue() returns either initial or current value for each register.
For the initial value of VCLKACON1 systemGetConfigValue() returns SYS2_VCLKACON1_CONFIGVALUE.
SYS2_VCLKACON1_CONFIGVALUE is defined in HL_system.c as follows
#define SYS2_VCLKACON1_CONFIGVALUE  ( (uint32)((uint32)1U << 24U) \
                                    | (uint32)((uint32)1U << 20U) \
                                    | (uint32)((uint32)SYS_VCLK << 16U)\
                                    | (uint32)((uint32)1U << 8U)\
                                    | (uint32)((uint32)1U << 4U) \
                                    | (uint32)((uint32)SYS_VCLK << 0U) )

However, in mapClocks() the initial value of VCLKACON1 is

    systemREG2->VCLKACON1 =  (uint32)((uint32)(1U - 1U) << 24U)
                           | (uint32)((uint32)0U << 20U)
                           | (uint32)((uint32)SYS_VCLK << 16U)
                           | (uint32)((uint32)(1U - 1U) << 8U)
                           | (uint32)((uint32)0U << 4U)
                           | (uint32)((uint32)SYS_VCLK << 0U);

i.e. the two values are different

Can you confirm that SYS2_VCLKACON1_CONFIGVALUE is wrong and that the initialisation in mapClocks() is correct?

Thank you.