[SDK2.2] I2C bus clock

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hi Sir,

I found a very weird situation of I2C bus clock.

1. After programming, the application run automatically. The clock is correct.

2. Reset or Power up, the clock become 4x faster. That is, 100KHz configuration, I see the 400KHz clock waveform.

   The 400KHz configuration, I see 1.6MHz clock waveform. Why is that? Am I doing anything wrong?

My code for i2cm config:

    /* initialize the i2c master */

    i2cm_init();

    /* the default speed is 100kHz, it's not required the speed config. */

    i2cm_setSpeed(I2CM_SPEED_400KHZ);

    i2cm_setTransactionSpeed();

    //i2c_speed = i2cm_getSpeed();

    //ble_trace1("i2c speed:%d\n", i2c_speed);

Best regards,

Fran

0 Likes
1 Solution

The below thread discussed about some issues with i2cm_x functions and the author recommended using cfa_x functions instead. Does this ring any bells to you?

I2C Discussion

View solution in original post

0 Likes
6 Replies