Hi,
I’m currently running Zephyr 3.5.0 on Adafruit ESP32-S3 Feather boards (Feather and TFT Feather) using board xiao_esp32s3.
The ESP32-S3 Feather boards use the ESP32-S3 Mini-1 SoC. Everything seems to be fine, although the xiao_esp32s3 devicetree doesn’t have the Feather Connector definition, I can access the GPIOs directly.
I have submitted a request to Zephyr for adding these boards to the repo.
The ESP32-S3 Feather boards have a I2C STEMMA connector, power to which is controlled be setting a I2C_POWER GPIO high so that the I2C STEMMA gets used instead of the I2C pins on the Feather boards.
On the Adafruit ESP32-S3 TFT board with OLED SSD1306 connected via the I2C STEMMA, I’m setting the I2C_POWER GPIO pin correctly but I’m not able to get the OLED display to power.
Does anyone have experience running Zephyr on these Adafruit ESP32-S3 Feather boards?
In Arduino, the STEMMA I2C_POWER GPIO is done in “Setup” by configuring the GPIO as an output pin and setting it High.
`
pinMode(TFT_I2C_POWER, OUTPUT);
digitalWrite(TFT_I2C_POWER, HIGH);
Any help would be greatly appreciated. Thank you.
I’m setting the I2C_POWER GPIO in Zephyr as below.
Is this correct or do I need to set the GPIO before the I2C drivers are initialized? If so, How?
snippet from esp32-s3 overlay:
/ {
chosen {
zephyr,display = &ssd1306;
};
````Preformatted text`
leds {
compatible = "gpio-leds";
led0: led_0 {
gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
label = "BUILTIN LED";
};
ext_led1: led1 {
gpios = <&gpio0 17 GPIO_ACTIVE_HIGH>;
label = "LED 1";
};
ext_led2: led2 {
gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
label = "LED 2";
};
tftpower_i2c: tftpower_i2c_0 {
gpios = <&gpio0 21 (GPIO_ACTIVE_HIGH)>;
};
};
aliases {
led1 = &ext_led1;
led2 = &ext_led2;
tftpower = &tftpower_i2c; //TFT_I2C_POWER
};
};
snippet from I2C_POWER init:
// set TFT I2C POWER high
if (!gpio_is_ready_dt(&tftpower)) {
LOG_INF("Error: tftpower %s is not ready; ignoring it\n",tftpower.port->name);
}
if (gpio_pin_configure_dt(&tftpower, GPIO_OUTPUT) < 0) {
LOG_INF("Error: failed to configure tftpower device %s pin %d\n",tftpower.port->name, tftpower.pin);
} else
LOG_INF("Set up TFT POWER at %s pin %d\n", tftpower.port->name, tftpower.pin);
gpio_pin_set_dt(&tftpower, 1);