Xinyuan-LilyGO/LilyGo-T5-Epaper-Series

SD card not working when using T5_V2.3.1_213]

bruno1950 opened this issue · 7 comments

Hi,
I just bought a Lilygo T5 V2.3.1.213 version GDEM0213B74 CH9102 and I was able to show on display data from I2C sensors (BME280 and SHT3x) and to get a timestamp from RTC DS3231. Deepsleep also works fine. However, I was not able to use the SD card, neither inserting it directly in the slot nor connected to an external SDcard reader ( MOSI IO15,MISO IO2, SCK IO14, CS IO13). The card is correctly mounted but I keep on getting an error "opening the file" or ""appending the file". Even using a vey simple sketch just to try if it's possible to write something on the SD card is unsuccesful. Since I think that Lilygo is a good brand I have to assume that it's my fault but I was not able to find my mistake. Could anyone tell me which code I have to use just to write data on SD card in order to use it as a datalogger ? Thx in advance

Please copy your sketch here

It seems that there is no problem with the SD part. Has the SD card been formatted in FAT32 format? Is the capacity less than 32G? Have you replaced any other SD tests?

Hi, thx for your prompt feedback.
I tried with two different SDcard-adapters and with two different SD cards, one with 4 Gb and the other with 16 Gb, both formatted FAT32, but I still have the same error "Failed to open file for appending"
If I use codes devised to test SDcard (such as the SD_test.ino) I get the error message "Card Mount Failed" both when I insert the card in the slot of the board and if I use an external SD-card reader connected according to instructions.
At this point one question and one request.
Question: Have you tried to run my sketch ( or a similar one with data collected from an I2C sensor) with SD card on a Lilygo T5_V2.3.1_213 ? Were you successful ?
Request: Would you be so kind to send me a working code for using SD card as a data logger with this board ? I was not able to find any simple example of this use and I need to save on SDcard data collected from an I2C sensor.
Otherwise this board is of no use for me.
Thx for your help.

Use the factory test file to test to see if it is normal @bruno1950
firmware

Hi,
I tried to use the file factory test as you suggested but I was not able to get a result even following your example.
For firmware I downloaded the [T5_V24_BW_GxGDEM0213B74.bin] because my board is this type. Then I downloaded from Espressif site the ESP32 FLASH DOWNLOAD TOOL but the available version is different from your example and I am blocked. I'm enclosing the pictutes of what I'm getting.
I've also tried to use your SD_test.ino but I got a lot of errors and it doesn't work.
Since I'm a newbie could you you please send me a code for SD card working for my Lilygo board ? or at least telling me where I can find it ?
I've seen that my issue was raised also last year by another user and seems NOT to have been solved (#33)

Thanks in advance for your help. The board would be perfect IF the SD card worked
figure_1
figure_2

You have burned the wrong firmware, you should have burned
T5_V213_BW_GxGDEM0213B74.bin

You should use the compiled binary file for testing, first to rule out whether there is a hardware problem