Other Parts Discussed in Thread: HALCOGEN
Hi all,
I have a question about the function esmGetConfigValue generated by HalCoGen. The following function is generated by HaloGen:
void esmGetConfigValue(esm_config_reg_t *config_reg, config_value_type_t type)
{
if (type == InitialValue)
{
config_reg->CONFIG_EEPAPR1 = ESM_EEPAPR1_CONFIGVALUE;
config_reg->CONFIG_IESR1 = ESM_IESR1_CONFIGVALUE;
config_reg->CONFIG_ILSR1 = ESM_ILSR1_CONFIGVALUE;
config_reg->CONFIG_LTCPR = ESM_LTCPR_CONFIGVALUE;
config_reg->CONFIG_EKR = ESM_EKR_CONFIGVALUE;
config_reg->CONFIG_IEPSR4 = ESM_IEPSR4_CONFIGVALUE;
config_reg->CONFIG_IESR4 = ESM_IESR4_CONFIGVALUE;
config_reg->CONFIG_ILSR4 = ESM_ILSR4_CONFIGVALUE;
config_reg->CONFIG_IEPSR7 = ESM_IEPSR4_CONFIGVALUE;
config_reg->CONFIG_IESR7 = ESM_IESR4_CONFIGVALUE;
config_reg->CONFIG_ILSR7 = ESM_ILSR4_CONFIGVALUE;
}
else
{
/*SAFETYMCUSW 134 S MR:12.2 <APPROVED> "Register read back support" */
config_reg->CONFIG_EEPAPR1 = esmREG->EEPAPR1;
config_reg->CONFIG_IESR1 = esmREG->IESR1;
config_reg->CONFIG_ILSR1 = esmREG->ILSR1;
config_reg->CONFIG_LTCPR = esmREG->LTCPR;
config_reg->CONFIG_EKR = esmREG->EKR;
config_reg->CONFIG_IEPSR4 = esmREG->IEPSR4;
config_reg->CONFIG_IESR4 = esmREG->IESR4;
config_reg->CONFIG_ILSR4 = esmREG->ILSR4;
config_reg->CONFIG_IEPSR7 = esmREG->IEPSR7;
config_reg->CONFIG_IESR7 = esmREG->IESR7;
config_reg->CONFIG_ILSR7 = esmREG->ILSR7;
}
}
The ESM module for group1 includes 96 channels. The Register IEPSR4, IESR4, ILSR4 are used for the channels 32-63 and IEPSR7, IESR7, ILSR7 are used for the channels 64-95. As you can see in the read lines above, the values for ESM channel 32-63 are also used for channel 64-95. The HalCoGen Code do not generate a defines for ESM channel 63-95.
So if you want to use this function - values for ESM channel 63-95 must be separate coded outside of the function.
Could you agree ?
Best regards
Lars