Skip to main content
Visitor II
November 15, 2022
Question

HAL_I2C_Mem_Read_IT() clock stops mid way through 256 byte read

  • November 15, 2022
  • 0 replies
  • 521 views

Hi,

I am using a Nucleo-G474RE with the azure V1.0.0 pack and using a thread example project to interface to an external I2C 256 byte memory device.

Using blocking I2C read/write works fine, I can read and write the 256 bytes in one go.

When I switch to using the interrupt based functions, HAL_I2C_Mem_Read_IT()/HAL_I2C_Mem_Write_IT() the write works fine but the read fails. The SCL clock stops at approx byte 102 and never restarts. No error or complete callback is called and the I2C system nevers recovers, it responds with busy from then on. I know the write works as if I switch to blocked reads the data read agrees with what was written.

Smaller interrupt based reads at the 102 address works fine so it seems to be a read size issue.

Any ideas why this might be happening?

Regards,

P. Holohan

    This topic has been closed for replies.