How to send data via I2C using DMA

Post here first, or if you can't find a relevant section!
Post Reply
Posts: 5
Joined: Sun Mar 15, 2020 5:06 pm

How to send data via I2C using DMA

Post by lucky62 »

Hello friends,

can someone to help me with configuration of DMA and I2C?

I would like to send the data from blue pill (STM32F103) to the external DAC with I2C interface. I am trying to generate sine wave. Data of one sine period are stored in the array - 512 values. I would like to use it as a circular buffer.

I cannot find any I2C-DMA example. Here I found SPI-DMA example. So I will try to adapt it for I2C.

And here are my questions:
1) Is this possible? I don't know if actual implementation (STM32 Core 1.8.0) is allowing this...
If yes, then next questions.
2) Which libraries/functions need I use for I2C? (seems Wire is not usable. Some low level functions?)
3) Which DMA channel can I use with I2C?
4) Can I use PROGMEM as a data buffer for DMA?

Thanks for any help.

Post Reply

Return to “General discussion”