This looks to be the problem with Flash: https://github.com/raspberrypi/pico-sdk/issues/2333
SDK/ROM resets the default settings after a Flash write.
It is similar with this (PSRAM - was fixed):
Flash operations overwrite PSRAM QMI configuration registers #1983
https://github.com/raspberrypi/pico-sdk/issues/1983
Can use earlephilhower's workaround (but for Flash), saving and restoring Flash settings after each write:
SDK/ROM resets the default settings after a Flash write.
It is similar with this (PSRAM - was fixed):
Flash operations overwrite PSRAM QMI configuration registers #1983
https://github.com/raspberrypi/pico-sdk/issues/1983
Can use earlephilhower's workaround (but for Flash), saving and restoring Flash settings after each write:
As a workaround, by using GCC to wrap the flash functions and manually saving/restoring the registers, we're able to both access PSRAM and write to flash. I haven't gone through the RP2350 ROM code, but I would guess as part of the XIP restart after a flash command it is setting what it things are "safe" values to the QMI regions which is great for chip reset, but not so good for when things are already configured.
Statistics: Posted by gmx — Mon Jun 30, 2025 1:01 am