cancel
Showing results for 
Search instead for 
Did you mean: 

I2C communication between STM32 MCU and temperature sensor using Low-Layer API

Indois
Associate II

Hello,

Could you share any examples of I2C communication implementation between STM32 MCU and sensor using Low-Layer (LL) API? I am using STM32L011 MCU and trying to read temperature values from temperature & humidity sensor HDC2080. I found a library for this sensor which includes operations with registers and Tx/Rx buffers but I2C communication has to be coded according to specific MCU.

Thank you.

2 REPLIES 2
Pavel A.
Evangelist III

Usually HAL_I2C_Mem_Write and HAL_I2C_Mem_Read work with these devices. Try these functions first.

Later optimize as you like (use interrupts, LL API or whatever).

-- pa

I'm doing a similar thing and have managed to use HAL_I2C_Mem_Read to get the temp, humidity, and pressure from a BME280 but I need to use LL for my assignment. But, I don't know where to go next and would appreciate any advice for getting to the next step.

Loch