ESP32 S3 Sensor PCB
Fix capacitor placement and fine-pitch/USB routing blockers; apply routing repairs.
Independently check connectivity, placement and DRC after repairs.
Resolve microphone identity and C14 decoupling with verified physical facts (blocked pending microphone identification).
Layout Repair Resume Notes
6z. Lifecycle wait returned interrupted; a subsequent completion notification arrived, but its report has NOT been retrieved or verified because ACUs ran out. Do not assume no changes, or that repairs succeeded: retrieve persisted executor report and inspect live checks first.pcb-cleanup-and-routing-verification. Board was not fabrication ready. USB breakout was blocked by foreign copper; prior autoro...Waiting for input
Table
| Function | ESP32-S3 GPIO | Net |
|---|---|---|
| Native USB Dā / D+ | 19 / 20 | USB_DN / USB_DP |
| IIS3DWB CS / SCK / MOSI / MISO | 10 / 12 / 11 / 13 | SPI_CS_ACC / SPI_SCK / SPI_MOSI / SPI_MISO |
| INMP441 BCLK / WS / SD input | 5 / 6 / 4 | I2S_BCLK / I2S_WS / I2S_DIN |
| Battery ADC | 1 (ADC1_CH0) | BAT_ADC |
| BOOT | 0 | ESP_BOOT |
| RESET | EN | ESP_EN |
idf.py set-target esp32s3main/main.c:C
#include <stdio.h> #include "freertos/FreeRTOS.h" #include "freertos/task.h" #include "driver/spi_master.h" #include "driver/i2s_std.h" #include "esp_adc/adc_oneshot.h" #include "esp_log.h" #define PIN_ACC_CS 10 #define PIN_SPI_SCK 12 #define PIN_SPI_MOSI 11 #define PIN_SPI_MISO 13 #define PIN_I2S_BCLK 5 #define PIN_I2S_WS 6 #define PIN_I2S_DIN 4 #define BAT_ADC_CH ADC_CHANNEL_0 static const char *TAG = "sensor"; static spi_device_handle_t acc; static i2s_chan_handle_t i2s_rx; static adc_oneshot_unit_handle_t adc1; static esp_err_t iis3dwb_read(uint8_t reg, uint8_t *value) { spi_transaction_t t = { .length = 16 }; uint8_t tx[2] = { (uint8_t)(reg | 0x80), 0 }, rx[2] = {0}; t.tx_buffer = tx; t.rx_buffer = rx; esp_err_t e = spi_device_transmit(acc, &t); if (e == ESP_OK) *value = rx[1]; return e; } void app_main(void) { spi_bus_config_t bus = { .sclk_io_num=PIN_SPI_SCK, .mosi_io_num=PIN_SPI_MOSI, .miso_io_num=PIN_SPI_MISO, .quadwp_io_num=-1, .quadhd_io_num=-1 }; ESP_ERROR_CHECK(spi_bus_initialize(SPI2_HOST, &bus, SPI_DMA_CH_AUTO)); spi_device_interface_config_t dev = { .clock_speed_hz=10000000, .mode=3, .spics_io_num=PIN_ACC_CS, .queue_size=2 }; ESP_ERROR_CHECK(spi_bus_add_device(SPI2_HOST, &dev, &acc)); i2s_chan_config_t cc = I2S_CHANNEL_DEFAULT_CONFIG(I2S_NUM_0, I2S_ROLE_MASTER); ESP_ERROR_CHECK(i2s_new_channel(&cc, NULL, &i2s_rx)); i2s_std_config_t sc = { .clk_cfg = I2S_STD_CLK_DEFAULT_CONFIG(48000), .slot_cfg = I2S_STD_PHILIPS_SLOT_DEFAULT_CONFIG(I2S_DATA_BIT_WIDTH_32BIT, I2S_SLOT_MODE_STEREO), .gpio_cfg = { .mclk=I2S_GPIO_UNUSED, .bclk=PIN_I2S_BCLK, .ws=PIN_I2S_WS, .dout=I2S_GPIO_UNUSED, .din=PIN_I2S_DIN, .invert_flags={0} } }; ESP_ERROR_CHECK(i2s_channel_init_std_mode(i2s_rx, &sc)); ESP_ERROR_CHECK(i2s_channel_enable(i2s_rx)); adc_oneshot_unit_init_cfg_t ac = { .unit_id=ADC_UNIT_1 }; ESP_ERROR_CHECK(adc_oneshot_new_unit(&ac, &adc1)); adc_oneshot_chan_cfg_t ach = { .atten=ADC_ATTEN_DB_12, .bitwidth=ADC_BITWIDTH_DEFAULT }; ESP_ERROR_CHECK(adc_oneshot_config_channel(adc1, BAT_ADC_CH, &ach)); uint8_t who = 0; ESP_ERROR_CHECK(iis3dwb_read(0x0F, &who)); ESP_LOGI(TAG, "IIS3DWB WHO_AM_I=0x%02X", who); while (1) { int raw = 0; adc_oneshot_read(adc1, BAT_ADC_CH, &raw); // Calibrate ADC in production. Divider ratio: (1M+330k)/330k = 4.0303. ESP_LOGI(TAG, "battery ADC raw=%d", raw); vTaskDelay(pdMS_TO_TICKS(1000)); } }
WHO_AM_I (expected value from current ST driver/datasheet).Final GPIO mapping
Toolchain
Minimal compilable starter
Startup sequence
Notes