Page 1 of 1

External ram config explanation

Posted: Sat Feb 09, 2019 1:34 pm
by snahmad75
#
# SPI RAM config
#
CONFIG_SPIRAM_BANKSWITCH_ENABLE=y
CONFIG_SPIRAM_BANKSWITCH_RESERVE=8
CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=4096
CONFIG_WIFI_LWIP_ALLOCATION_FROM_SPIRAM_FIRST=
CONFIG_SPIRAM_MALLOC_RESERVE_INTERNAL=45768
CONFIG_SPIRAM_ALLOW_STACK_EXTERNAL_MEMORY=
CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY=y


Can some one explain these settings. any recommended setting by default.

Re: External ram config explanation

Posted: Sun Feb 10, 2019 9:51 am
by Ritesh
snahmad75 wrote:
Sat Feb 09, 2019 1:34 pm
#
# SPI RAM config
#
CONFIG_SPIRAM_BANKSWITCH_ENABLE=y
CONFIG_SPIRAM_BANKSWITCH_RESERVE=8
CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=4096
CONFIG_WIFI_LWIP_ALLOCATION_FROM_SPIRAM_FIRST=
CONFIG_SPIRAM_MALLOC_RESERVE_INTERNAL=45768
CONFIG_SPIRAM_ALLOW_STACK_EXTERNAL_MEMORY=
CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY=y


Can some one explain these settings. any recommended setting by default.
Hi,

Which ESP32 IDF you are using? Also are you trying to enable external SPI PSRAM?

First of all, try with default example provided into default config file then you can enable BSS, Stack and other sections as per your requirement.

Re: External ram config explanation

Posted: Sun Feb 10, 2019 7:38 pm
by snahmad75
Hi,

I am using latest ESP32 IDF version=3.2. Yes I know i am using external SPI PSRAM.


I am also tried with default example provided into default config file. After this remaining internal RAM is low about 50k. not enough for my application.

I changed to enable BSS, Stack then I got remaining internal RAM of about 70k. I wonder it cause slow processing of my application. as one of Task watch dog kicks in. not enough processing. It could be slow due to external ram usage.

Re: External ram config explanation

Posted: Mon Feb 11, 2019 1:12 am
by Ritesh
snahmad75 wrote:
Sun Feb 10, 2019 7:38 pm
Hi,

I am using latest ESP32 IDF version=3.2. Yes I know i am using external SPI PSRAM.


I am also tried with default example provided into default config file. After this remaining internal RAM is low about 50k. not enough for my application.

I changed to enable BSS, Stack then I got remaining internal RAM of about 70k. I wonder it cause slow processing of my application. as one of Task watch dog kicks in. not enough processing. It could be slow due to external ram usage.
Would you please check CPU clock frequency at that time? Is it maximum after enabling SPI PSRAM?

I belive it should not impact into existing working system if you enable external RAM configuration. Still, Please make sure rest of configurations are proper or not.

Also would you please try with disabling external with same application and working fine as per your requirements?

If that is working then need to check into details specific to external RAM configuration and component section.