Skip to main content
Visitor II
April 6, 2021
Question

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

  • April 6, 2021
  • 1 reply
  • 1031 views

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.

    1 reply

    Super User
    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

    Visitor II
    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