This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

NHET program overflow related registers can't be cleared

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;
}

  • Hi Fumin,

    If the nhet is still running,  and you've changed the code to cause an overflow, it might just be generating a new overflow at the end of each LRP.
    So it might just *look* like the bits can't be cleared because they get set again very quickly.

    I don't know if you've tried to rule this out,  but that's probably what I'd check first.

    Best Regards,
    Anthony