cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L1 I2C Mem Write DMA

lorant124
Associate III
Posted on April 21, 2018 at 14:49

Hello,

I generated the code using the STM32CubeMx 4.25.FW is 1.8.1

I'm trying to I2C communication between STM32L1(master) and SSD1306 OLED display(slave, 7bit address).

I tested with HAL_I2C_Mem_Write function it is worked fine.

I would like send most data to visualise logo etc. and I would like to using with DMA.

I find function  HAL_I2C_Mem_Write_DMA but dostn work.

I visieted examles :

https://github.com/pellepl/verisure1512/blob/master/ext-libs/STM32Cube_FW_F7_V1.2.0/Projects/STM32746G-Discovery/Examples/I2C/I2C_TwoBoards_ComDMA/Src/main.c

 

and tried enable Event interrupt and error, but display doesnt work. Dont have Logic analyser for i2c analysis.

Please let me know why HAL_I2C_Mem_Write_DMA() is didn't work.

thank you.

#i2c-hal-dma #i2c-write #i2c-dma-ssd1306 #cubemx-v4.25.0 #i2c-analysis
1 REPLY 1
Joerg Wagner
Senior III
Posted on April 21, 2018 at 23:32

Do you have a function I2Cx_DMA_TX_IRQHandler(void) ?

Otherwise take a look at an example of ST:

Download STM32CubeL1 from st.com

Open folder : Projects > STM32L152RE-Nucleo > Examples > I2C > I2C_TwoBoards_ComDMA