Need help to start PSRAM support into ESP32 IDF 3.1

Ritesh
Posts: 1383
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: Need help to start PSRAM support into ESP32 IDF 3.1

Postby Ritesh » Thu Mar 07, 2019 6:31 pm

Hi,

I have looked below page for more understanding regarding configurations.

https://docs.espressif.com/projects/esp ... ram-config

So, Would anyone please suggest me like which configuration must be required and which configuration can be useful to use PSRAM without any issue?
Regards,
Ritesh Prajapati

Ritesh
Posts: 1383
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: Need help to start PSRAM support into ESP32 IDF 3.1

Postby Ritesh » Sat Mar 09, 2019 8:45 am

Hi Espressif System Developer,

Any Update regarding last post in which I have sent couple of queries regarding configuration of PSRAM?
Regards,
Ritesh Prajapati

User avatar
fly135
Posts: 606
Joined: Wed Jan 03, 2018 8:33 pm
Location: Orlando, FL

Re: Need help to start PSRAM support into ESP32 IDF 3.1

Postby fly135 » Sat Mar 09, 2019 4:47 pm

I use this approach with heap_caps_malloc(size, MALLOC_CAP_SPIRAM)...
Add external RAM to the capability allocator
Select this option by choosing “Make RAM allocatable using heap_caps_malloc(…, MALLOC_CAP_SPIRAM)” from CONFIG_SPIRAM_USE.

When enabled, memory is mapped to address 0x3F800000 but also added to the capabilities-based heap memory allocator using MALLOC_CAP_SPIRAM.

To allocate memory from external RAM, a program should call heap_caps_malloc(size, MALLOC_CAP_SPIRAM). After use, this memory can be freed by calling the normal free() function.
I suppose that you could also integrate it to malloc. But I like the other because I know for sure that I'm getting it from PSRAM.

John A

Ritesh
Posts: 1383
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: Need help to start PSRAM support into ESP32 IDF 3.1

Postby Ritesh » Sun Mar 10, 2019 6:08 am

fly135 wrote:
Sat Mar 09, 2019 4:47 pm
I use this approach with heap_caps_malloc(size, MALLOC_CAP_SPIRAM)...
Add external RAM to the capability allocator
Select this option by choosing “Make RAM allocatable using heap_caps_malloc(…, MALLOC_CAP_SPIRAM)” from CONFIG_SPIRAM_USE.

When enabled, memory is mapped to address 0x3F800000 but also added to the capabilities-based heap memory allocator using MALLOC_CAP_SPIRAM.

To allocate memory from external RAM, a program should call heap_caps_malloc(size, MALLOC_CAP_SPIRAM). After use, this memory can be freed by calling the normal free() function.
I suppose that you could also integrate it to malloc. But I like the other because I know for sure that I'm getting it from PSRAM.

John A
Thanks for update regarding same. I will check it and let you know if need any further help for same.
Regards,
Ritesh Prajapati

Who is online

Users browsing this forum: No registered users and 162 guests