Closed
Description
Board
ESP32P4/C6
Device Description
M5Stack Tab5
Hardware Configuration
ESP32-P4 | G11 | G10 | G9 | G8 | G13 | G12
ESP32-C6 | SDIO2_D0 | SDIO2_D1 | SDIO2_D2 | SDIO2_D3 | SDIO2_CMD | SDIO2_CK
Version
v3.2.0
IDE Name
Arduino IDE 2.3.6
Operating System
Windows11
Flash frequency
80Mhz
PSRAM enabled
yes
Upload speed
921600
Description
When the board should initialize the WiFi it crashes
Sketch
#include <M5Unified.h>
#include <WiFi.h>
const char* ssid = "xxx";
const char* password = "yyy";
void setup() {
Serial.begin(115200);
auto cfg = M5.config();
M5.begin(cfg);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(200);
Serial.print(".");
}
}
void loop() {
// ...
}
Debug Message
ESP-ROM:esp32p4-eco2-20240710
sdio_mempool_create free:32254544 min-free:32254544 lfb-def:31457268 lfb-8bit:31457268
E (1736) sdmmc_common: sdmmc_init_ocr: send_op_cond (1) returned 0x107
E (1736) sdio_wrapper: sdmmc_card_init failed
E (4386) H_SDIO_DRV: sdio card init failed
FreeRTOS: FreeRTOS Task "sdio_read" should not return, Aborting now!
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide
- I confirm I have checked existing issues, online documentation and Troubleshooting guide.
Activity
lbernstone commentedon May 27, 2025
We can't really troubleshoot the M5 stack here, but ESP32-P4 does not have WiFi.
me-no-dev commentedon May 28, 2025
When we get the Tab5, we will have a look and add support. Currently only specific pin combination is supported on the Espressif P4 board https://github.com/espressif/arduino-esp32/blob/master/variants/esp32p4/pins_arduino.h#L75-L83
nikthefix commentedon May 30, 2025
@smily77 Did you try the new M5Stack boards package 3.2.0
(Additional Boards URL: https://static-cdn.m5stack.com/resource/arduino/package_m5stack_index.json)
There is now a Tab5 board option which should remap the SDIO -> C6 pins which are not the same as the Espressif dev kit / Waveshare defaults.
smily77 commentedon May 30, 2025
@nikthefix yes i did. Unfortunatly same result
nikthefix commentedon May 30, 2025
@smily77 I just tried it too with the same result.
Looking at the schematics of Tab5 vs Waveshare P4-Nano (which works fine with the C6 wifi) we can see that in the Tab5 the SDIO pins are different AND they are connected to the SDIO2 bus. Looking at:
".......\AppData\Local\Arduino15\packages\m5stack\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32p4\include\espressif__esp_hosted\host\port\esp_hosted_config.h"
we can set the SDIO pins here but I tried it and it looks like more is required. The supplied Tab5 demo manages it so I guess it's a matter of trolling thru their rather convoluted IDF code to find the key ... until M5Stack update their Arduino board definition.
If the Core only supports the fixed P4 dev board SDIO C6 definitions then I guess we're out of luck for the time being.
I'll work on this today.
Please let me know if you find anything too.
BTW, I'm assuming that the C6 on both these boards is flashed with the same firmware. Hope so as I've only got my working P4-Nano to go by.
cheops commentedon Jun 19, 2025
did you find a way to specify the different pins?
I tried with build variables and defines
also found these
but no luck so far
nikthefix commentedon Jun 20, 2025
@cheops No I've not found a simple solution so far.
I think recompiling the relevant Arduino libs using the Espressif Library Builder is an interim solution.
Jason2866 commentedon Jun 23, 2025
The SDIO GPIOs for Hosted communication are set in sdkconfig. So the are hard coded and can't be changed in Arduino. Currently there is only the solution to compile Arduino as an component of IDF or use pioarduino HybridCompile where sdkconfig settings can be changed.
The Arduino libs are compiled with the changed settings and provided to Arduino. HybridCompile is a pioarduino only feature.
me-no-dev commentedon Jun 23, 2025
This is almost true. In 3.2.x only SDIO pins can be defined (not the RST pin), in 3.3.x all pins will be definable, even at runtime
Westcott1 commentedon Jun 23, 2025
I've just got my new esp32P4+C6 10.1" panel, so am really interested in how to get WiFi working via Arduino.
The demo that came installed had a working WiFi scanner, and Waveshare have published working ESP-IDF code.
me-no-dev commentedon Jun 24, 2025
Fix is coming: #11513
smily77 commentedon Jun 24, 2025
@me-no-dev
Looks promising, but will this work with SDIO2 as well? As the M5Stack Tab 5 uses SDIO2.
me-no-dev commentedon Jun 24, 2025
It is set to use SDIO2 by default
12 remaining items