Hello everyone,
On some ESP32-Pico-D4 I started to try use the internal SPI Flash Memory of 4MB.
I'm using Arduino IDE 1.8.8 and the Espressif preferences library.
After changing some variable and values in my Memory function, suddenly cannot more use the Memory, it always crash and reboot
this on the serial monitor
"***ERROR*** A stack overflow in task loopTask has been detected.
abort() was called at PC 0x4008b900 on core 1
Backtrace: 0x4008b6bc:0x3ffaf3f0 0x4008b8e9:0x3ffaf410 0x4008b900:0x3ffaf430 0x40088b74:0x3ffaf450 0x4008a69c:0x3ffaf470 0x4008a652:0xfefefefe
Rebooting..."
If I don't use the memory the rest of the code and CPU works fine, but I need the memory..
uploading other previous or new codes doesn't solve the problem, it seems that the memory is damaged, but for me it's strange because I only uploaded some code..
So I searched a way to reset the Pico to the factory state (like a flash bootloader file), but only found the "Flash Download Tools (ESP8266 & ESP32 & ESP32-S2)" from Espressif which hasn't any indication for the Pico-D4 version and I'm not sure if I can use it.
Does anyway know if and how it's possible to reset to the Pico to factory, or reset the memory?
unfortunately the documentation doesn't explain much more.
Thanks
Dan
ESP32-pico-d4 bootloader flash after internal memory crash
-
- Posts: 6
- Joined: Fri Mar 06, 2020 1:18 pm
-
- Posts: 9719
- Joined: Thu Nov 26, 2015 4:08 am
Re: ESP32-pico-d4 bootloader flash after internal memory crash
Nothing is damaged, your program just uses too much stack space. Move some large variables away from stack allocated to statically or heap allocated, and everything should run again.
-
- Posts: 6
- Joined: Fri Mar 06, 2020 1:18 pm
Re: ESP32-pico-d4 bootloader flash after internal memory crash
Hi, thanks for reply.
I'm trying to reduce the variable size of the simpler code I have which use the memory:
with a very basic one where I just save and access one fixed memory point it works.
but when I go back to a version where I try save and access more points, it always generate the error.. the only way to get rid of is when I comment out the memory functions.. and yesterday the same code and variable worked for some time.
It's like some memory sector are "damaged" (maybe with the wrong data) and cannot more use it. for this I wanted at least to try go back to a default factory state or just erase the internal memory.
But I could not find a way.
I know it's difficult to understand, if you want I can pass you the code.
Thanks
Dan
I'm trying to reduce the variable size of the simpler code I have which use the memory:
with a very basic one where I just save and access one fixed memory point it works.
but when I go back to a version where I try save and access more points, it always generate the error.. the only way to get rid of is when I comment out the memory functions.. and yesterday the same code and variable worked for some time.
It's like some memory sector are "damaged" (maybe with the wrong data) and cannot more use it. for this I wanted at least to try go back to a default factory state or just erase the internal memory.
But I could not find a way.
I know it's difficult to understand, if you want I can pass you the code.
Thanks
Dan
-
- Posts: 9719
- Joined: Thu Nov 26, 2015 4:08 am
Re: ESP32-pico-d4 bootloader flash after internal memory crash
Sure, you can either post the code here or PM me a link if you want to keep it private.
Who is online
Users browsing this forum: No registered users and 31 guests