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.