These forums are read only, please use our new forums here.

Main :: ToneCore Development Kit

How to detect code exceeding DSP bandwidth (debugging tip)
by RedPandaCurt on 2010-02-16 10:56:57.9280

It can be difficult to tell if your DSP code is taking longer to run than the available clock cycles between samples.  The DSP56364 ignores a second ESAI interrupt if it is still processing the first one, causing it to drop samples.  In my case, the effect pretty much worked, but the missed samples added a small high-frequency signal.

I added the following code to the beginning of the receive exception interrupt (esai_rxe_isr) to detect receive overruns.  It uses one of the debug memory locations as a counter, so it's unobtrusive.  The actual number of overruns isn't important - just the fact that the number is changing.

     ; Check for receive overrun

     move     x:M_SAISR,a

     jclr     #7,a,_no_receive_overrun

     move     x:Debug_Read_from_DSP_4,a0

     inc     a


     move     a0,x:Debug_Read_from_DSP_4


Re: How to detect code exceeding DSP bandwidth (debugging tip)
by audioartillery on 2010-02-16 13:13:09.1850

That's a great tip, thanks.  I did something stupid one time and suspected this was happening but didn't know how to prove it.

And congrats on doing something complicated enough to max out your DSP cycles!

The information above may not be current, and you should direct questions to the current forum or review the manual.