Hello,
My project has a requirement for external flash memory to store some data as well as the internal ram is not sufficient so I have to enable external SPI ram under menuconfig to store .bss data. I referred to the example code https://github.com/espressif/esp-idf/tr ... lash_fatfs. So when I make changes to example code as per my requirement I get this "ESP_ERR_INVALID_ARG" error from this function "spi_bus_add_flash_device". I am attaching the sdkconfig files with the changes that I have made please use those in the code that you build.
Cannot access External Flash memory when External SPI Ram enabled
Cannot access External Flash memory when External SPI Ram enabled
- Attachments
-
- sdkconfig.zip
- (11.08 KiB) Downloaded 495 times
Re: Cannot access External Flash memory when External SPI Ram enabled
Hi,
It sounds like you've run into an issue that I reported a while back:
https://github.com/espressif/esp-idf/issues/4379
As a work-around until Espressif makes a fix, you can patch spi_bus_add_flash_device() to always use MALLOC_CAP_INTERNAL when allocating memory for the SPI bus driver struct.
It sounds like you've run into an issue that I reported a while back:
https://github.com/espressif/esp-idf/issues/4379
As a work-around until Espressif makes a fix, you can patch spi_bus_add_flash_device() to always use MALLOC_CAP_INTERNAL when allocating memory for the SPI bus driver struct.
Re: Cannot access External Flash memory when External SPI Ram enabled
Thanks, it worked.
Re: Cannot access External Flash memory when External SPI Ram enabled
@devanl will this workaround cause any issues in the heap allocation?
Re: Cannot access External Flash memory when External SPI Ram enabled
Re: Cannot access External Flash memory when External SPI Ram enabled
Hi, we have just found that when using SPIRAM_USE_MALLOC, it may call a wrong logic. Your issue is very similar to this. Please take a look on https://github.com/espressif/esp-idf/issues/4379. I hope the comment following will help you.
Who is online
Users browsing this forum: No registered users and 149 guests