[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
BoonT_56
Employee
Employee
500 likes received 250 likes received 100 likes received

This thread discussed about how to change the speed of the I2C bus so as to access the eeprom. Perhaps you may take reference and see whether the issue still exist....

BCM20372S NVRAM Read/Write I2C Speed

0 Likes
Anonymous
Not applicable

No, not working.

I create a mi.cgs file with the content

ENTRY "I2C Speed"

{

    "Speed" = "100 KHz"

}

in the application folder and add

CGS_LIST += $(DIR)/mi.cgs


in the makefile.mk


Still the same.

0 Likes

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

0 Likes
BoonT_56
Employee
Employee
500 likes received 250 likes received 100 likes received

btw, what is the brand and part number of your eeprom?

0 Likes
Anonymous
Not applicable

at24c512 -> eeprom part number.

And, the clock issue is not yet solve. Still wrong.

0 Likes

Please refer to my PM to you.

0 Likes