Skip to content

Commit 0c2894c

Browse files
authored
Merge pull request #2659 from mubes/i2cfixes
Fix I2C clock divider
2 parents 1b33cd1 + 09a3153 commit 0c2894c

File tree

1 file changed

+1
-3
lines changed
  • ports/mimxrt10xx/common-hal/busio

1 file changed

+1
-3
lines changed

ports/mimxrt10xx/common-hal/busio/I2C.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,8 @@
3434

3535
#include "fsl_lpi2c.h"
3636

37-
//TODO
37+
#define I2C_CLOCK_FREQ (CLOCK_GetFreq(kCLOCK_Usb1PllClk) / 8 / (1+CLOCK_GetDiv(kCLOCK_Lpi2cDiv)))
3838

39-
#define I2C_CLOCK_SOURCE_DIVIDER (5U)
40-
#define I2C_CLOCK_FREQ (CLOCK_GetFreq(kCLOCK_Usb1PllClk) / 8 / (I2C_CLOCK_SOURCE_DIVIDER + 1U))
4139

4240
static void config_periph_pin(const mcu_periph_obj_t *periph) {
4341
IOMUXC_SetPinMux(

0 commit comments

Comments
 (0)