Can i use the external RAM as the stack for the task?

zhoupeng
Posts: 35
Joined: Sun Sep 24, 2017 1:31 pm

Can i use the external RAM as the stack for the task?

Postby zhoupeng » Mon Feb 12, 2018 8:19 am

Opening multiple tasks is a lack of space. I try to use external RAM as an extension, but see

//Because the ROM routines don't necessarily handle a stack in external RAM correctly, we force
//the stack memory to always be internal.

if there is an unpredictable error in the annotation.

ESP_Sprite
Posts: 9761
Joined: Thu Nov 26, 2015 4:08 am

Re: Can i use the external RAM as the stack for the task?

Postby ESP_Sprite » Tue Feb 13, 2018 4:20 am

Moved news -> SDK

The annotation is right: we have disabled putting stack in PSRAM because in the current ESP32 chip, it can lead to very subtle, very hard to replicate errors that don't necessarily show up as being a result of the task using PSRAM as stack. If you really, really, *really* have a task with a stack you want to put in external RAM, you're 102% sure it does not call ROM functions anywhere and will never run when PSRAM is not available, you can actually disable the stack-in-psram check for xTaskCreateStatic-ish functions somewhere in menuconfig and then use that to give your task psram memory as stack. Still, this comes with absolutely no guarantee wrt weird crashes from our (Espressifs) side.

Who is online

Users browsing this forum: Gaston1980 and 140 guests