Skip to content

Fix ESP32-P4 pin mapping in SD_MMC example comment#12431

Merged
me-no-dev merged 2 commits into
masterfrom
copilot/fix-sd-mmc-wiring-error
Mar 16, 2026
Merged

Fix ESP32-P4 pin mapping in SD_MMC example comment#12431
me-no-dev merged 2 commits into
masterfrom
copilot/fix-sd-mmc-wiring-error

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 6, 2026

The ESP32-P4 Func EV wiring table in SDMMC_Test.ino listed GPIO 43 twice — once for CLK and again for D3 — making the D2/D3 pin assignments wrong and causing 4-bit SD_MMC connections to fail.

Change

  • libraries/SD_MMC/examples/SDMMC_Test/SDMMC_Test.ino: Corrected the ESP32-P4 slot 0 (IO_MUX) pin table — D3 → GPIO 42, D2 → GPIO 41 (aligns with ESP-IDF sdmmc example README).
// Before (wrong — 43 appears twice)
* ESP32-P4 Func EV | 40  39  GND  43 3V3 GND  44 43  42  | SLOT 0 (IO_MUX)

// After (correct)
* ESP32-P4 Func EV | 40  39  GND  43 3V3 GND  44 42  41  | SLOT 0 (IO_MUX)
Original prompt

This section details on the original issue you should resolve

<issue_title>Wiring mistake in SD_MMC example for ESP32P4</issue_title>
<issue_description>### Board

ESP32P4

Device Description

Any ESP32P4 variant

Hardware Configuration

ESP32P4 with a SD (microSD) card connected via 4-bit SD_MMC.

Version

v3.3.7

Type

Bug

IDE Name

Arduino

Operating System

Any

Flash frequency

Any

PSRAM enabled

yes

Upload speed

115200

Description

Line 17 of the https://github.com/espressif/arduino-esp32/blob/master/libraries/SD_MMC/examples/SDMMC_Test/SDMMC_Test.ino points twice to the GPIO 43:

 * ESP32-P4 Func EV | 40  39  GND  43 3V3 GND  44 43  42  | SLOT 0 (IO_MUX)

while https://github.com/espressif/esp-idf/blob/master/examples/storage/sd_card/sdmmc/README.md says that it should have GPIOs 41 and 42 for pins 1 and 2 of the card:

 * ESP32-P4 Func EV | 40  39  GND  43 3V3 GND  44 42  41  | SLOT 0 (IO_MUX)

Sketch

it's the mistake in the comments, though it would lead to the incorrect wiring, so any attempt to run the Arduino example on ESP32P4 would fail.

Debug Message

n/a

Other Steps to Reproduce

n/a

I have checked existing issues, online documentation and the Troubleshooting Guide

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 6, 2026

Warnings
⚠️

Some issues found for the commit messages in this PR:

  • the commit message "Fix wiring comment for ESP32-P4 in SDMMC_Test example":
    • summary looks empty
    • type/action looks empty
  • the commit message "Initial plan":
    • summary looks empty
    • type/action looks empty

Please fix these commit messages - here are some basic tips:

  • follow Conventional Commits style
  • correct format of commit message should be: <type/action>(<scope/component>): <summary>, for example fix(esp32): Fixed startup timeout issue
  • allowed types are: change,ci,docs,feat,fix,refactor,remove,revert,test
  • sufficiently descriptive message summary should be between 10 to 72 characters and start with upper case letter
  • avoid Jira references in commit messages (unavailable/irrelevant for our customers)

TIP: Install pre-commit hooks and run this check when committing (uses the Conventional Precommit Linter).

👋 Hello Copilot, we appreciate your contribution to this project!


📘 Please review the project's Contributions Guide for key guidelines on code, documentation, testing, and more.

🖊️ Please also make sure you have read and signed the Contributor License Agreement for this project.

Click to see more instructions ...


This automated output is generated by the PR linter DangerJS, which checks if your Pull Request meets the project's requirements and helps you fix potential issues.

DangerJS is triggered with each push event to a Pull Request and modify the contents of this comment.

Please consider the following:
- Danger mainly focuses on the PR structure and formatting and can't understand the meaning behind your code or changes.
- Danger is not a substitute for human code reviews; it's still important to request a code review from your colleagues.
- Resolve all warnings (⚠️ ) before requesting a review from human reviewers - they will appreciate it.
- To manually retry these Danger checks, please navigate to the Actions tab and re-run last Danger workflow.

Review and merge process you can expect ...


We do welcome contributions in the form of bug reports, feature requests and pull requests.

1. An internal issue has been created for the PR, we assign it to the relevant engineer.
2. They review the PR and either approve it or ask you for changes or clarifications.
3. Once the GitHub PR is approved we do the final review, collect approvals from core owners and make sure all the automated tests are passing.
- At this point we may do some adjustments to the proposed change, or extend it by adding tests or documentation.
4. If the change is approved and passes the tests it is merged into the default branch.

Generated by 🚫 dangerJS against 2aedcc8

Co-authored-by: me-no-dev <12663778+me-no-dev@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix wiring mistake in SD_MMC example for ESP32P4 Fix ESP32-P4 pin mapping in SD_MMC example comment Mar 6, 2026
@me-no-dev me-no-dev added the Status: Review needed Issue or PR is awaiting review label Mar 6, 2026
@me-no-dev me-no-dev assigned P-R-O-C-H-Y and unassigned me-no-dev Mar 6, 2026
@me-no-dev me-no-dev marked this pull request as ready for review March 13, 2026 09:36
@me-no-dev me-no-dev requested a review from a team as a code owner March 13, 2026 09:36
Copy link
Copy Markdown
Member

@P-R-O-C-H-Y P-R-O-C-H-Y left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct

@P-R-O-C-H-Y P-R-O-C-H-Y added Status: Pending Merge Pull Request is ready to be merged Type: Example Issue is related to specific example. and removed Status: Review needed Issue or PR is awaiting review labels Mar 16, 2026
@me-no-dev me-no-dev merged commit a712544 into master Mar 16, 2026
32 of 34 checks passed
@me-no-dev me-no-dev deleted the copilot/fix-sd-mmc-wiring-error branch March 16, 2026 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Status: Pending Merge Pull Request is ready to be merged Type: Example Issue is related to specific example.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wiring mistake in SD_MMC example for ESP32P4

5 participants