[riot-commits] [RIOT-OS/RIOT] b1bd7b: cpu/esp_common: Support disabling I2C clock stretc...

benpicco noreply at github.com
Mon May 3 11:32:15 CEST 2021


  Branch: refs/heads/master
  Home:   https://github.com/RIOT-OS/RIOT
  Commit: b1bd7bed67299bb6f5e434a76cf5ebe90891a805
      https://github.com/RIOT-OS/RIOT/commit/b1bd7bed67299bb6f5e434a76cf5ebe90891a805
  Author: iosabi <iosabi at protonmail.com>
  Date:   2021-04-26 (Mon, 26 Apr 2021)

  Changed paths:
    M cpu/esp_common/periph/i2c_sw.c

  Log Message:
  -----------
  cpu/esp_common: Support disabling I2C clock stretching in ESP8266

In I2C, clock stretching occurs when the controller stops driving SCL
down but the peripheral continues to drive SCL down until the value of
SDA that is expected to be set by the peripheral is ready. This allows a
peripheral to communicate at a high speed but introduce a delay in the
response (like an ACK or read) in some specific situations. Not all I2C
peripherals require I2C stretching, and in many cases SCL is only an
input to these peripherals.

Clock stretching is the only situation where a peripheral may drive down
SCL, which technically makes SCL an open-drain with a pull-up like SDA.
However, if clock stretching is not needed, SCL can be configured as an
output removing the need for a pull-up and specially, allowing to use
as SCL GPIO pins that otherwise have a pull-down connected. In
particular, GPIO15 in the ESP8266 requires an external pull-down during
boot for the ESP8266 to boot from the flash.

This patch allows a board to define `I2C_CLOCK_STRETCH` to 0 to disable
clock stretching and allowing to use GPIO15 as SCL.


  Commit: 0c28ec57f2cc2503028d447e944ab1065753cc40
      https://github.com/RIOT-OS/RIOT/commit/0c28ec57f2cc2503028d447e944ab1065753cc40
  Author: benpicco <benjamin.valentin at ml-pa.com>
  Date:   2021-05-03 (Mon, 03 May 2021)

  Changed paths:
    M cpu/esp_common/periph/i2c_sw.c

  Log Message:
  -----------
  Merge pull request #16386 from iosabi/esp8266_i2c

cpu/esp_common: Support disabling I2C clock stretching in ESP8266


Compare: https://github.com/RIOT-OS/RIOT/compare/2b6454a2d7ef...0c28ec57f2cc


More information about the commits mailing list