Hello,
When i used efused 16 MB external flash with PSRAM my board is rebooting ,when i enable PSRAM in make menuconfig.When PSRAM option is disable my board works fine and able to acess both 4MB and 16 MB flash.
its shows back trace at psram_init() API.
I used External flash W25Q128FWSIG-SOIC8.
Is there any configuration required to use PSRAM when i am using efused external FLASH(use as default bootable flash )?
I looked following thread , but i cant find any solution regarding this issue.
viewtopic.php?f=12&t=2884
If anyone know about this issue let me know ASAP.
Need Help to use PSRAM with External efused Flash(16 MB)
-
- Posts: 23
- Joined: Thu Oct 26, 2017 7:34 am
-
- Posts: 9757
- Joined: Thu Nov 26, 2015 4:08 am
Re: Need Help to use PSRAM with External efused Flash(16 MB)
If I'm understanding this correctly, you're using efuses to re-route the flash pins used so the module boots from a flash chip that is external, instead of the internal one? Then I'm afraid you cannot use the internal PSRAM anymore. The PSRAM shares its data lines with the flash, and your efuse redirection of those lines probably routed those lines away from the psram as well.
Re: Need Help to use PSRAM with External efused Flash(16 MB)
Hi,ESP_Sprite wrote:If I'm understanding this correctly, you're using efuses to re-route the flash pins used so the module boots from a flash chip that is external, instead of the internal one? Then I'm afraid you cannot use the internal PSRAM anymore. The PSRAM shares its data lines with the flash, and your efuse redirection of those lines probably routed those lines away from the psram as well.
Myself Ritesh Prajapati, I am working with Pratik Yadav.
Let me clear exact scenario in details.
We have used ESP32-WROVER-I module for our development purpose in one of our product.
Initially, We had planned to use internal memory only but in later stage we decided to add external flash memory as per our product Requirement.
So, We have connected external SPI Flash Memory on same connection with module's internal flash memory except CS pin. We have used different pin for CS pin. And also PSRAM is configured same interface with different CS pin I believe.
So, We are now planning to move to external flash memory as bootable flash memory for our product.
So, Pratik has configured only SPI Flash related configurations as internal flash and CS pin as different GPIO.
I think that should work without any issue means can access external SPI Flash memory + PSRAM wherever required.
Let me know if we have did anything wrong in that EFUSE configurations or something like that.
Regards,
Ritesh Prajapati
Ritesh Prajapati
Re: Need Help to use PSRAM with External efused Flash(16 MB)
Hi,
I have checked both queries and found that PSRAM will work only with flash CS as default GPIO11.
Let me correct if I am wrong.
Also, we had did all EFUSE parameter settings in which all settings are kept as same as internal except CS GPIO.
Regards,
Ritesh Prajapati
Ritesh Prajapati
Re: Need Help to use PSRAM with External efused Flash(16 MB)
This is a rabbit hole that we went down, and lost about two months (on top of another three months chasing an SDCARD bug vs external flash).
The idea is great. Just use another GPIO for a CS line, add an external flash chip, and burn the eFuses. For the WROOM32, we got it to working ok (apart from the SD CARD issue which dragged on for months, and was finally resolved in a firmware update).
But, then we find that for large projects with both Wifi and Bluetooth stacks running, there just isn't enough RAM in the ESP32. So, how about SPI RAM...
For the WROVER, things get messy. Firstly, VDD_SDIO is 1.8v and both flash and ram needs to be 1.8v, and driven by 1.8v VDD_SDIO domain pins. GPIO 16 and 17 are used for the SPI RAM. So, that leaves no more free VDD_SDIO domain GPIOs. Secondly, VDD_SDIO is not exposed outside the module.
Solution is seemingly to add a second voltage regulator at 1.8v to power the external flash chip. Then, use a 3.3v->1.8v level converter to be able to use a 3.3v GPIO to control the CS of the 1.8v external flash.
Problem is that that level converter has a propogation delay. Couple that with the Espressif implementation of SPI RAM clock being delayed with respect to SPI flash clock, and we start to have timing issues on the CS pin. Then, the nail in the coffin is that the Espressif ESP IDF SPI RAM driver implementation hard-codes the SPI bus GPIOs (ignoring eFuses).
We didn't even start looking at low-power consumption (deep sleep, etc) - our external VDD_SDIO regulation isn't controlled by that, so we'd have to do something special with software powering down our external flash.
Sorry if this sounds negative, but it is just too much hassle. For low volume, it is easier to swallow the cost and use Analog Lamb WROVER modules with 16MB flash. Hopefully some other suppliers will come out with similar offerings (16MB flash 4MB ram WROVER modules) to bring some competition. Given the 50cents price difference in components, and so much hassle trying to use external flash, I've never understood why this is so difficult.
The idea is great. Just use another GPIO for a CS line, add an external flash chip, and burn the eFuses. For the WROOM32, we got it to working ok (apart from the SD CARD issue which dragged on for months, and was finally resolved in a firmware update).
But, then we find that for large projects with both Wifi and Bluetooth stacks running, there just isn't enough RAM in the ESP32. So, how about SPI RAM...
For the WROVER, things get messy. Firstly, VDD_SDIO is 1.8v and both flash and ram needs to be 1.8v, and driven by 1.8v VDD_SDIO domain pins. GPIO 16 and 17 are used for the SPI RAM. So, that leaves no more free VDD_SDIO domain GPIOs. Secondly, VDD_SDIO is not exposed outside the module.
Solution is seemingly to add a second voltage regulator at 1.8v to power the external flash chip. Then, use a 3.3v->1.8v level converter to be able to use a 3.3v GPIO to control the CS of the 1.8v external flash.
Problem is that that level converter has a propogation delay. Couple that with the Espressif implementation of SPI RAM clock being delayed with respect to SPI flash clock, and we start to have timing issues on the CS pin. Then, the nail in the coffin is that the Espressif ESP IDF SPI RAM driver implementation hard-codes the SPI bus GPIOs (ignoring eFuses).
We didn't even start looking at low-power consumption (deep sleep, etc) - our external VDD_SDIO regulation isn't controlled by that, so we'd have to do something special with software powering down our external flash.
Sorry if this sounds negative, but it is just too much hassle. For low volume, it is easier to swallow the cost and use Analog Lamb WROVER modules with 16MB flash. Hopefully some other suppliers will come out with similar offerings (16MB flash 4MB ram WROVER modules) to bring some competition. Given the 50cents price difference in components, and so much hassle trying to use external flash, I've never understood why this is so difficult.
Re: Need Help to use PSRAM with External efused Flash(16 MB)
Hi All,
As we changed SPI Flash Chip Select GPIO from internal to external CS GPIO into SPI PSRAM code defined. Now, We are able to access external Flash Memory + Internal Flash Memory + PSRAM.
So, PSRAM code needs to be changed and configurable as per EFUSE Chip Select Parameters.
As we changed SPI Flash Chip Select GPIO from internal to external CS GPIO into SPI PSRAM code defined. Now, We are able to access external Flash Memory + Internal Flash Memory + PSRAM.
So, PSRAM code needs to be changed and configurable as per EFUSE Chip Select Parameters.
Regards,
Ritesh Prajapati
Ritesh Prajapati
Re: Need Help to use PSRAM with External efused Flash(16 MB)
Hi All,
As per discussion with Espressif Systems Developer over email, They will include fix for this issue regarding PSRAM code specific to SPI bootable CS Pin configuration into stable 3.1 ESP32 IDF Release.
Thanks for your support for that.
As per discussion with Espressif Systems Developer over email, They will include fix for this issue regarding PSRAM code specific to SPI bootable CS Pin configuration into stable 3.1 ESP32 IDF Release.
Thanks for your support for that.
Regards,
Ritesh Prajapati
Ritesh Prajapati
Who is online
Users browsing this forum: No registered users and 302 guests