Hi Ben
The SD card works with the old SD component, but I don't have any free SPI buses left because of the display and the AD converter.
I'm having trouble with the C code insert from You.
Does it just need to be in a C code component, or should it be added as a supplementary C code?
ESP32S3 SD-card init problem
-
stefan.erni
- Valued Contributor
- Posts: 1290
- http://meble-kuchenne.info.pl
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 246 times
- Been thanked: 257 times
-
stefan.erni
- Valued Contributor
- Posts: 1290
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 246 times
- Been thanked: 257 times
Re: ESP32S3 SD-card init problem
Hi to All
There is one remaining issue that I have not yet been able to identify or resolve.
The FC11 fails to initialize the SD card on this board.
However, the same SD card operates reliably with FC11 on other board, such as ESP32-S3 and ESP32-WROOM boards.
Interestingly, similar issues can also be observed on a SparkFun board with ESP32-S3 mini.
It's a small board that's placed underneath an Adafruit board, with an amplifier IC, a 24-bit A/D converter, and an SD card.
Fortunately, I can still make changes like I could still swap the pins from the card.
There is one remaining issue that I have not yet been able to identify or resolve.
The FC11 fails to initialize the SD card on this board.
However, the same SD card operates reliably with FC11 on other board, such as ESP32-S3 and ESP32-WROOM boards.
Interestingly, similar issues can also be observed on a SparkFun board with ESP32-S3 mini.
It's a small board that's placed underneath an Adafruit board, with an amplifier IC, a 24-bit A/D converter, and an SD card.
Fortunately, I can still make changes like I could still swap the pins from the card.
-
stefan.erni
- Valued Contributor
- Posts: 1290
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 246 times
- Been thanked: 257 times
Re: ESP32S3 SD-card init problem
Hi to All
I ran a test on Ben's board and used the loop to initialize the card every 10ms .
I didn't use an SD card, but I checked it with the KO, and the signal was perfect.
Then I switched the clock to a free port (GPIO 19 and GPIO 20), and the clock was perfect there, too.
I added the same loop to my board
But the clock isn't working on my board. It's just always 0 volts.
Both are ESP32-S3 but my is a mini
loop for oscilloscope on Ben's board: Signal on oscilloscope:
I ran a test on Ben's board and used the loop to initialize the card every 10ms .
I didn't use an SD card, but I checked it with the KO, and the signal was perfect.
Then I switched the clock to a free port (GPIO 19 and GPIO 20), and the clock was perfect there, too.
I added the same loop to my board
But the clock isn't working on my board. It's just always 0 volts.
Both are ESP32-S3 but my is a mini
loop for oscilloscope on Ben's board: Signal on oscilloscope:
-
stefan.erni
- Valued Contributor
- Posts: 1290
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 246 times
- Been thanked: 257 times
Re: ESP32S3 SD-card init problem
Hi Ben
Would it be possible to provide me with the latest File_ESP32_SDMode component?
Would it be possible to provide me with the latest File_ESP32_SDMode component?
-
BenR
- Matrix Staff
- Posts: 2307
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 639 times
- Been thanked: 848 times
Re: ESP32S3 SD-card init problem
Of course 
It should be on the wiki but if it's not then this gthub contains nightly builds of the latest files straight from the source.
https://github.com/BenMatrixTSL/FlowcodeV11/
Here's the specific file you're after. Just click the Download raw file link.
https://github.com/BenMatrixTSL/Flowcod ... DMode.fcfx
It should be on the wiki but if it's not then this gthub contains nightly builds of the latest files straight from the source.
https://github.com/BenMatrixTSL/FlowcodeV11/
Here's the specific file you're after. Just click the Download raw file link.
https://github.com/BenMatrixTSL/Flowcod ... DMode.fcfx
-
stefan.erni
- Valued Contributor
- Posts: 1290
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 246 times
- Been thanked: 257 times
Re: ESP32S3 SD-card init problem
Hi Ben
Thanks. Creating my own component File_ESP32_SDMode_erni worked out well !
But then I need a little help finding the code to return 0 for “OK” and 255 (>0) for “not OK.”
Thanks. Creating my own component File_ESP32_SDMode_erni worked out well !
But then I need a little help finding the code to return 0 for “OK” and 255 (>0) for “not OK.”
-
BenR
- Matrix Staff
- Posts: 2307
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 639 times
- Been thanked: 848 times
Re: ESP32S3 SD-card init problem
You likely need to look here.
C:\ProgramData\MatrixTSL\FlowcodeV11\CAL\ESP\ESP_CAL_File.c
The init function is defined as an embedded function which just calls the C CAL function.
C:\ProgramData\MatrixTSL\FlowcodeV11\CAL\ESP\ESP_CAL_File.c
The init function is defined as an embedded function which just calls the C CAL function.
-
stefan.erni
- Valued Contributor
- Posts: 1290
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 246 times
- Been thanked: 257 times
Re: ESP32S3 SD-card init problem
Hi Ben
I'm one step further.
In the .h file
On your board (with Devkit), the pins are set correctly. On my ESP32 S3 Mini, they're not. All are set to 0
I'm one step further.
In the .h file
On your board (with Devkit), the pins are set correctly. On my ESP32 S3 Mini, they're not. All are set to 0
-
stefan.erni
- Valued Contributor
- Posts: 1290
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 246 times
- Been thanked: 257 times
Re: ESP32S3 SD-card init problem
Hi Ben
I think I've found a solution.
I need to use $portA. The map initially has a value of 0 now
I think I've found a solution.
I need to use $portA. The map initially has a value of 0 now
-
BenR
- Matrix Staff
- Posts: 2307
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 639 times
- Been thanked: 848 times