Skip to main content
Indois
Associate III
April 6, 2021
Question

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

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.

This topic has been closed for replies.

2 replies

Pavel A.
April 6, 2021

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

Loch
Associate
April 4, 2022

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