Quantcast
Channel: Processors
Viewing all articles
Browse latest Browse all 124118

Forum Post: RE: NMI interrupt not returning properly from ISR

$
0
0

Randy,

Thank you very much for your support and in-depth explanation of why the use of NMI for functional interrupts is discouraged.  You have been very supportive and your suggestions are highly appreciated.

We have finally decided to use the PPS signal to generate timer capture events in a timer that uses the same source clock as the timer we intend to measure its drift, everything with maskable interrupts.  Knowing the theoretical number of cycles the timer has to count until it receives each PPS event, we can estimate the time drift of the second timer and apply the corrections in a maskable interrupt service routine without too hard time constraints.

And finally, regarding the problem with the NMI ISR not returning properly, we have already discovered the culprit.  We were using the Starterware routines that call the NMI ISR as:

interrupt void c674x_nmi_isr (void)

{
    c674xISRtbl[1]();
}

Instead of:

#pragma NMI_INTERRUPT(c674x_nmi_isr);

void c674x_nmi_isr (void)

I haven't done further tests, but with this change I'm pretty sure everything would have worked well from the beginning.

Best regards,

Eduardo.


Viewing all articles
Browse latest Browse all 124118

Trending Articles