From c02d0df05b5987f243a1c16e93a4304916bceb6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Monda?= Date: Mon, 10 Jul 2017 00:14:48 +0200 Subject: [PATCH] Only use prescaler 0 in order to workaround errata 6070 for mask 2N97F - a silicon bug causing I2C to misbehave upon repeated starts. --- devices/MKL03Z4/drivers/fsl_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devices/MKL03Z4/drivers/fsl_i2c.c b/devices/MKL03Z4/drivers/fsl_i2c.c index b51fc07..6fc75f4 100644 --- a/devices/MKL03Z4/drivers/fsl_i2c.c +++ b/devices/MKL03Z4/drivers/fsl_i2c.c @@ -580,7 +580,7 @@ void I2C_MasterSetBaudRate(I2C_Type *base, uint32_t baudRate_Bps, uint32_t srcCl /* Search for the settings with the lowest error. Mult is the MULT field of the I2C_F register, * and ranges from 0-2. It selects the multiplier factor for the divider. */ - for (mult = 0u; (mult <= 2u) && (bestError != 0); ++mult) + for (mult = 0u; (mult <= 0u) && (bestError != 0); ++mult) { multiplier = 1u << mult;