AnsweredAssumed Answered

Example LPC845_I2C_accel_led: I2C_MasterInit()

Question asked by 12345 67890 on Apr 16, 2019
Latest reply on Apr 24, 2019 by Kerry Zhou

I don't understand the driver, please explain it to me:

The example above from has a

#define I2C_MASTER_CLOCK_FREQUENCY (12000000)

In clocks tool I can see a FRO of 30 MHz is selected, resulting in clock_config.c.

In I2C_MasterInit() the function I2CMasterSetBaudrate() is called with I2C_MASTER_CLOCK_FREQUENCY as argument for srcClock_Hz (I2C functional clock frequency in Hertz).

When I hop along the calls I think it must be 30 MHz instead of 12 MHz in the example. So where went I wrong or missed the change? It's a serious question for me to understand the driver.