2025-03-17 5:11 AM
Dear ST
I have some question about i2c read functions
Currently we use zephyr os (version 3.4.0)
the stm32f412RGT used as the host and the host reads a 5-byte value from another mcu used as a slave through
i2c
the following problem occurs once every 3 hours after that i2c gets stuck.
When the host reads the last byte 0x3f normally, it should send nack instead of ack to slave , but it seems that i2c is stuck because ack is sent to slave . Is there a way to solve this?
thanks
BR
MR.SHIM
2025-03-17 5:14 AM - edited 2025-03-17 5:22 AM
@hongjo wrote:the following problem occurs once every 3 hours
Is that exactly 3 hours, or just "some time around 3 hours" ?
Repeatable?
Schematic & details of the slave may help.
2025-03-17 5:27 AM
Dear guru
It takes about 3 hours, but when it happens quickly, the I2C STUCK happens in 30 minutes.
When I modified the code on the slave to process it as if it received a nack even though the host sent an ack at the end of the read, the i2c stuck did not occur even after several days of operation
thanks
BR
Mr.shim