cancel
Showing results for 
Search instead for 
Did you mean: 

DMA execution request order, I2C.

domenicocelentano
Associate

Hi,

I'm using Nucleo board with Stm32CubeIde and HAL library.

I have a periodic interrupt every 10 ms and I want to acquire data from 8 sensors with I2C bus each with a different address.

At the interrupt output I must already have all the data to copy into a circular buffer. For I2c requests I want to use DMA.

So I start eight requests at the same time, what I want to know is if the callback DMA interrupt is called in the same order as the request to have the correct data.

If not, how can I solve this problem?

Thank you in advance

Domenico

1 REPLY 1

Is it 8 devices on the same I2C bus? Then you cannot do this:

> So I start eight requests at the same time

You start one I2C process, whatever it takes, and when it finishes, you have to start the next one. That requires software intervention, usually the DMA triggers an interrupt when its transfer is done.

JW