Hi, I am working on a project required to erase/write flash memory on Raspberry Pi Pico inside a FreeRTOS task. I know in order to erase/write flash I need to disable interrupt, I tried wrap around flash function with taskENTER_CRITICAL() and taskExit_CRITICAL() but no luck, still freeze when flash erase is call. I removed FreeRTOS and just run the flash code by itself, it works fine. Below is the snippet of the flash function I am using.
Thanks for the reply, is there a way to disable interrupt for both core? I don’t have anything running on second core yet. I thought about could be the issue with second core but I didn’t find any info on it.
I don’t know the SMP code well enough to say, but it is unlikely. If you don’t need the second core, maybe you should just be running in single processor mode on just one core.
I didn’t try the single core version of FreeRTOS yet, not sure if thats the issue. I don’t have a debugger set up yet, I need to figure out how to add debugging flag in my CMake.