/* Enables or disables the reporting of an uncorrectable ECC error to the CPU. On this microcontroller, directly reading data from flash memory can result in a CPU trap, when that particular flash page is in the erased state. This is caused because an unprogrammed flash page also doesn't have its ECC bits set.  */
static void CpuEnableUncorrectableEccErrorTrap(blt_bool enable)
/* Enables or disables the reporting of an uncorrectable ECC error to the CPU. On this microcontroller, directly reading data from flash memory can result in a CPU trap, when that particular flash page is in the erased state. This is caused because an unprogrammed flash page also doesn't have its ECC bits set.  */
static void CpuEnableUncorrectableEccErrorTrap(blt_bool enable)
{
  IfxCpu_ResourceCpu coreIndex;
  blt_int16u         password;
  Ifx_CPU *          cpu;
  blt_int8u          maskUEccVal;
  if (enable)
  {
    maskUEccVal = 2;
  }
  else
  {
    maskUEccVal = 1;
  }
  password = IfxScuWdt_getGlobalEndinitPassword();
  IfxScuWdt_clearGlobalEndinit(password);
  for (coreIndex = 0; coreIndex < IfxCpu_ResourceCpu_none; coreIndex++)
  {
    cpu = IfxCpu_getAddress(coreIndex);
    ASSERT_RT(cpu != NULL_PTR);
    if (cpu != NULL_PTR)
    {
      cpu->FLASHCON1.B.MASKUECC = maskUEccVal;
    }
  }
  IfxScuWdt_setGlobalEndinit(password);
}