Power Management Subsystem Design


Please create a new modular section on the schematic for the main microcontroller and the AFE inter-board connector. Implement the following:
  1. Microcontroller Core: Add an ESP32-S3R8 IC. Connect all VDD, VDDA, and VDD3P3_RTC pins to the '3V3_DIGITAL' net. Connect all GND and exposed pad pins to 'GND'.
  2. MCU Decoupling: Place a 0.1uF C0G ceramic capacitor on every VDD/VDDA pin to GND. Add one 10uF bulk capacitor on the 3V3_DIGITAL rail near the MCU.
  3. Auto-Program Circuit: Add two tactile push buttons — one connecting EN to GND (labeled SW_RESET), one connecting GPIO0 to GND (labeled SW_BOOT). Add a 10kΩ pull-up resistor from EN to 3V3_DIGITAL. Add a 1uF capacitor from EN to GND for power-on reset delay.
  4. Strapping pins: Add 10kΩ pull-up resistors on GPIO45 and GPIO46 to 3V3_DIGITAL. GPIO0 is handled by SW_BOOT above.
  5. Inter-Board Connector: Add a 2x6 2.54mm pitch male pin header labeled 'J_AFE_BRIDGE' with the following net assignments:
  • Pin 1: 5V0_ANALOG
  • Pin 2: AGND (label as AGND — this is a separate analog ground net, not connected to GND on this board)
  • Pin 3: 3V3_DIGITAL
  • Pin 4: GND
  • Pin 5: SPI2_MOSI (connect to ESP32 GPIO35)
  • Pin 6: SPI2_MISO (connect to ESP32 GPIO37)
  • Pin 7: SPI2_SCLK (connect to ESP32 GPIO36)
  • Pin 8: SPI2_CS (connect to ESP32 GPIO34)
  • Pin 9: AFE_DRDY (connect to ESP32 GPIO33)
  • Pin 10: AFE_START (connect to ESP32 GPIO4)
  • Pin 11: AFE_PWDN (connect to ESP32 GPIO6)
  • Pin 12: AFE_RESET (connect to ESP32 GPIO5)
Add a schematic note on AGND: "AGND connects to DGND at single star point on AFE board only."
I’ll add the ESP32-S3 core and AFE bridge as a new schematic section, wire the specified rails/GPIOs, then run ERC on the new work.
Note: GPIO45/GPIO46 pull-ups conflict with ESP32-S3 boot-strap guidance, where those pins are normally held LOW/floating for reliable boot/download. I’ll implement your requested pull-ups, but this should be reviewed before fabrication.
Implemented the new ESP32-S3R8 MCU + AFE bridge schematic section, including per-power-pin decoupling, reset/boot controls, strap resistors, and the 2x6 J_AFE_BRIDGE pinout. I also created firmware starter documentation: firmware-starter-esp32-s3r8.
Open items:
  • ERC still flags 12 floating ESP32 bare-chip support pins: RF antenna input, main crystal pins, and flash/PSRAM SPI pins; these require the RF/crystal/flash subsystem before the bare ESP32-S3R8 can boot.
  • GPIO45/GPIO46 pull-ups were implemented as requested, but they conflict with ESP32-S3 boot-strapping guidance and should be reviewed.
Suggested next steps:
  1. Add the ESP32-S3 RF antenna/matching network, 40 MHz crystal, and external flash support.
  2. Revisit GPIO45/GPIO46 strap polarity before fabrication.
  3. Place and route the MCU/AFE connector section with short decoupling paths and clear AGND isolation.
Add RF crystal
Fix strapping pins
Run full review
Start PCB placement
Update firmware file

Firmware Starter — ESP32-S3R8
Platform & Toolchain
  • MCU: ESP32-S3R8
  • Framework: Arduino via PlatformIO
  • Board target: esp32-s3-devkitc-1 as a practical starting point for ESP32-S3 designs
Pin Mapping

Table


FunctionESP32 GPIOSchematic NetDirectionNotes
SPI MOSI to AFEGPIO35SPI2_MOSIOutputJ_AFE_BRIDGE pin 5
SPI MISO from AFEGPIO37SPI2_MISOInputJ_AFE_BRIDGE pin 6
SPI SCLK to AFEGPIO36SPI2_SCLKOutputJ_AFE_BRIDGE pin 7
SPI CS to AFEGPIO34SPI2_CSOutputJ_AFE_BRIDGE pin 8
AFE data-readyGPIO33AFE_DRDYInputJ_AFE_BRIDGE pin 9
AFE startGPIO4AFE_STARTOutputJ_AFE_BRIDGE pin 10
AFE power-downGPIO6AFE_PWDNOutputJ_AFE_BRIDGE pin 11
AFE resetGPIO5AFE_RESETOutputJ_AFE_BRIDGE pin 12
Boot buttonGPIO0ESP32_GPIO0_BOOTInputButton pulls LOW
Reset/enableCHIP_PU/ENESP32_ENInput10k pull-up, 1uF delay cap, reset switch to GND
Hardware note: GPIO45/GPIO46 currently have 10k pull-ups per schematic request, but ESP32-S3 boot strapping normally expects GPIO45 LOW and GPIO46 LOW/floating. Review before fabrication.
platformio.ini

Ini


[env:esp32-s3-devkitc-1]
platform = espressif32
board = esp32-s3-devkitc-1
framework = arduino
monitor_speed = 115200
board_build.flash_mode = qio
board_build.f_cpu = 240000000L
src/main.cpp

Cpp


#include <Arduino.h>
#include <SPI.h>

#define PIN_SPI2_MOSI   35
#define PIN_SPI2_MISO   37
#define PIN_SPI2_SCLK   36
#define PIN_SPI2_CS     34
#define PIN_AFE_DRDY    33
#define PIN_AFE_START   4
#define PIN_AFE_PWDN    6
#define PIN_AFE_RESET   5
#define PIN_BOOT        0

SPIClass afeSPI(FSPI);

static void afeResetPulse() {
  digitalWrite(PIN_AFE_RESET, LOW);
  delay(10);
  digitalWrite(PIN_AFE_RESET, HIGH);
  delay(10);
}

static uint8_t afeTransferByte(uint8_t value) {
  digitalWrite(PIN_SPI2_CS, LOW);
  uint8_t rx = afeSPI.transfer(value);
  digitalWrite(PIN_SPI2_CS, HIGH);
  return rx;
}

void setup() {
  Serial.begin(115200);
  delay(200);
  Serial.println("Neuroclear ESP32-S3R8 firmware starter");

  pinMode(PIN_SPI2_CS, OUTPUT);
  digitalWrite(PIN_SPI2_CS, HIGH);

  pinMode(PIN_AFE_START, OUTPUT);
  pinMode(PIN_AFE_PWDN, OUTPUT);
  pinMode(PIN_AFE_RESET, OUTPUT);
  pinMode(PIN_AFE_DRDY, INPUT);
  pinMode(PIN_BOOT, INPUT_PULLUP);

  digitalWrite(PIN_AFE_PWDN, HIGH);   // keep AFE powered/enabled; confirm polarity with AFE datasheet
  digitalWrite(PIN_AFE_START, LOW);
  digitalWrite(PIN_AFE_RESET, HIGH);

  afeSPI.begin(PIN_SPI2_SCLK, PIN_SPI2_MISO, PIN_SPI2_MOSI, PIN_SPI2_CS);
  afeResetPulse();

  Serial.println("AFE SPI interface initialized.");
}

void loop() {
  if (digitalRead(PIN_AFE_DRDY) == HIGH) {
    uint8_t status = afeTransferByte(0x00);  // TODO: replace with real AFE command/register transaction
    Serial.printf("AFE DRDY, status byte: 0x%02X\n", status);
  }

  static uint32_t lastStartPulse = 0;
  if (millis() - lastStartPulse > 1000) {
    lastStartPulse = millis();
    digitalWrite(PIN_AFE_START, HIGH);
    delayMicroseconds(10);
    digitalWrite(PIN_AFE_START, LOW);
  }
}
Build & Flash

Bash


pio run
pio run -t upload
pio device monitor
To enter bootloader mode manually: hold SW_BOOT, tap SW_RESET, then release SW_BOOT.
  • Platform & Toolchain

  • Pin Mapping

  • `platformio.ini`

  • `src/main.cpp`

  • Build & Flash