I2C communication between STM32 MCU and temperature sensor using Low-Layer API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-04-06 7:52 AM
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.
- Labels:
-
I2C
-
STM32Cube MCU Packages
-
STM32L0 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-04-06 9:52 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-04-04 6:20 AM
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
