DSPRelated.com
Forums

Interrupt latency on 2810

Started by TheDoc May 28, 2005
Have a project that requires very fast interrupt response to external
interrupts
I'm looking for response times of 200 to 300 nano seconds from external edge
to interrupt procedure
activation.. I'm using DSP/BIOS with a TI 2810 running at 100 MHZ.. I've
even copied
the isr into fast ram from flash but the response is in the order of 1.5
uS.. anyone care to comment
on how this could be improved ?.. I have not yet tried an isr without
DSP/BIOS.. should I ?
anyone with simular experiences ??

TIA




TheDoc wrote:
> Have a project that requires very fast interrupt response to external > interrupts > I'm looking for response times of 200 to 300 nano seconds from external edge > to interrupt procedure > activation.. I'm using DSP/BIOS with a TI 2810 running at 100 MHZ.. I've > even copied > the isr into fast ram from flash but the response is in the order of 1.5 > uS.. anyone care to comment > on how this could be improved ?.. I have not yet tried an isr without > DSP/BIOS.. should I ? > anyone with simular experiences ?? > > TIA > > > >
That does seem high. Is this the worst-case ISR response time you're seeing, or are you seeing this all the time? Are you going straight to the ISR or are you letting the DSP BIOS get you there? If it's worst case then you should either try without the DSP BIOS or you should see if there is any way that you can get the BIOS out of the way. If you're going through DSP BIOS then see if you can go straight to an ISR (and figure that it'll be problematic to synchronize with the BIOS). A 1500 instruction cycle interrupt response time is a bit excessive on any processor, so I don't think it's the hardware. -- ------------------------------------------- Tim Wescott Wescott Design Services http://www.wescottdesign.com
Tim Wescott wrote:
> TheDoc wrote: > >> Have a project that requires very fast interrupt response to external >> interrupts >> I'm looking for response times of 200 to 300 nano seconds from >> external edge >> to interrupt procedure >> activation.. I'm using DSP/BIOS with a TI 2810 running at 100 MHZ.. I've >> even copied >> the isr into fast ram from flash but the response is in the order of 1.5 >> uS.. anyone care to comment >> on how this could be improved ?.. I have not yet tried an isr without >> DSP/BIOS.. should I ? >> anyone with simular experiences ?? >> >> TIA >> >> >> >> > That does seem high. > > Is this the worst-case ISR response time you're seeing, or are you > seeing this all the time? Are you going straight to the ISR or are you > letting the DSP BIOS get you there? If it's worst case then you should > either try without the DSP BIOS or you should see if there is any way > that you can get the BIOS out of the way. If you're going through DSP > BIOS then see if you can go straight to an ISR (and figure that it'll be > problematic to synchronize with the BIOS). > > A 1500 instruction cycle interrupt response time is a bit excessive on > any processor, so I don't think it's the hardware.
Agreed. Let's look at the hardware. Some instructions, including loops on some processors, are not interruptible. Let's ignore that. Upon interrupt, the current instruction must finish. A pipeline can start filling on the next fetch, but it might be 2 or 3 op times for the pipe to fill and the first interrupt instruction to execute. The first few instructions may be context saves, say 5 op times total before the interrupt routine begins real work just to have something to count. If "response time" refers to when the work begins, that's 25 nanoseconds at 200 MHz op rate. If "response time" refers to when the foreground program resumes, it's several times that, but 300 ns seems doable. Saving the context in external RAM can be a killer. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Un bel giorno TheDoc digit�:

> activation.. I'm using DSP/BIOS with a TI 2810 running at 100 MHZ.. I've > even copied > the isr into fast ram from flash but the response is in the order of 1.5 > uS.. anyone care to comment
The first thing you need to check is XCLKOUT frequency, the signal on which all the external signals are synchronized (by default it's SYSCLOCKOUT/4). Since the external interrupts are fetched after a minimum of 12*tXCO, if you are using the default value of XCLKOUT you will get a latency of 12/25e6=0.48 us. Then, check if you have the input qualification enabled on your interrupt pin (I don't remember if it applies only on GPIO, or if external interrupts are affected too). -- asd
You're getting a lot of unnecessary latency due to the OS.  I would 
recommend that for this specific time-critical interrupt you not use the OS. 
You can do that by unchecking the "Use Dispatcher" box for the interrupt in 
question.  Additionally, you will need to add the interrupt keyword to your 
isr:

interrupt void myIsr()

Be careful about the function calls that you make from within the ISR.  Many 
of the semaphore functions (SEM_pend/post) as well as a few other functions 
can only be called from within a task.

By not using the dispatcher for this specific function your ISR latency 
should be approximately 11 cycles.  This will be 110 nanoseconds at 100 MHz. 
Additoinally the hardware saves 12 registers during that 110 nanoseconds so 
that will reduce the number of pushes and pops within your ISR.

Brad

"TheDoc" <TheDoc@ev1.net> wrote in message 
news:lC6me.15156$6g3.14170@tornado.texas.rr.com...
> Have a project that requires very fast interrupt response to external > interrupts > I'm looking for response times of 200 to 300 nano seconds from external > edge > to interrupt procedure > activation.. I'm using DSP/BIOS with a TI 2810 running at 100 MHZ.. I've > even copied > the isr into fast ram from flash but the response is in the order of 1.5 > uS.. anyone care to comment > on how this could be improved ?.. I have not yet tried an isr without > DSP/BIOS.. should I ? > anyone with simular experiences ?? > > TIA > > > >
I'll try that this week and see if it reduces the delay..

I'm fairly new to this chip and previous experience of 54xx and 55xx
suggested I should have
no problem with the response times in question..

many thanks..


"Brad Griffis" <bradgriffis@hotmail.com> wrote in message
news:RAkme.38$iA6.20@newssvr19.news.prodigy.com...
> You're getting a lot of unnecessary latency due to the OS. I would > recommend that for this specific time-critical interrupt you not use the
OS.
> You can do that by unchecking the "Use Dispatcher" box for the interrupt
in
> question. Additionally, you will need to add the interrupt keyword to
your
> isr: > > interrupt void myIsr() > > Be careful about the function calls that you make from within the ISR.
Many
> of the semaphore functions (SEM_pend/post) as well as a few other
functions
> can only be called from within a task. > > By not using the dispatcher for this specific function your ISR latency > should be approximately 11 cycles. This will be 110 nanoseconds at 100
MHz.
> Additoinally the hardware saves 12 registers during that 110 nanoseconds
so
> that will reduce the number of pushes and pops within your ISR. > > Brad > > "TheDoc" <TheDoc@ev1.net> wrote in message > news:lC6me.15156$6g3.14170@tornado.texas.rr.com... > > Have a project that requires very fast interrupt response to external > > interrupts > > I'm looking for response times of 200 to 300 nano seconds from external > > edge > > to interrupt procedure > > activation.. I'm using DSP/BIOS with a TI 2810 running at 100 MHZ.. I've > > even copied > > the isr into fast ram from flash but the response is in the order of 1.5 > > uS.. anyone care to comment > > on how this could be improved ?.. I have not yet tried an isr without > > DSP/BIOS.. should I ? > > anyone with simular experiences ?? > > > > TIA > > > > > > > > > >