• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

ESP32 ILI9488 TFT ESP32-Wromer-B micro SD Card Reader error Card Mount Failed

Q&A Forum › Category: Arduino › ESP32 ILI9488 TFT ESP32-Wromer-B micro SD Card Reader error Card Mount Failed
0 Vote Up Vote Down
Paul D. Wilkie asked 9 months ago

I am working with an Elecrow 3.5in. ILI9488 TFT ESP32-Wromer-B Display. I seem to have a problem getting the embedded SD card Reader/Writer to open four (4) standard arduino.jpg JPEG files on the embedded SD card. I followed a previous Random Nerd Tutorial sketch I found that correctly wrote to and read back two txt files to a blank SD card; indicating that the communication with the SD card Reader/Writer module to the card is functioning.   Library example sketch: https://github.com/Bodmer/TFT_eSPI/blob/master/examples/Generic/ESP32_SDcard_jpeg/ESP32_SDcard_jpeg.ino   The sketch returns the following error: 12:49:28.108 -> Card Mount Failed 12:49:28.241 -> ERROR: File \”/EagleEye.jpg\” not found! 12:49:30.376 -> ERROR: File \”/Baboon40.jpg\” not found! 12:49:32.552 -> ERROR: File \”/lena20k.jpg\” not found! 12:49:34.698 -> ERROR: File \”/Mouse480.jpg\” not found!   Any suggestions or references would be greatly appreciated.

Question Tags: #ESP32 #TFT #SD #drawSdJpeg #JPEGDecoder
11 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 9 months ago

Hi.
Did you upload the files to the microSD card root folder?
Where are you placing the files?
 
Regards,
Sara

0 Vote Up Vote Down
Paul D. Wilkie answered 9 months ago

Hello Sara, yes the SD card was programed as per the RNT Tutorial: “ESP32: Guide for MicroSD Card Module using Arduino IDE” (screenshot below verified the configuration on the SD card). This tutorial worked as designed and correctly wrote and read with the embedded SD card reader/ writer on the Elecrow 3.5in. ILI9488 TFT ESP32-Wromer-B Display  (screenshot attached below: test.txt $ foo.txt files).
https://randomnerdtutorials.com/esp32-microsd-card-arduino/
https://imgur.com/a/TijY291
I have noticed the screen color changes every

0 Vote Up Vote Down
Sara Santos Staff answered 9 months ago

Hi.
It’s hard to tell what might be wrong.
The error mentions it cannot find the images. But, as you’ve shown the images are on the SD card root folder.
 
Maybe it is better to try to open an issue in the library Github page or try to contact the developer.
 
Regards,
Sara
 

0 Vote Up Vote Down
Paul D. Wilkie answered 9 months ago

Hi Sara, I am begening to think the problem might be that the 32GB SDHC micro card I used might be  the problem? I have connected Elecrow to see what is the configuration (develement age  mcroSD, microSDHC, micrSDXC or microSDUC) level of the embedded SD card module on their TFT display board. 
A Guide to SD and microSD Card Types – Kingston Technology 
Also, as a long shot, I have ordered an 2GB SD micro card to see if that is the resolve the issue, cross our fingers!

0 Vote Up Vote Down
Paul D. Wilkie answered 9 months ago

Will not see the 2GB microSD cards til Thursday, stay tuned!

0 Vote Up Vote Down
Sara Santos Staff answered 9 months ago

Then, let me know if that will fix your issue.
Regards,
Sara

0 Vote Up Vote Down
Paul D. Wilkie answered 9 months ago

Sara, I finally received a microSD 2GB card; unfortunatelly that did not resolve the issue????
 
16:20:13.537 -> Card Mount Failed
16:20:13.672 -> ERROR: File “/EagleEye.jpg” not found!
16:20:15.824 -> ERROR: File “/Baboon40.jpg” not found!
16:20:17.974 -> ERROR: File “/lena20k.jpg” not found!
16:20:20.137 -> ERROR: File “/Mouse480.jpg” not found!

0 Vote Up Vote Down
Sara Santos Staff answered 9 months ago

Hi.
I’m not sure what might be wrong.
In your code, try changing the image path by removing the /
For example, try it like this:
drawSdJpeg(“EagleEye.jpg”, x, y); // This draws a jpeg pulled off the SD Card
 
Let me know if this makes any difference.
 
Regards,
Sara

0 Vote Up Vote Down
Paul D. Wilkie answered 9 months ago

I think I may have found the issue? I have sent an email for Elecrow’s Tech Support for  their input regarding that their database User_Setup.h file not defining the SD chip select pin. We shall see what they have to say????
 
Part of the email to Elecrow Tech Support: 
// Set all chip selects high to avoid bus contention during initialisation of each peripheral:

 
  digitalWrite(22, HIGH); // Touch controller chip select (if used)
  digitalWrite(15, HIGH); // TFT screen chip select
  digitalWrite( 5, HIGH); // SD card chips select, must use GPIO 5 (ESP32 SS)

 
 
The User_Setup.h file in your data base does not define the SD card chips select?
 
C:\Users\Paul\Documents\Arduino\libraries\269-Elecrow-3.5-TFT-with-ESP32-built-in-main
 

#define ILI9488_DRIVER
 
//#define TFT_INVERSION_OFF
#define TFT_BL   27
#define TFT_BACKLIGHT_ON HIGH
 
#define TFT_MISO 12
#define TFT_MOSI 13
#define TFT_SCLK 14
#define TFT_CS    15 – User_Setup.h matches the sketch
#define TFT_DC    2 
#define TFT_RST   -1
#define TOUCH_CS 33 – Sketch must be changed to 33

Please advise about the SD card chips select pin selection required.

0 Vote Up Vote Down
Paul D. Wilkie answered 9 months ago

Hello Sara, so Elecrow Tesh Support sent the following SD card define bits which I added to the User_Setup.h and t, with the same error message?!?!?!?!?!?
#define SD_MOSI 23//added per Elecrow’s Tech Support
#define SD_MISO 19
#define SD_SCK 18
#define SD_CS 5
11:29:54.438 -> Card Mount Failed
11:29:54.571 -> ERROR: File “/EagleEye.jpg” not found!
11:29:56.729 -> ERROR: File “/Baboon40.jpg” not found!
11:29:58.852 -> ERROR: File “/lena20k.jpg” not found!
11:30:01.017 -> ERROR: File “/Mouse480.jpg” not found!
Arduino 1.8.12 Sketch – ESP32_SDcard_jpeg.ino posted on  Pastbin

https://pastebin.com/QE38bUJW

I just noticed the following warning message while compiling and uploading???

C:\Users\Paul\AppData\Local\Temp\arduino_modified_sketch_545131\ESP32_SDcard_jpeg.ino: In function ‘void jpegRender(int, int)’:
C:\Users\Paul\AppData\Local\Temp\arduino_modified_sketch_545131\ESP32_SDcard_jpeg.ino:201:14: warning: unused variable ‘mcu_pixels’ [-Wunused-variable]
uint32_t mcu_pixels = win_w * win_h;
^~~~~~~~~~

0 Vote Up Vote Down
Sara Santos Staff answered 9 months ago

The error is because you’re defining the mcu_pixels variable and you’re not using it. Just delete the following lines:
// calculate how many pixels must be drawn
uint32_t mcu_pixels = win_w * win_h;
 
However, that will not fix the issue.
 
 
The card mount failed issue is probably because the microSD card is not being initialized properly or the right pins are not being defined.
If your’re sure you’re using the right pins, double-check the lines that initialize the microSD card and compare with a working sketch.
 
 
Regards,
Sara

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.