Skip to content

machine.I2S mck= is silently ignored on the esp32 port; four board configs pass one #24

Description

@bdbarnett

Found while choosing a board for the instrument spike (schematic survey, 2026-09-04).

cmods/micropython/ports/esp32/machine_i2s.c:378 hardcodes .mclk = I2S_GPIO_UNUSED with no path that substitutes a user pin, so the mck= argument extmod/machine_i2s.c accepts is accepted and discarded on every esp32-family target, S3 and P4 alike. No error, no warning.

Four of our board configs pass one as though it worked:

  • pydevices/board_configs/busdisplay/spi/t-embed/board_peripherals.py:84
  • pydevices/board_configs/busdisplay/spi/m5stack-cores3/board_peripherals.py:75
  • pydevices/board_configs/fbdisplay/m5stack_tab5_st7123/board_peripherals.py:62,104
  • pydevices/board_configs/fbdisplay/m5stack_tab5_ili9881c/board_peripherals.py:62,104

We already know the workaround and wrote it down once: board_configs/fbdisplay/esp32-p4-wifi6-touch-lcd-4b/board_peripherals.py:20 says "Firmware has no I2S mck= — PWM supplies MCLK". That note never propagated to the other four.

Anything with an ES8311, ES7210 or AW88298 needs a master clock from somewhere, so these configs are either silently working via some other path or quietly wrong — a bench check on a CoreS3 or Tab5 decides which. Parts that self-clock (MAX98357A, UDA1334A, PCM5102A, NS4168) are unaffected, which is why the spike shopping list favours them.

Two candidate fixes, not exclusive: drop the dead argument and carry the PWM-MCLK trick in the configs that need it; and/or make the port honour mck= and send that upstream, since silently discarding a documented argument is an upstream bug in its own right.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions