AnsweredAssumed Answered

LL I2C Repeat Start

Question asked by Darren Debattista on Apr 5, 2018
Latest reply on Apr 6, 2018 by Dave Jones

Hi,

 

I'm new to the STM32 architecture so I need some help. I am using the STM32L431 mcu and I want to interface the LIS3MDLTR magnetic field sensor through I2C. According to the datasheet, in order to read from the LIS3MDLTR, a repeated start condition needs to be used. 

 

In my application, I am using the Low -Layer (LL) APIs. I used the STM32CubeMX to setup the project and peripherals. I found an example on how to use the I2C LL library to send and receive (by polling) but I couldn't find any help regarding on how to generate a repeated start condition. Does any one now how I can use the LL library functions to set the Master I2C to generate a repeated start condition for read operation?

 

Note: I can't use the HAL library since I need my code to be more efficient.  

Outcomes