Which pins to use for SD card acces? (SD/SPI vs HSPI/JTAG/SD vs VSPI/SPI-Mode)
Posted: Thu Dec 15, 2016 4:31 pm
We have been testing the ESP32 a few weeks now and are amazed by this chip. There is one thing though that bothers/hinders us in the current development of the hardware of one of our projects: SD Card support.
To put this first: this is not a high throughput multimedia type of application but rather data logging related. Therefore squeezing out the last bit of performance should not be necessary here.
We have identified three possibilities to implement SD Card support:
1. via the SD/SPI-Interface shared or instead of the "classic" external flash (pins 28-33)
2. via secondary SD-Pins located at HSPI-/JTAG-Pins (pins 17,18,20-22,24)
3. in SPI-Mode via VSPI (pins 34-36, 38)
All of them have different pros and cons which we can not totally oversee yet. Questions that arose are (grouped for the variant):
1. Here I see a bunch of issues:
- Could SD cards be used instead of the flash as a boot device here? Would this work also in FAT32 if yes
- Is there a timeframe for when there will be documentation/idf-support for this port and/or boot mode?
- Will there be an "out of the box solution" to use sd cards parallel to the main flash ic via different CS-pins?
2. Here only two issues bother me:
- What possibilities would be there to have something like an non conflict mode with JTAG (We would love to keep JTAG. Although we do not necessary need to use it in parallel with SD. Especially as SD card access only occurs at longer intervals.)
- Same as for 1. we would need to have some documentation/lib-support (best case also for FAT32) to get started here quickly. Therefor any hint on the roadmap would be helpful.
3. Here the only critical thing I see is speed. There is at least some support via ported Arduino SD-lib. Do you see any other pitfalls here? Is there some official SD support via SPI planned?
So TLDR: We are on the last steps in the dev process on our board and want to know which SD interface to implement. Our current "fallback/safety net" solution would be to implement (3.) it over VSPI.
I know related questions have been asked in different threads but since there was no clarity on these points I wanted to put all my thoughts together here.
Any feedback on this topic would be highly appreciated!
To put this first: this is not a high throughput multimedia type of application but rather data logging related. Therefore squeezing out the last bit of performance should not be necessary here.
We have identified three possibilities to implement SD Card support:
1. via the SD/SPI-Interface shared or instead of the "classic" external flash (pins 28-33)
2. via secondary SD-Pins located at HSPI-/JTAG-Pins (pins 17,18,20-22,24)
3. in SPI-Mode via VSPI (pins 34-36, 38)
All of them have different pros and cons which we can not totally oversee yet. Questions that arose are (grouped for the variant):
1. Here I see a bunch of issues:
- Could SD cards be used instead of the flash as a boot device here? Would this work also in FAT32 if yes
- Is there a timeframe for when there will be documentation/idf-support for this port and/or boot mode?
- Will there be an "out of the box solution" to use sd cards parallel to the main flash ic via different CS-pins?
2. Here only two issues bother me:
- What possibilities would be there to have something like an non conflict mode with JTAG (We would love to keep JTAG. Although we do not necessary need to use it in parallel with SD. Especially as SD card access only occurs at longer intervals.)
- Same as for 1. we would need to have some documentation/lib-support (best case also for FAT32) to get started here quickly. Therefor any hint on the roadmap would be helpful.
3. Here the only critical thing I see is speed. There is at least some support via ported Arduino SD-lib. Do you see any other pitfalls here? Is there some official SD support via SPI planned?
So TLDR: We are on the last steps in the dev process on our board and want to know which SD interface to implement. Our current "fallback/safety net" solution would be to implement (3.) it over VSPI.
I know related questions have been asked in different threads but since there was no clarity on these points I wanted to put all my thoughts together here.
Any feedback on this topic would be highly appreciated!