aboutsummaryrefslogtreecommitdiff
path: root/embassy-executor/src
diff options
context:
space:
mode:
authorJamie Bird <[email protected]>2024-06-21 15:09:57 +0100
committerJamie Bird <[email protected]>2024-06-21 15:09:57 +0100
commit060d1f6e6f36b01e1f0ec4beb20499ac22d94b24 (patch)
tree6bab28f269c2c4566832f8d5769eb4858cd4ea95 /embassy-executor/src
parentd5badb94d2098b0360ed1ab8015c37f819771445 (diff)
Fix: Ensure I2C bus is free before master-write operation
The I2C master-write function was failing when executed immediately after an I2C read operation, requiring manual delays to function correctly. This fix introduces a check to ensure the I2C bus is free before initiating the write operation. According to the RM0399 manual for STM32H7 chips, the BUSY bit (Bit 15 in the I2C ISR register) indicates whether a communication is in progress on the bus. The BUSY bit is set by hardware when a START condition is detected and cleared when a STOP condition is detected or when PE = 0. This fix prevents the write operation from starting until the BUSY bit is cleared.
Diffstat (limited to 'embassy-executor/src')
0 files changed, 0 insertions, 0 deletions