Skip to content

Play PWM audio on ESP32-S3 boards - #11672

Open
mikeysklar wants to merge 1 commit into
adafruit:mainfrom
mikeysklar:espressif-audiopwmio-esp32s3
Open

mikeysklar wants to merge 1 commit into
adafruit:mainfrom
mikeysklar:espressif-audiopwmio-esp32s3

Conversation

@mikeysklar

Copy link
Copy Markdown
Collaborator

What

Turns on audiopwmio for ESP32-S3 boards, using the same driver as the S2.

Why

@dhalbert asked for the S3 as a follow-up to @tyeth's driver in #11663.

Part of #10349.

Size

board firmware.bin change free after
espressif_esp32s3_lcd_ev_v1.5, ru (tightest) +3,088 B about 64 KB

Boards that opt out

board why build
seeed_xiao_esp32_s3_trmnl_diy_kit turns off audiocore, link fails otherwise unchanged
adafruit_esp32s3_camera removed its audio on purpose, would grow 60 KB unchanged

Testing

Feather ESP32-S3 4MB/2MB with a MAX98306 amp, CircuitPython 11.0.0-alpha.2 with #11663, Ubuntu 26.04 host.

440 Hz tone and a MIDI melody play correctly.

load during playback, 10 trials MIDI play time (6.728 s baseline)
ESP-NOW flood 6.73 s
adafruit_requests 2 MB stream 6.735 s
adafruit_requests small GETs median 6.87 s, max 7.33 s
WiFi scans 7.29 s
saving files to CIRCUITPY median 12.27 s
nvm writes about 23.8 s

I2S PDM output for the S3 is a separate, later driver.

Written with help from Claude Code. I ran the builds and hardware tests myself.

🤖 Generated with Claude Code

Turn on LEDC + GPTimer PWM audio by default on the S3, as on the S2.
The two S3 boards that remove audiocore or I2S audio opt out, so their
builds are unchanged.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant