Task with stack in RTC memory crashes when writing to flash

avasilev
Posts: 5
Joined: Sun Jan 08, 2023 3:45 pm

Task with stack in RTC memory crashes when writing to flash

Postby avasilev » Mon Dec 16, 2024 12:59 am

I have attempted to use RTC FAST memory as a task's stack, and it works, until the task attempts to do a flash write operation, which causes a crash, but the printed stack dump has only one frame and is flagged as corrupted. I didn't find any information about limitations when using RTC memory as stack, or any evidence that someone has tried it. So, is it actually possible to write to flash from code in RTC memory, and are there any caveats when using RTC memory as stack?

MicroController
Posts: 2705
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: Task with stack in RTC memory crashes when writing to flash

Postby MicroController » Tue Dec 24, 2024 9:47 pm

are there any caveats when using RTC memory as stack?
You mean besides the fact that, on the ESP32, only one of the two CPU cores (the "PRO CPU") can access RTC fast memory, and that RTC memory is usually slower to access than normal SRAM?

avasilev
Posts: 5
Joined: Sun Jan 08, 2023 3:45 pm

Re: Task with stack in RTC memory crashes when writing to flash

Postby avasilev » Mon Jun 09, 2025 11:40 am

Yes, besides these. I am aware of them.

Who is online

Users browsing this forum: No registered users and 3 guests