cancel
Showing results for 
Search instead for 
Did you mean: 

How to get funciont "hal_i2c_isdeviceready()" in LL library?

SZhan.5
Associate

Hi,

I am working on BlueNRG-2 and I need a funcion "hal_i2c_isdeviceready()" to confirm NFC eeprom IIC ready. In ST BlueNRG-2 demo, it used LL library of IIC.

Could you give me some demo like "hal_i2c_isdeviceready()" in LL library.

Thanks a lot.

2 REPLIES 2
Nikolay Brinken
Associate III
  1. Before START check LL_I2C_IsActiveFlag_BUSY(I2Cx)
  2. Before TRANSMIT BYTE check LL_I2C_IsActiveFlag_TXE(I2Cx)
  3. Before RESTART check LL_I2C_IsActiveFlag_TC(I2Cx)
  4. Before RECEIVE BYTE check LL_I2C_IsActiveFlag_RXNE(I2Cx)
  5. Before STOP AFTER TRANSMITTED check I2C_CheckEvent(I2Cx, I2C_EVENT_MASTER_BYTE_TRANSMITTED)
  6. Before STOP AFTER RECEIVED check I2C_CheckEvent(I2Cx, I2C_EVENT_MASTER_BYTE_RECEIVED)

points 5 and 6 are wrong