When performing I2C transactions in 'release' builds, the time between
setting the run bit and checking the busy bit is too short and the
busy bit is not reliably set by the time you get there.
It can take up to 8 clock cycles for the run to begin so this commit
adds an 8 cycle delay in the i2c::busy_wait! macros before checking any
I2C hardware registers.
When performing I2C transactions in 'release' builds, the time between setting the
run
bit and checking thebusy
bit is too short and thebusy
bit is not reliably set by the time you get there.It can take up to 8 clock cycles for the
run
to begin so this commit adds an 8 cycle delay in the i2c::busy_wait! macros before checking any I2C hardware registers.Signed-off-by: Michael Leonard maybeillrememberit@gmail.com