Skip to content

i2c: values for tlow lower than the minimum values specified in the I2C specification #305

@fivdi

Description

@fivdi

Per table 10 on page 48 of the I2C-bus specification and user manual the minimum values for tLOW and tHIGH are as follows:

Symbol Parameter Standard-mode Fast-mode Fast-mode Plus Unit
tLOW LOW period of the SCL clock 4.7 1.3 0.5 μs
tHIGH HIGH period of the SCL clock 4.0 0.6 0.26 μs

With pico-sdk v1.1.0, the actual values used for tLOW are lower than the minimum values specified in the specification (1):

Symbol Parameter Standard-mode Fast-mode Fast-mode Plus Unit
tLOW LOW period of the SCL clock 4.01 1.0081 0.41 μs
tHIGH HIGH period of the SCL clock 6.0 1.496 0.6 μs

The corresponding values written to the IC_FS_SCL_LCNT and IC_FS_SCL_HCNT registers are:

Symbol Register Standard-mode Fast-mode Fast-mode Plus
lcnt IC_FS_SCL_LCNT 500 126 50
hcnt IC_FS_SCL_HCNT 750 187 75

This isn't resulting in any issues with the I2C devices that I'm using with pico-sdk but it would probably be worth changing. Perhaps the values written to lcnt should have been written to hcnt and vice versa? See here.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions