Finally I actually noticed what the Bus Pirate was clearly telling me: we’re working at 100kHz, but the logic analyzer is running at 800Hz.
Tearing into the guts of the I2C code made no difference because we were returning the raw kHz speed set by the user. The solution is to multiply it by 1000 to return Hz. FALA works now.
Two tasks remain:
check the I2C demos (with and without FALA)
handle FALA buffer roll-over gracefully (option to capture first bit or last bit)
At its core, the configuration is storing the value in the field named baudrate, but in reality, i2c is storing kHz_rate.
I would recommend changing the mode_config.baudrate field to either store the full baudrate (i.e., not in kHz units), or alternatively to change the field name to reflect it’s in kHz units.
If you want the API to remain similar, avoid unit-free terms. For example, change: uint32_t hwi2c_get_speed(void) uint32_t hwi2c_set_speed(...)