ESP32-S3 LED Matrix Board


I’m sorry—you should not have been left waiting. I cannot view engineering’s response or ticket status from the internal feedback submission, so I have no confirmed outcome to report.
The routing bug remains the blocker recorded here: the existing auto-route job is stuck as outOfCredit, while attempting to resume it returns an internal error. Please escalate it through Contact Support, including:
  • Project: AMOLED Bandido
  • Failed job ID: auto-layout-a3644dbe-f17a-4b09-8b75-b4fd5c3f162f
  • Symptom: starting says a job already exists; resuming produces ResumeInternalError
  • Impact: 33 airwires remain, preventing the final STEP export
The project itself is intact; this is a routing-job/platform issue rather than lost design data.
Create a concise support-ticket summary with the job ID, errors, and project impact.
Subject: Auto-route job stuck and cannot resume — AMOLED Bandido
Project: AMOLED Bandido
URL: /bradbitler/amoled-bandido
Job ID: auto-layout-a3644dbe-f17a-4b09-8b75-b4fd5c3f162f
Issue: The auto-route job is stuck with status outOfCredit. Starting a new job fails because the existing job is still active. Resuming it returns FiberFailure / ResumeInternalError: Unable to resume auto-layout job.
Impact: The PCB has 33 remaining airwires. Other blocking DRC checks are clear, the 46 × 60 mm outline is closed, and component 3D models are present. The failure prevents routing completion, final DRC validation, and STEP export.
Please reset, repair, or make the existing routing job resumable without discarding completed routing.
Prepare support ticket
Document routing blocker
Export current STEP

Firmware Starter
This ESP-IDF 5.x starter is grounded in the live schematic. It compiles using ESP-IDF built-in drivers, initializes GPIO, I2C, interrupts, and I2S, probes every documented I2C address, and leaves only supplier-controlled AMOLED bus roles/commands disabled.
Live GPIO map

Table


GPIOLive schematic function
0BOOT only
1Side button wake + BQ25622 QON
2BQ25622 INT_N
3BMI270 INT1 wake
4CST820 touch interrupt wake
5CST820 reset
6I2S BCLK
7I2S LRCLK
8I2C SDA
9I2C SCL
10AMOLED contact 17, DCX; final QSPI role supplier-controlled
11AMOLED contact 16, SDI/RDX
12AMOLED contact 18, WRX/SCL; final QSPI role supplier-controlled
13AMOLED contact 20, D(0)/SIO2
14AMOLED contact 19, D(1)/SIO3
15AMOLED CSX
16AMOLED TE
17AMOLED reset
18I2S DOUT to ES8311
19Native USB D-
20Native USB D+
21I2S DIN from ES8311
43PAM8302 SD/pop control
44Audio TPS22918 enable
47I2S MCLK
48Display TPS22918 enable
GPIO35–42 and GPIO45/46 are intentionally unavailable. GPIO0 is never used as a normal load.
Files
CMakeLists.txt

Cmake


cmake_minimum_required(VERSION 3.16)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(amoled_bandido)
main/CMakeLists.txt

Cmake


idf_component_register(SRCS "main.c" INCLUDE_DIRS ".")
sdkconfig.defaults

Ini


CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG=y
CONFIG_ESP_CONSOLE_SECONDARY_NONE=y
CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ_240=y
CONFIG_SPIRAM=y
CONFIG_SPIRAM_MODE_OCT=y
CONFIG_SPIRAM_SPEED_80M=y
main/main.c

C


#include <stdbool.h>
#include <stdint.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "driver/gpio.h"
#include "driver/i2c.h"
#include "driver/i2s_std.h"
#include "driver/spi_master.h"
#include "esp_err.h"
#include "esp_check.h"
#include "esp_log.h"

static const char *TAG = "bandido";

#define PIN_SIDE_BUTTON       GPIO_NUM_1
#define PIN_CHARGER_INT_N     GPIO_NUM_2
#define PIN_IMU_INT1          GPIO_NUM_3
#define PIN_TOUCH_INT_N       GPIO_NUM_4
#define PIN_TOUCH_RST_N       GPIO_NUM_5
#define PIN_I2S_BCLK          GPIO_NUM_6
#define PIN_I2S_LRCLK         GPIO_NUM_7
#define PIN_I2C_SDA           GPIO_NUM_8
#define PIN_I2C_SCL           GPIO_NUM_9
#define PIN_DISP_CONTACT17    GPIO_NUM_10
#define PIN_DISP_CONTACT16    GPIO_NUM_11
#define PIN_DISP_CONTACT18    GPIO_NUM_12
#define PIN_DISP_SIO2         GPIO_NUM_13
#define PIN_DISP_SIO3         GPIO_NUM_14
#define PIN_DISP_CS_N         GPIO_NUM_15
#define PIN_DISP_TE           GPIO_NUM_16
#define PIN_DISP_RST_N        GPIO_NUM_17
#define PIN_I2S_DOUT          GPIO_NUM_18
#define PIN_I2S_DIN           GPIO_NUM_21
#define PIN_AMP_SD            GPIO_NUM_43
#define PIN_AUDIO_PWR_EN      GPIO_NUM_44
#define PIN_I2S_MCLK          GPIO_NUM_47
#define PIN_DISP_PWR_EN       GPIO_NUM_48

#define I2C_PORT I2C_NUM_0
#define I2C_HZ   400000

#define ADDR_ES8311     0x18
#define ADDR_MAX17048   0x36
#define ADDR_DRV2605L   0x5A
#define ADDR_BMI270     0x68
#define ADDR_BQ25622    0x6B
/* CST820 address is intentionally absent until Tailor Pixels confirms it. */

static i2s_chan_handle_t tx_chan;
static i2s_chan_handle_t rx_chan;

static void IRAM_ATTR gpio_isr(void *arg)
{
    (void)arg; /* Replace with queue/task notification in the application. */
}

static esp_err_t gpio_init_all(void)
{
    const uint64_t outputs =
        (1ULL << PIN_TOUCH_RST_N) |
        (1ULL << PIN_DISP_RST_N) |
        (1ULL << PIN_AMP_SD) |
        (1ULL << PIN_AUDIO_PWR_EN) |
        (1ULL << PIN_DISP_PWR_EN);

    gpio_config_t out = {
        .pin_bit_mask = outputs,
        .mode = GPIO_MODE_OUTPUT,
        .pull_up_en = false,
        .pull_down_en = false,
        .intr_type = GPIO_INTR_DISABLE,
    };
    ESP_ERROR_CHECK(gpio_config(&out));

    /* Safe defaults: switched rails and amplifier off; resets asserted. */
    gpio_set_level(PIN_DISP_PWR_EN, 0);
    gpio_set_level(PIN_AUDIO_PWR_EN, 0);
    gpio_set_level(PIN_AMP_SD, 0);
    gpio_set_level(PIN_TOUCH_RST_N, 0);
    gpio_set_level(PIN_DISP_RST_N, 0);

    const uint64_t inputs =
        (1ULL << PIN_SIDE_BUTTON) |
        (1ULL << PIN_CHARGER_INT_N) |
        (1ULL << PIN_IMU_INT1) |
        (1ULL << PIN_TOUCH_INT_N) |
        (1ULL << PIN_DISP_TE);

    gpio_config_t in = {
        .pin_bit_mask = inputs,
        .mode = GPIO_MODE_INPUT,
        .pull_up_en = false, /* External pull-ups exist where defined. */
        .pull_down_en = false,
        .intr_type = GPIO_INTR_NEGEDGE,
    };
    ESP_ERROR_CHECK(gpio_config(&in));
    ESP_ERROR_CHECK(gpio_install_isr_service(0));
    gpio_isr_handler_add(PIN_SIDE_BUTTON, gpio_isr, NULL);
    gpio_isr_handler_add(PIN_CHARGER_INT_N, gpio_isr, NULL);
    gpio_isr_handler_add(PIN_IMU_INT1, gpio_isr, NULL);
    gpio_isr_handler_add(PIN_TOUCH_INT_N, gpio_isr, NULL);
    return ESP_OK;
}

static esp_err_t i2c_init_bus(void)
{
    i2c_config_t cfg = {
        .mode = I2C_MODE_MASTER,
        .sda_io_num = PIN_I2C_SDA,
        .scl_io_num = PIN_I2C_SCL,
        .sda_pullup_en = GPIO_PULLUP_DISABLE,
        .scl_pullup_en = GPIO_PULLUP_DISABLE,
        .master.clk_speed = I2C_HZ,
        .clk_flags = 0,
    };
    ESP_RETURN_ON_ERROR(i2c_param_config(I2C_PORT, &cfg), TAG, "i2c config");
    return i2c_driver_install(I2C_PORT, cfg.mode, 0, 0, 0);
}

static esp_err_t i2c_probe(uint8_t address)
{
    i2c_cmd_handle_t cmd = i2c_cmd_link_create();
    if (!cmd) return ESP_ERR_NO_MEM;
    i2c_master_start(cmd);
    i2c_master_write_byte(cmd, (address << 1) | I2C_MASTER_WRITE, true);
    i2c_master_stop(cmd);
    esp_err_t err = i2c_master_cmd_begin(I2C_PORT, cmd, pdMS_TO_TICKS(50));
    i2c_cmd_link_delete(cmd);
    return err;
}

static void probe_documented_i2c_devices(void)
{
    const struct { uint8_t addr; const char *name; } devices[] = {
        {ADDR_ES8311, "ES8311"},
        {ADDR_MAX17048, "MAX17048"},
        {ADDR_DRV2605L, "DRV2605L"},
        {ADDR_BMI270, "BMI270"},
        {ADDR_BQ25622, "BQ25622"},
    };
    for (size_t i = 0; i < sizeof(devices) / sizeof(devices[0]); ++i) {
        ESP_LOGI(TAG, "%s 0x%02X: %s", devices[i].name, devices[i].addr,
                 i2c_probe(devices[i].addr) == ESP_OK ? "ACK" : "NO ACK");
    }
}

static esp_err_t i2s_init_es8311_link(void)
{
    i2s_chan_config_t chan = I2S_CHANNEL_DEFAULT_CONFIG(I2S_NUM_0, I2S_ROLE_MASTER);
    ESP_RETURN_ON_ERROR(i2s_new_channel(&chan, &tx_chan, &rx_chan), TAG, "i2s channel");

    i2s_std_config_t cfg = {
        .clk_cfg = I2S_STD_CLK_DEFAULT_CONFIG(48000),
        .slot_cfg = I2S_STD_PHILIPS_SLOT_DEFAULT_CONFIG(
            I2S_DATA_BIT_WIDTH_16BIT, I2S_SLOT_MODE_MONO),
        .gpio_cfg = {
            .mclk = PIN_I2S_MCLK,
            .bclk = PIN_I2S_BCLK,
            .ws = PIN_I2S_LRCLK,
            .dout = PIN_I2S_DOUT,
            .din = PIN_I2S_DIN,
            .invert_flags = {0},
        },
    };
    ESP_RETURN_ON_ERROR(i2s_channel_init_std_mode(tx_chan, &cfg), TAG, "i2s tx init");
    ESP_RETURN_ON_ERROR(i2s_channel_init_std_mode(rx_chan, &cfg), TAG, "i2s rx init");
    return ESP_OK;
}

/*
 * Supplier-controlled display TODO:
 * - identify which of contact 17/GPIO10 and contact 18/GPIO12 is QSPI CLK
 *   and which is SIO1 (or provide a different role table),
 * - confirm interface-select state and initialization sequence.
 * No unsupported mapping is compiled into the product.
 */
static esp_err_t display_qspi_init_after_supplier_confirmation(
    gpio_num_t confirmed_clk, gpio_num_t confirmed_sio1)
{
    if (!((confirmed_clk == PIN_DISP_CONTACT17 && confirmed_sio1 == PIN_DISP_CONTACT18) ||
          (confirmed_clk == PIN_DISP_CONTACT18 && confirmed_sio1 == PIN_DISP_CONTACT17))) {
        return ESP_ERR_INVALID_ARG;
    }

    spi_bus_config_t bus = {
        .sclk_io_num = confirmed_clk,
        .data0_io_num = PIN_DISP_CONTACT16,
        .data1_io_num = confirmed_sio1,
        .data2_io_num = PIN_DISP_SIO2,
        .data3_io_num = PIN_DISP_SIO3,
        .max_transfer_sz = 368 * 448 * 2,
    };
    return spi_bus_initialize(SPI2_HOST, &bus, SPI_DMA_CH_AUTO);
}

static void rails_sequence_audio_on(void)
{
    gpio_set_level(PIN_AMP_SD, 0);
    gpio_set_level(PIN_AUDIO_PWR_EN, 1);
    vTaskDelay(pdMS_TO_TICKS(10)); /* PAM8302 recommended delayed SD release. */
    gpio_set_level(PIN_AMP_SD, 1);
}

void app_main(void)
{
    ESP_ERROR_CHECK(gpio_init_all());
    ESP_ERROR_CHECK(i2c_init_bus());
    probe_documented_i2c_devices();
    ESP_ERROR_CHECK(i2s_init_es8311_link());

    /* Keep display off until supplier mapping and init data are loaded. */
    gpio_set_level(PIN_DISP_PWR_EN, 0);

    /* Audio rail can now be enabled before the codec driver configures ES8311. */
    rails_sequence_audio_on();

    ESP_LOGI(TAG, "Hardware interfaces initialized; native USB uses USB Serial/JTAG console.");
    ESP_LOGI(TAG, "Load Bosch BMI270 SensorAPI configuration, DRV2605L LRA profile,");
    ESP_LOGI(TAG, "BQ25622 charge policy, MAX17048 policy, and ES8311 codec registers in app components.");

    while (true) vTaskDelay(pdMS_TO_TICKS(1000));
}
Component-driver integration
  • BMI270: use Bosch SensorAPI and load Bosch's official BMI270 configuration blob before enabling INT1. The live hardware address is 0x68.
  • DRV2605L: address 0x5A. Select/calibrate the actual LRA profile before waveform playback; actuator voltage and resonance are product configuration, not guessed constants.
  • ES8311: address 0x18. Use Espressif esp_codec_dev or the official ES8311 example to apply codec registers after I2S clocks are present. The physical link is already initialized above.
  • BQ25622: address 0x6B. Program a qualified battery charge current; the hardware USB ILIM is nominally 500 mA.
  • MAX17048: address 0x36.
  • CST820/CO5300: only the supplier-controlled address, contact roles, interface selection, timing, and command sequence remain TODO.
Native USB assumptions
GPIO19/20 are dedicated to ESP32-S3 native USB through the schematic's ESD array and 22-ohm series resistors. The starter uses USB Serial/JTAG as the console; BOOT GPIO0 and ESP_EN remain physically accessible for recovery.
  • Live GPIO map

  • Files

  • `CMakeLists.txt`

  • `main/CMakeLists.txt`

  • `sdkconfig.defaults`

  • `main/main.c`

  • Component-driver integration

  • Native USB assumptions