mpfs_i2c: Increase TTOA margin to 1ms

Due to interrupt latencies the i2c transfer done interrupt can get
deferred by a few hunder microseconds. This makes the i2c transfer timeout
way too early, even though the i2c IP block is already done.

Fix this by adding a significant amount of margin (1ms) to the timeout
value.
This commit is contained in:
Ville Juven 2025-02-10 12:46:15 +02:00 • committed by Alan C. Assis
parent 255d8c57c0
commit 597b3e6ca7

View file

@ -75,7 +75,7 @@
/* Gives TTOA in microseconds, ~4.8% bias, +1 rounds up */
#define I2C_TTOA_US(n, f) ((((n) << 20) / (f)) + 1)
#define I2C_TTOA_MARGIN 20
#define I2C_TTOA_MARGIN 1000u
/****************************************************************************
* Private Types