Hi Ben
I wanted to use an SD card in the current project with an ESP32.
The programme compiles without any problems
But when I started the hardware, it always stopped at the SD card initialisation.
So i compiled an older project, which worked fine, but now this also hangs at the sd card initialisation while loop.
regards
Stefan
always in the while loop....
ESP32 SD-Card can no longer be initialised
-
- Valued Contributor
- Posts: 887
- http://meble-kuchenne.info.pl
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 174 times
- Been thanked: 203 times
-
- Matrix Staff
- Posts: 1899
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 491 times
- Been thanked: 665 times
Re: ESP32 SD-Card can no longer be initialised
Hello,
We are using an SD card here with ESP without any issues, please can you check the fast SPI rate property for the SD card component. We are using 20MHz I beleive and most cards are working fine with this but I have found a couple of cards that don't work at all.
We are using an SD card here with ESP without any issues, please can you check the fast SPI rate property for the SD card component. We are using 20MHz I beleive and most cards are working fine with this but I have found a couple of cards that don't work at all.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
-
- Valued Contributor
- Posts: 887
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 174 times
- Been thanked: 203 times
Re: ESP32 SD-Card can no longer be initialised
Hi Ben
It's good to know that it should actually work. Thank you.
The card is aways the same type and the speed I did not change.
On the hardware is a display on the same SPI bus. Maybe I cached a problem with one of this both component.
The cards was working always fine even with the display.
In the schematic the display has no MISO pin A19
I will take a closer look where the problem is
regards
Stefan
Both on SPI bus was working....
It's good to know that it should actually work. Thank you.
The card is aways the same type and the speed I did not change.
On the hardware is a display on the same SPI bus. Maybe I cached a problem with one of this both component.
The cards was working always fine even with the display.
In the schematic the display has no MISO pin A19
I will take a closer look where the problem is
regards
Stefan
Both on SPI bus was working....
- Attachments
-
- Snag_c8831d.png (41.35 KiB) Viewed 10896 times
-
- Snag_c873eb.png (40.31 KiB) Viewed 10896 times
-
- Matrix Staff
- Posts: 1899
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 491 times
- Been thanked: 665 times
Re: ESP32 SD-Card can no longer be initialised
Initial prescaler needs to be 400KHz max. Hopefully this will solve things for you.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
-
- Valued Contributor
- Posts: 887
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 174 times
- Been thanked: 203 times
Re: ESP32 SD-Card can no longer be initialised
Hi Ben
I tried with 400kHz but it does not work.
What is a little funny is that it has already worked half a year ago.
I have not changed anything in the hardware or at the program.
I will take a closer look
regards
Stefan
I tried with 400kHz but it does not work.
What is a little funny is that it has already worked half a year ago.
I have not changed anything in the hardware or at the program.
I will take a closer look
regards
Stefan
-
- Valued Contributor
- Posts: 887
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 174 times
- Been thanked: 203 times
Re: ESP32 SD-Card can no longer be initialised
Hi Ben
I made a second testprogram (test_no_display) and with the USB I control the ret_sdcard byte.
It's working nice.
So I added the display to this programm and still working.
But I did the same commands in the test1 and there it's not working.
no idea what the difference is.
regards
Stefan
I made a second testprogram (test_no_display) and with the USB I control the ret_sdcard byte.
It's working nice.
So I added the display to this programm and still working.
But I did the same commands in the test1 and there it's not working.
no idea what the difference is.
regards
Stefan
- Attachments
-
- Test_no_display1.fcfx
- (19.28 KiB) Downloaded 546 times
-
- Test1.fcfx
- (19.29 KiB) Downloaded 521 times
-
- Valued Contributor
- Posts: 887
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 174 times
- Been thanked: 203 times
Re: ESP32 SD-Card can no longer be initialised
Hi Ben
The File SD/SDHC and Display GLCD (ILI9341 SPI)
are not working on the same SPI Bus anymore.
If I change the File SD/SDHC component to SPI software mode then it's working again
regards
Stefan
The File SD/SDHC and Display GLCD (ILI9341 SPI)
are not working on the same SPI Bus anymore.
If I change the File SD/SDHC component to SPI software mode then it's working again
regards
Stefan
-
- Matrix Staff
- Posts: 1899
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 491 times
- Been thanked: 665 times
Re: ESP32 SD-Card can no longer be initialised
Hi Stefan,
It might be interesting to see how the C code differs between the two projects. Looking at the source there is nothing jumping out at me other then the order of components in the project file.
I'll try generating the C here and see if that's got any clues.
It might be interesting to see how the C code differs between the two projects. Looking at the source there is nothing jumping out at me other then the order of components in the project file.
I'll try generating the C here and see if that's got any clues.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
-
- Valued Contributor
- Posts: 887
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 174 times
- Been thanked: 203 times
Re: ESP32 SD-Card can no longer be initialised
Hi Ben
I guess there is still a problem with the Ili9341 SPI display, the File SD and ESP32.
When I load the File SD2 component I cannot select a pin like before File SD1. Also something is wrong with the display, in one program it's working but it does not work in another. Although same configuration and hardware.
regards
Stefan
I guess there is still a problem with the Ili9341 SPI display, the File SD and ESP32.
When I load the File SD2 component I cannot select a pin like before File SD1. Also something is wrong with the display, in one program it's working but it does not work in another. Although same configuration and hardware.
regards
Stefan
-
- Matrix Staff
- Posts: 1899
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 491 times
- Been thanked: 665 times
Re: ESP32 SD-Card can no longer be initialised
Hello,
Thanks for letting us know, hopefully all solved for you now.
You might want to switch the properties back to the titles rather then the variables unless your specifically using the variables.
To do this right click on the Properties text and select Show titles.
Thanks for letting us know, hopefully all solved for you now.
You might want to switch the properties back to the titles rather then the variables unless your specifically using the variables.
To do this right click on the Properties text and select Show titles.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel