Hi Daniel,
Thanks for your reply, I used the SRAM ECC injection example, it run well. the following is my example, can you help me find where is wrong?
int main()
{
/ * clock , pin init */
*(uint32_t *)0x2000A000 = 0x12U;
ERM_DRV_Init(INST_ERM1, ERM_CHANNEL_COUNT0, erm1_InitConfig0);
EIM_DRV_Init(INST_EIM1, EIM_CHANNEL_COUNT0, eim1_ChannelConfig0);
test = *(uint32_t *)0x2000A000;
(void)test;
EIM_DRV_Deinit(INST_EIM1);
ERM_DRV_GetErrorDetail(INST_ERM1, 1U, &addr);
if(addr == 0x2000A000)
{
PINS_DRV_WritePin(LED_GPIO, LED0, 0u); //red
PINS_DRV_WritePin(LED_GPIO, LED1, 0u); // green
PINS_DRV_WritePin(LED_GPIO, LED2, 1u); //blue
}
if(test == 0x11)
{
/* Turn off RED LED */
PINS_DRV_WritePin(LED_GPIO, LED0, 0u);
/* Turn on GREEN LED */
PINS_DRV_WritePin(LED_GPIO, LED1, 1u);
PINS_DRV_WritePin(LED_GPIO, LED2, 0u);
}
else
{
PINS_DRV_WritePin(LED_GPIO, LED0, 1u);
PINS_DRV_WritePin(LED_GPIO, LED1, 0u);
PINS_DRV_WritePin(LED_GPIO, LED2, 0u);
}
/* .....*/
}