Skip to main content
IIvan.6
Associate II
July 20, 2021
Question

I2C LL - no transmit

  • July 20, 2021
  • 0 replies
  • 748 views

Got problem after converting from STM32F051 to STM32L051

no data transmit.

same board, same function:

LL_I2C_HandleTransfer(I2C1, 8bitAddress, LL_I2C_ADDRSLAVE_7BIT,1, LL_I2C_MODE_AUTOEND, LL_I2C_GENERATE_START_WRITE);
 
 Timeout=1000000;
 while(!LL_I2C_IsActiveFlag_TXIS(I2C1))
 {
 if((Timeout--) == 0) 
 return TIMEOUT_Callback();
 }
 
 LL_I2C_TransmitData8(I2C1, data);
 
Timeout=1000000;
 while(!LL_I2C_IsActiveFlag_STOP(I2C1))
 {
 if((Timeout--) == 0) 
 return TIMEOUT_Callback();
 }
 
 LL_I2C_ClearFlag_STOP(I2C1);

Initialisation was done by CubeMX. Looking by analyzer - after setting address no data left shift register

This topic has been closed for replies.