BCM20372S NVRAM Read/Write I2C Speed

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

cross mob
Anonymous
Not applicable

I am sharing the I2C bus with the BCM20372S and 3 external devices.  To communicate with those external devices I am using the i2cm_* functions.  I set the clock to 100Khz using i2cm_setSpeed(I2CM_SPEED100KHZ);.  Communication to those external devices is flawless.

When I use bleprofile_WriteNVRAM it sometimes works (returns the length of data written).  When I use bleprofile_ReadNVRAM it never works (always returns 0 and does not change the payload).

I am able to remove my external devices from the I2C bus.  When I do this both bleprofile_WriteNVRAM and bleprofile_ReadNVRAM work correctly.

This test leads me to believe that the bleprofile_WriteNVRAM and bleprofile_ReadNVRAM are using a faster clock.  Is there a setting somewhere to change this?

I am surprised this isn't screwing up other BCM20732S EEPROM operations (programming, power up, resets).  How is NVRAM Read/Write different than those operations?

Thanks.

1 Solution
Anonymous
Not applicable

Hello jpwere,

So you were able to communicate with all 3 I2C devices on the bus?

Sorry that I assumed that you had 4 I2C devices on the bus and this may have been excessive loading.

Good to you hear you got it to work.

Thanks.

JT

View solution in original post

0 Likes
8 Replies
asridharan
Employee
Employee
10 comments on KBA 5 comments on KBA First comment on KBA

The EEPROM on the modules support up to 400KHz and so the FW always uses 400KHz when accessing the EEPROM during boot and when accessing it with bleprofile_*NVRAM(). What are the slave addresses of the I2C devices you use? The EEPROM is always 0xA0/0xA1 and access to these happens at 400KHz.

If you want to reduce the EEPROM access speed to 100KHz to see if it makes a difference, create a new file in your application directory called application.cgs and then add the following lines:

ENTRY "I2C Speed"

{

    "Speed" = "100 KHz"

}

Then edit your <application_directory>/makefile.mk and add the following line:

CGS_LIST += $(DIR)/application.cgs

Now clean, build and download the app and see if you still see the same issue. EEPROM access should now happen at 100 KHz.

0 Likes
Anonymous
Not applicable

This fixed the NVRAM read/write issue.  However, it does noticeably increase power on/reset [boot] time.  I am surprised that with the default setting (400KHz) the 20732S was able to read/write [load] the EEPROM into RAM during boot.  Is it doing something tricky like disabling the input/output driver on the SCL and SDA pins during boot?

0 Likes

> However, it does noticeably increase power on/reset [boot] time.

This is expected because the app and patch code is now loaded to RAM at 1/4th the default speed.

> Is it doing something tricky like disabling the input/output driver on the SCL and SDA pins during boot?

No, nothing special. Do bleprofile_*NVRAM() work if you have the other I2C slaves connected but never accessed at all? Or you have only one (or two) of the three slave devices connected instead of all three?

0 Likes
Anonymous
Not applicable

I just tested i2cm_setSpeed() with 400KHz, 800KHz, and 1000KHz.  All three of my external I2C devices works at those speeds.  So the bus is capable of those speeds (assuming that it is correctly setting those clock speeds).

With the cgs 100KHz setting the NVRAM read and write work.  With the default [400KHz] cgs setting the read always fails, the write sometimes fails.  If I remove any one of the external I2C devices the read/writes work at the default [400KHz].

0 Likes
Anonymous
Not applicable

Hello jpwerre,

What is the total capacitive load on the 4 external I2C devices including PCB Traces?

Can you calculate this for us?

You may be exceeding the capacitive load of the device.

I am researching the capacitive load of the BCM20732S and will get back to you.

If you are able to send the capacitive load from your end, that will help us.

FYI: We use the LTC4313CMS8, an I2C Expander, on our designs when we add I2C Loads

We will update you when we have the BCM20732S capacitive load data.

Thanks

JT

Anonymous
Not applicable

Hello jpwerre,

Did you get your I2C issues fixed?

JT

0 Likes
Anonymous
Not applicable

I just lowered all of the I2C speeds to 100KHz.

0 Likes
Anonymous
Not applicable

Hello jpwere,

So you were able to communicate with all 3 I2C devices on the bus?

Sorry that I assumed that you had 4 I2C devices on the bus and this may have been excessive loading.

Good to you hear you got it to work.

Thanks.

JT

0 Likes