DSPRelated.com
Forums

How to interrupt an interrupt ?

Started by klaus April 10, 2004
Hi everybody,

I am working on a C6711 DSP using CCS 2.21. The system has two
daughter cards (microline) one with 4 ADs and one with 2 DAs and 2
ADs. The input from the ADs is FIFO buffered, whereas the output from
the DAs is not.
That is why the DA output and the whole time domain convolution
(FXLMS-algorithm) is interrupt triggered (one sample for each
interrupt) on an external timing signal hooked to INT1 (say with 8
kHz).
I need to sync (better: reset the generation of the output signals) to
a repetitive external event that occurs with a slow frequency (say 3
Hz) with inherent jitter. I have had this event hooked to INT0. Now it
happens that the INT0 sometimes has to wait until INT1 is done with
the convolution and that the sync to the INT0 is off by some time
which interferes with the proper indexing of the whole system.

I have now tried to use the NMI instead of INT0 for the sync event, it
so happens that the interrupt is executed only once, and that after
that the whole system is halted.

What do I need to do to continue after servicing the NMI. Are there
other tricks to interrupt an interrupt by setting a higher priority
(not using the NMI)?

Any support is appreciated.

Thanks
Klaus
klaus wrote:

> Hi everybody, > > I am working on a C6711 DSP using CCS 2.21. The system has two > daughter cards (microline) one with 4 ADs and one with 2 DAs and 2 > ADs. The input from the ADs is FIFO buffered, whereas the output from > the DAs is not. > That is why the DA output and the whole time domain convolution > (FXLMS-algorithm) is interrupt triggered (one sample for each > interrupt) on an external timing signal hooked to INT1 (say with 8 > kHz). > I need to sync (better: reset the generation of the output signals) to > a repetitive external event that occurs with a slow frequency (say 3 > Hz) with inherent jitter. I have had this event hooked to INT0. Now it > happens that the INT0 sometimes has to wait until INT1 is done with > the convolution and that the sync to the INT0 is off by some time > which interferes with the proper indexing of the whole system. > > I have now tried to use the NMI instead of INT0 for the sync event, it > so happens that the interrupt is executed only once, and that after > that the whole system is halted. > > What do I need to do to continue after servicing the NMI. Are there > other tricks to interrupt an interrupt by setting a higher priority > (not using the NMI)? > > Any support is appreciated. > > Thanks > Klaus
Some thoughts: First, you will never, ever be able to accurately measure your incoming signal purely by software. You can only shorten the interrupt latency, not eliminate it. Second, it's generally not a good idea to have long processes in interrupts. You _can_ do this, and interrupt them with other interrupts, but it's a pain. Some suggestions: See if the chip has an externally triggered timer that you can connect your sync signal to. If so, you can respond to the interrupt at leisure and adjust your timing after the fact. Rearrange your code so the convolution happens in a normal thread, and only the DAC output happens in interrupt land. This will require delaying the DAC output, but it'll significantly shorten your latency to other interrupts. If you can stand it do your convolution for time n+1 right after you write your time n value to the DAC. If all else fails, there should be a way to rearrange priorities and to make the interrupts nestable. This varies by processor, so I suggest that you start reading the manual, and you start making friends with your local TI applications engineer if they'll talk to you. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com