2024-12-02 07:26 AM
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
2024-12-02 09:08 AM
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