Closed thealastair closed 1 year ago
Hello @thealastair,
Thank you for this report. We will get back to you as soon as we analyze it further. This may take some time. Thank you for your comprehension.
With regards,
Hello @thealastair ,
Thank you for this contribution, this point has been reported to our development teams. I will get back to you as soon as I have any updates.
Best Regards,
ST Internal Reference: 152242
Describe the bug If an I2C write transaction fails, the hi2c->XferCount may be left set to a non zero value. Subsequent calls to HAL_I2C_Mem_Write_IT will then ALWAYS fail because the condition hi2c->XferSize == 0U is not met in the interrupt handler
I2C_Master_ISR_IT
this causes HAL_I2C_ERROR_SIZE to be returned.
A clear and concise description of what the bug is.
How To Reproduce Perform a failing I2C transaction, then call HAL_I2C_Mem_Write_IT.
Additional context
To fix, unconditionally set hi2c->XferSize =0u in HAL_I2C_Mem_Write_IT.
Screenshots If applicable, add screenshots to help explain your problem.