Post Go back to editing

FIR filter in a sample based interrupt configuration

Hi,

I have a sharc-21479 EZ-Lite development kit and I am trying to program an FIR of length 1024 which is calculated every sample. My samples are coming at rate of 100KSPS through the SPI bus connected to the ADC. The second SPI bus is connected to the DAC to creat an audio loop-back. I have tested and checked the the loop-back audio routine (i.e. audio in, ADC, sharc-21479, DAC, audio out) works fine. When I am trying to include and FIR calculation which gets called every sample, the system gets stuck for some strange reason. Even if the weights of the filter are just an impulse, I get nothing at the output. Before I went to an interrupt service routine I do the necessary pushes and pops in assembely as follows:

push sts;

bit set MODE1 SRD1L |SRD1H | SRD2L |SRD2H | SRRFL | SRRFH;
.......

pop sts

Baring in mind that I am using assembly all the way through what else do I need to push to gurantee that my status before the interrupt (i.e. when I was calculating my FIR) is maintained after the interrupt has been serviced. When I test the same system with C function (interrupts), I don't have the same problem. I can't use the C interrupt as that takes alot of over head and I want to speed my ISR.

Regards

Khal

Parents
  • Hi Khal,

    Thanks for attaching the code. I have following questions/suggestions to debug the issue further:

    1) Are you connecting a seperate ADC and DAC to the ADSP2-1479 EZ-Kit? It looks like you are not using the on board codec. Is that correct? If yes, could you please elaobrate more about the block diagram of the complete interface (ADC-DSP-DAC), connections, etc?

    2) I see that you want to perform floating point processing in the FIR algorithm. But, I couldn' t see any fix-float or float-fix conversion in your code. Could you please confirm if you are already taking care of this?

    3) Could you please also mention how do you synchronize your code to receive the data from ADC and send the processed data to the DAC?

    Thanks,

    Mitesh

Reply
  • Hi Khal,

    Thanks for attaching the code. I have following questions/suggestions to debug the issue further:

    1) Are you connecting a seperate ADC and DAC to the ADSP2-1479 EZ-Kit? It looks like you are not using the on board codec. Is that correct? If yes, could you please elaobrate more about the block diagram of the complete interface (ADC-DSP-DAC), connections, etc?

    2) I see that you want to perform floating point processing in the FIR algorithm. But, I couldn' t see any fix-float or float-fix conversion in your code. Could you please confirm if you are already taking care of this?

    3) Could you please also mention how do you synchronize your code to receive the data from ADC and send the processed data to the DAC?

    Thanks,

    Mitesh

Children
No Data