gecko_sdk
gecko_sdk copied to clipboard
Fix handling of I2C Errata E302
In the original E303 workaround, the application reads i2c->status
, but compares the result to the interrupt flags.
Instead, the bits must be compares against I2C_STATUS_RXDATAV
and I2C_STATUS_RXFULL
, respectively
Puzzled why this clear case of register confusion has not been merged or otherwise fixed, even in recent 2022-08 v4.1.1?
I'm looking into whether some I2C hiccups experienced on an EFR32BG12 based platform could be attributed to known erratas fixed in more recent gecko_sdk releases than in use on the platform (currently on v3.2.3).
Looking at this PR I find that the errata referred to here generically as E303 (ignoring the typo in the issue summary), in the em_i2c.c code referred to as I2C_E303 and in v4.1.1 applied specifically when defines _SILICON_LABS_32B_SERIES_2_CONFIG_1-3 are set, seems to be known as I2C_E207 for the for the EFR32BG12. For EFR32BG21 the issue is listed as I2C_E303 in the errata.
The attempt at mitigating I2C_E303 seems to address exactly what EFR32BG12 I2C_E207 describes apart from an additional clear of I2C_IF_RXUF. But this known fix for I2C_E303/E207 seems to not be applied for 32B_SERIES_1 devices.
Anybody able to explain why?
E207 (BG12) and E303 (BG21) seem to address the same issue. You're right, I mistakenly typed the wrong error in the title of this PR. Will this issue be fixed in an upcoming release?