In order to enable NHET program overflow check, i do as the following:
1. enable nhet program overflow check
nhetEnableProgramOverflowCheck(void)
{
hetREG->EXC1 = 0x00000100; //enable NHET program overflow,priority level 2(low priority)
}
2. change the nhet program ram, to make it overflow.
3. In ISR, i want to clear the two registers value. but these two registers are all not cleared. What's wrong with it?
#pragma INTERRUPT(hetLowLevelInterrupt, IRQ)
void hetLowLevelInterrupt(void)
{
/* Offset Index Priority Level 2 Register (HETOFF2)*/
uint32 offsetvalue = hetREG->OFF2;
/* Exception Control Register 2 (HETEXC2) */
hetREG->EXC2 = 0x00000001;
}