This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2541 I2C Master Clock Rate Calculation

Other Parts Discussed in Thread: CC2541


The CC254X User's Guide gives example clock rates for an I2C master but doesn't provide a formula for calculating rates outside of the table. Does anyone know how the three clock rate bits in the I2CCFG register affect the clock rates? Here's a copy of Table 20-6 'Clock Rates Defined at 32MHz' in section 20.1.5:

CR2 CR1 CR0 Bit Frequency Clock (kHz) Divided by
0    0   0           123                 256
0    0   1           144                 244
0    1   0           165                 192
0    1   1           197                 160
1    0   0           33                  960
1    0   1           267                 120
1    1   0           533                 60
1    1   1           Reserved            N/A

  • I don't understand your question - there are no clock rates outside of the table: 2 ^ 3 = 8 ... and all 8 permutations are listed in the table.

  • Dirty Harry said:

    I don't understand your question - there are no clock rates outside of the table: 2 ^ 3 = 8 ... and all 8 permutations are listed in the table.

    You're correct. I guess my confusion was with the fact that they only defined non-standard i2c rates.

    Thank you for your response!

    -Rob

  • What are the standard I2C rates?

    I would have imagined that there would not be a standard rate becuase it is a synchronous bus (like SPI - how can you define a standard bit rate for SPI?). Obviously, an asynchronous bus like UART has standard rates, like 115.2 kBaud, etc.

  • See the different revisions of i2c here:

    http://en.wikipedia.org/wiki/I%C2%B2C

    Sure, as a master I provide the clock but there are typical rates that are universally used (100-kHz and 400-kHz are the two that come to mind) but not supported by the CC2541.

    Anyways, thank you for your help.

  • Hello,

    Sorry for opening this thread after two long years. But I have the same question. If I need 100kHz or 400kHz clock frequency at I2C SCL, how can I configure it in CC2541?

    I'm trying to communicate with accelerometer connected to I2C pins but in debugger, the code always gets stuck in I2C_STRT(); What configuration would prevent this from happening. Can provide more info if necessary.