cancel
Showing results for 
Search instead for 
Did you mean: 

I2C_GenerateSTART in STM32L4 /L4+ series

Posted on May 24, 2018 at 11:14

Hi

I want to know the similar API for 

I2C_GenerateSTART for STM32L4/L4+.

For F series 

STM32FXX is 

I2C_GenerateSTART.

STM32L4 is ???

Please let me know.

Thanks

Phani

1 ACCEPTED SOLUTION

Accepted Solutions
Posted on May 24, 2018 at 15:30

Hi 

The STM32L4 Series and STM32L4+ Series devices implement a different I2C peripheral

  • The user must set the START bit in I2C_CR2 register
0690X0000060KrIQAU.png0690X0000060KviQAE.png

please tell me how i need to proceed for I2C Start, on which control registers i need to take which has both START and RESET

  • The START bit is reset by hardware when the slave address has been sent on the bus, whatever the received acknowledge value. The START bit is also reset by hardware if an arbitration loss occurs

-Nesrine-

View solution in original post

4 REPLIES 4
Nesrine M_O
Lead II
Posted on May 24, 2018 at 13:59

Hi

phanirajkiran.ma

,

-Nesrine-

Posted on May 24, 2018 at 14:56

Hi Nesrine

Board: Nucleo144- STM32L4R5ZI.

I want to write I2C_start condition .

Use case: Read/write sensor BME680 over I2C.

Please tell me what are the equivalent for

I2C_GenerateSTART as in case of STM32FXX series.

In Case CR1 series i cannot find

I2C_CR1_START and for RESET i find I2C_CR1_SWRST  Case CR1:  START :: NO RESET :: YES

But i cant find for CR2 for STM32L4XX series.  The above explain is for Start condition of I2C as like this :   Case CR2::  START :: YES  RESET :: NO 

D_LOG(''Generate start condition\n''); dev->CR2 |= I2C_CR2_START; // This will make start of I2C on CR2.   For CR2 its not available. i want to know why there is not there for CR2(control register 2). 0690X0000060KvTQAU.png  

please tell me how i need to proceed for I2C Start, on which control registers i need to take which has both START and RESET

Thanks

Phaniraj

Posted on May 24, 2018 at 15:36

Thanks for the support Nesrine.

Yes for SWRESET  

0690X0000060KvYQAU.png

On I2C_CR1 bit 13 

0690X0000060KvdQAE.png

Thanks 

Phaniraj

Posted on May 24, 2018 at 15:30

Hi 

The STM32L4 Series and STM32L4+ Series devices implement a different I2C peripheral

  • The user must set the START bit in I2C_CR2 register
0690X0000060KrIQAU.png0690X0000060KviQAE.png

please tell me how i need to proceed for I2C Start, on which control registers i need to take which has both START and RESET

  • The START bit is reset by hardware when the slave address has been sent on the bus, whatever the received acknowledge value. The START bit is also reset by hardware if an arbitration loss occurs

-Nesrine-