<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[TAB5 SD doesnt work in Arduino IDE]]></title><description><![CDATA[<p dir="auto">I have been trying to convert some core2 code to work with Tab5 with little success when in comes to the microSD. I have chatted with <a href="http://chat.m5stack.com" target="_blank" rel="noopener noreferrer nofollow ugc">chat.m5stack.com</a> to get some minimal working code and it still doesn't work. I have tested on known good cards and 2 new TAB5s.</p>
<p dir="auto">Here's the code from their chat bot (doesn't work)<br />
thanks for any direction,<br />
Kris</p>
<p dir="auto">#include &lt;M5Unified.h&gt;<br />
#include &lt;SPI.h&gt;  // Include SPI library<br />
#include &lt;SD.h&gt;   // Include Arduino SD library</p>
<p dir="auto">// Tab5 SD card SPI pin definitions<br />
#define SD_CS_PIN    4<br />
#define SD_SCK_PIN  18<br />
#define SD_MISO_PIN 19<br />
#define SD_MOSI_PIN 23</p>
<p dir="auto">void setup() {<br />
auto cfg = M5.config();<br />
M5.begin(cfg);  // Initialize M5Unified</p>
<p dir="auto">// Initialize SPI for SD card<br />
SPI.begin(SD_SCK_PIN, SD_MISO_PIN, SD_MOSI_PIN, SD_CS_PIN);</p>
<p dir="auto">// Initialize SD card with specified CS pin and speed (25MHz)<br />
if (!SD.begin(SD_CS_PIN, SPI, 25000000)) {<br />
M5.Lcd.println("SD Card failed!");<br />
while (1);  // Halt if failed<br />
}<br />
M5.Lcd.println("SD Card initialized.");<br />
}</p>
<p dir="auto">void loop() {}</p>
]]></description><link>https://community.m5stack.com/topic/7742/tab5-sd-doesnt-work-in-arduino-ide</link><generator>RSS for Node</generator><lastBuildDate>Tue, 28 Apr 2026 20:42:16 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/7742.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 09 Aug 2025 14:46:57 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to TAB5 SD doesnt work in Arduino IDE on Wed, 20 Aug 2025 19:08:48 GMT]]></title><description><![CDATA[<p dir="auto">The best, fastest and most reliable way I've found to access the µSD card on the Tab5 is via the SD_MMC.h library. Try the below;</p>
<pre><code>#include &lt;M5Unified.h&gt;
#include &lt;SD_MMC.h&gt;

#define sd_D0 GPIO_NUM_39
#define sd_D1 GPIO_NUM_40
#define sd_D2 GPIO_NUM_41
#define sd_D3 GPIO_NUM_42
#define sd_CLK GPIO_NUM_43
#define sd_CMD GPIO_NUM_44

#define GPS_RX_PIN 48  // CoreS3 GPIO RX
#define GPS_TX_PIN 2  // CoreS3 GPIO TX

#define sd_speed 20000

void setup() {
  M5.delay(500);
  M5.begin();
  M5.Lcd.setTextColor(GREEN, BLACK);
  M5.Lcd.setTextFont(2);
  SD_MMC.setPins(sd_CLK, sd_CMD, sd_D0, sd_D1, sd_D2, sd_D3);
  M5.Lcd.println("Mounting Tab5 µSD");
  //M5.delay(5000);
  if (!SD_MMC.begin("/sdcard", false, false, sd_speed)) { // SD_MMC.begin("/sdcard", false, false, sd_speed)
    M5.Lcd.println("µSD mount failed!");
    while (1);
  } else {
    M5.Lcd.println("µSD mounted.");
  }

  // List files on SD card root
  File root = SD_MMC.open("/");
  if (!root) {
    M5.Lcd.println("Failed to open root dir");
  } else {
    M5.Lcd.println("Files:");
    File file = root.openNextFile();
    while (file) {
      M5.Lcd.println(file.name());
      file = root.openNextFile();
    }
    root.close();
  }
}

void loop() {
  M5.delay(50);
}
</code></pre>
]]></description><link>https://community.m5stack.com/post/29810</link><guid isPermaLink="true">https://community.m5stack.com/post/29810</guid><dc:creator><![CDATA[SiberianHamster]]></dc:creator><pubDate>Wed, 20 Aug 2025 19:08:48 GMT</pubDate></item><item><title><![CDATA[Reply to TAB5 SD doesnt work in Arduino IDE on Wed, 20 Aug 2025 10:01:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/felmue" aria-label="Profile: felmue">@<bdi>felmue</bdi></a> Thanks for this, please can you post an simple example that works with the changes in the example you mentiod to get it run on the Tab5. That wil be great.</p>
]]></description><link>https://community.m5stack.com/post/29806</link><guid isPermaLink="true">https://community.m5stack.com/post/29806</guid><dc:creator><![CDATA[Powersoft]]></dc:creator><pubDate>Wed, 20 Aug 2025 10:01:04 GMT</pubDate></item><item><title><![CDATA[Reply to TAB5 SD doesnt work in Arduino IDE on Sat, 16 Aug 2025 22:04:20 GMT]]></title><description><![CDATA[<p dir="auto">I managed to get the SD card reader to work.</p>
<p dir="auto">H_SDIO_DRV error: sdio card init failed<br />
The WiFi module (ESP32-C6) uses an independent set of dedicated pins (SDIO2_D0 to SDIO2_CK), thus avoiding any physical interface overlap and conflicts.</p>
<p dir="auto">sd_mmc_card:<br />
id: sd_card<br />
clk_pin: GPIO43<br />
cmd_pin: GPIO44<br />
data0_pin: GPIO39<br />
data1_pin: GPIO40<br />
data2_pin: GPIO41<br />
data3_pin: GPIO42<br />
mode_1bit: false<br />
slot: 0</p>
<p dir="auto">esp32_hosted:<br />
variant: esp32c6<br />
active_high: true<br />
clk_pin: GPIO12<br />
cmd_pin: GPIO13<br />
d0_pin: GPIO11<br />
d1_pin: GPIO10<br />
d2_pin: GPIO9<br />
d3_pin: GPIO8<br />
reset_pin: GPIO15<br />
slot: 1</p>
]]></description><link>https://community.m5stack.com/post/29760</link><guid isPermaLink="true">https://community.m5stack.com/post/29760</guid><dc:creator><![CDATA[sapphire]]></dc:creator><pubDate>Sat, 16 Aug 2025 22:04:20 GMT</pubDate></item><item><title><![CDATA[Reply to TAB5 SD doesnt work in Arduino IDE on Sun, 10 Aug 2025 17:55:28 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/krmiller" aria-label="Profile: Krmiller">@<bdi>Krmiller</bdi></a></p>
<p dir="auto">I found another <a href="https://github.com/espressif/arduino-esp32/blob/master/libraries/SD_MMC/examples/SDMMC_Test/SDMMC_Test.ino" target="_blank" rel="noopener noreferrer nofollow ugc">example</a> using SDIO (instead of SPI) which works for me. You can find the correct GPIOs <a href="https://docs.m5stack.com/en/core/Tab5?id=PinMap" target="_blank" rel="noopener noreferrer nofollow ugc">here</a> - section: microSD SDIO mode.</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/29718</link><guid isPermaLink="true">https://community.m5stack.com/post/29718</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Sun, 10 Aug 2025 17:55:28 GMT</pubDate></item><item><title><![CDATA[Reply to TAB5 SD doesnt work in Arduino IDE on Sat, 09 Aug 2025 17:01:24 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/felmue" aria-label="Profile: felmue">@<bdi>felmue</bdi></a>  Thanks for testing Felix. If you hear of any work arounds, please let us know.</p>
]]></description><link>https://community.m5stack.com/post/29716</link><guid isPermaLink="true">https://community.m5stack.com/post/29716</guid><dc:creator><![CDATA[Krmiller]]></dc:creator><pubDate>Sat, 09 Aug 2025 17:01:24 GMT</pubDate></item><item><title><![CDATA[Reply to TAB5 SD doesnt work in Arduino IDE on Sat, 09 Aug 2025 16:22:50 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/krmiller" aria-label="Profile: Krmiller">@<bdi>Krmiller</bdi></a></p>
<p dir="auto">I tried talking to the SD card on my M5Tab5 using Arduino myself but without any luck.</p>
<p dir="auto">I think that maybe the Arduino SD library isn't ready (yet) for the ESP32-P4 in M5Tab5. See <a href="https://github.com/espressif/arduino-esp32/blob/master/libraries/SD/examples/SD_Test/SD_Test.ino" target="_blank" rel="noopener noreferrer nofollow ugc">here</a> - ESP32-P4 is not listed.</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/29715</link><guid isPermaLink="true">https://community.m5stack.com/post/29715</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Sat, 09 Aug 2025 16:22:50 GMT</pubDate></item></channel></rss>