I2C Master, Fast-Mode Plus Supported?

p-rimes
Posts: 89
Joined: Thu Jun 08, 2017 6:20 pm

I2C Master, Fast-Mode Plus Supported?

Postby p-rimes » Wed Sep 27, 2017 1:25 am

Do the I2C peripherals on the ESP32 support I2C Fast-Mode Plus (FM+)? This can run up to 1mbit/s (intead of 400kbit/s); my I2C slaves do support the FM+ spec.

Is there a maximum supported clock rate for the I2C master peripheral? I find that I am able to communicate successfully at 1MHz (some clock rounding yields 800khz... but well beyond 400khz), and I can get the clock to max at ~ 2.4MHz if I just keep increasing the clk speed.

However I think that I2C FM+ support is something that requires more than just clock speed -- current driving capacity of 20mA and adjusted clock timings, at least -- so does the ESP32 officially support that, or is 400khz (regular "fast-mode") the recommended maximum?

ESP_Sprite
Posts: 9757
Joined: Thu Nov 26, 2015 4:08 am

Re: I2C Master, Fast-Mode Plus Supported?

Postby ESP_Sprite » Wed Sep 27, 2017 2:56 am

I think the ESP32s outputs are now specified tho have a drive strength of 20mA by default, so that should satisfy the drive strength requirement. As far as timings go, all I can see is that they need to be able to accept the 1uS rise/fall time that low-speed I2C has, right? If this is the case, we should be able to support FM+ by just changing the I2C clock speed to 1MHz.

p-rimes
Posts: 89
Joined: Thu Jun 08, 2017 6:20 pm

Re: I2C Master, Fast-Mode Plus Supported?

Postby p-rimes » Wed Sep 27, 2017 4:57 am

I am no expert (hey, I tried it, and it worked!), but I was using this document as a reference (specifically Table 9 and Table 10, starting on page 47):
https://www.nxp.com/docs/en/user-guide/UM10204.pdf
And from Section 5.2
Fm+ devices also offer increased drive current over Fast- or Standard-mode devices allowing them to drive longer and/or more heavily loaded buses so that bus buffers do not need to be used.

The drivers in Fast-mode Plus parts are strong enough to satisfy the Fast-mode Plus timing specification with the same 400 pF load as Standard-mode parts. To be backward compatible with Standard-mode, they are also tolerant of the 1 μs rise time of Standard-mode parts. In applications where only Fast-mode Plus parts are present, the high drive strength and tolerance for slow rise and fall times allow the use of larger bus capacitance as long as set-up, minimum LOW time and minimum HIGH time for Fast-mode Plus are all satisfied and the fall time and rise time do not exceed the 300 ns tf and 1 μs tr specifications of Standard-mode.
So, I think if it uses those timings with clk_speed = 1000000, and has that 20mA drive strength, then it should be compliant with the spec? That's great news. Thanks!

Who is online

Users browsing this forum: No registered users and 181 guests