cancel
Showing results for 
Search instead for 
Did you mean: 

Issue while running audio streaming and reading sensor data together

KK Y.1
Associate II

Hi,

I have an application where I am using NUCLEO F401RE interfaced with Nucleo-CCA02M2 and a sensor. I am running two tasks one is reading data from sensor via I2C and other reading audio from I2S via DMA. THe sensor uses an interrupt line which will interrupt every 10ms. With the sensor task alone I am able to receive the interrupt properly, but when audio streaming is started the interrupt callback from sensor became slow. When I tried increasing sensor interrupt priority from 5 to 4 , the sensor interrupt is not working. I also tried by decreasing priority of DMA from 5 to 6, but still not working. Currently the DMA interrupt for audio and sensor interrupt are at priority 5. Please provide suggestion to get sensor interrupts without delay along with DMA interrupt.

1 REPLY 1
MM..1
Chief II

" I am running two tasks" seems as you use RTOS?

HW based time critical proces isnt good part for RTOS.

In basic you need DMA buffers sizes aproximate to time code need to other tasks plus handle DMA buffs.

Perfect is when you can setup all to mode offload MCU , I2S circular DMA + I2C event DMA usw.