Page 1 of 1

which external flash can i use for replacing internal flash

Posted: Sat Feb 01, 2020 1:59 pm
by Partokus
Sorry for english and i am not very good in esp32.

I use ESP-32 WROVER-B 16MB

I want to use micro sd card as main memory and will connect paralelly with internal flash besides CS pin what give me set new flash instead internal. I have yet two questions.
1) What the maximum size of micro sd card can be?
2) I know i must reconfigure EFUSes all pins of SPI Bus and specially CS pin but what i to do else for my porpose?

Re: which external flash can i use for replacing internal flash

Posted: Sat Feb 01, 2020 4:56 pm
by ESP_Sprite
Let me stop you here:
I want to use micro sd card as main memory
If you mean 'instead of the internal SPI flash', that's not possible, period.

Re: which external flash can i use for replacing internal flash

Posted: Mon Feb 03, 2020 11:19 am
by Partokus
ESP_Sprite wrote:
Sat Feb 01, 2020 4:56 pm
If you mean 'instead of the internal SPI flash', that's not possible, period.
thank you for reply :D i just got that idea because i think micro sd card has flash memory and have SPI interface as internal SPI flash memory has... Tell me please why it is not possible?

Re: which external flash can i use for replacing internal flash

Posted: Mon Feb 03, 2020 3:42 pm
by ESP_Sprite
Because while both can be accessed over SPI, the higher interface to a SPI flash memory chip (so the commands, bitfields, general way the interface works) is entirely different from the SPI mode of an SD card. The hardware that is used inside the ESP32 to access it is only capable of speaking the protocol of SPI flash chips.

Re: which external flash can i use for replacing internal flash

Posted: Fri Feb 07, 2020 1:30 pm
by Partokus
ESP_Sprite wrote:
Mon Feb 03, 2020 3:42 pm
Thank you! Anyway i refused that idea by reason that i don't need sd card for mobile programming esp32 because i got knowledge about OTA programming! esp32 can programming through Wi-Fi it is awesome

Re: which external flash can i use for replacing internal flash

Posted: Sat Feb 15, 2020 11:59 pm
by PeterR
Although you could load programs from SD into IRAM and then execute.
I think Sprite is saying that the ESP32 extended memory capabilities (e.g. automatic cached flash execution) cannot be tied to an SD card.
If you're program fits in IRAM then you could load IRAM from SD. If not then maybe you can come up with a manual cache strategy. Latter is a bed of nails though. Adding external FLASH (as an ESP package option) is a lot cheaper than an SD card. Keep in mind that you may struggle to write to internal FLASH whilst your program runs in real time.