This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Reducing hardware interrupts by using DMA?

Other Parts Discussed in Thread: ADS1158

Hi all

I'm looking for ways to reduce the number of hardware interrupts that the DSP (C6742) in our application.

In our current application, the C6742 is connected to a ADS1158 ADC. The ADC !DRDY pin causes a hardware interrupt on the DSP, which then kicks a small interrupt routine that reads out the sample over SPI. This causes 23700 interrupts per second. The interrupt routine transfers 4 bytes over SPI to collect the new sample. Once the system has filled a complete buffer with samples (240 samples in our case), the interrupt routine sends a message to a task to process that buffer.

This works quite well, but I do wonder if it is possible to reduce the interrupt overhead (might be needed in future if we want to do more processing or if we want to increase the sample rate). We use BIOS5 for our application and use the PSP SPI driver in interrupt mode. I recon that DMA mode will not help us much here, since we only transfer 4 bytes per interrupt and we would still get 23700 interrupts per second from the ADC (please correct me if I'm wrong).

Is there a way though to use something similar to DMA to automatically fill the buffers in memory without generating any interrupt on the DSP? Of course there should be a way to signal the DSP when a buffer is full. Could we use McBSP for this? If so, is there perhaps some example of a similar setup?

I'm sorry if this question has been answered here before, but I couldn't find it on the forum.

Best regards

Admar

  • Admar Schoonen,

    In the Training section of TI.com, there is a training video set for the C6474. It may be helpful for you to review some of the modules even though they are tailored to the C6474. But in particular, the EDMA/QDMA/IDMA Module will apply to your current questions. You can find the complete video set at http://focus.ti.com/docs/training/catalog/events/event.jhtml?sku=OLT110002 .

    The EDMA3 module is very similar, and the general operation is exactly the same. The number of available channels may be different and the number of Transfer Controllers may be different. But the programming of the PARAM and the use of interrupts and linking and chaining will be the same.

    You will want to use the EDMA3 to service your I2C data and put all of the data into a buffer. Once the buffer is filled, you can generate a single interrupt to the DSP rather than an interrupt when each word is ready on the I2C. Hopefully, the training video will help with your understanding of how to use the EDMA3 for your application.

    Regards,
    RandyP

     

    If you need more help, please reply back. If this answers the question, please click  Verify Answer  , below.

  • Hi Randy

    Thanks for your answer. Good to hear that we can use *DMA together with the normal SPI port for this purpose.

    Right now I have some other issues to solve that are more urgent, but I'll look at this solution in a few weeks. Consider this issue solved for now.

    Regards

    Admar