There is a fundamental issue with RP2040 and slow-rising power supplies (this is NOT a bug/erratum - it's just a fact of life given the specification of the device and needs to be taken into account in the design).
Given that the RP2040 is specified to be able to run from 1.8V power, the power-on reset lets the CPU start running when the power rail reaches about 1V (datasheet 2.12.2.1). However, if the flash is a 3V part then the flash will not yet be usable. The RP2040 reset sequence (hardware and the bootrom software) does impose a delay before the first access to the flash, but if the power rail is rising very slowly then the flash may not be ready by the time the bootrom tries to boot from it, causing invalid contents to be read from the flash.
If you do need to boot reliably from slow power rails, then the standard solution is to fit a power monitor feeding the RP24040 RUN pin - keeping it in reset until the power supply is stable (there are thousands of chips available to do this job - one example chosen at random is the APX803L05-30SA-7).
However, although that explanation would fit your symptoms of working reliably on a unplug/replug but not at power-up of the PC, the usual failure mode is that the RP2040 fails to identify the flash at all and ends up in bootrom mode, while yours appears to load at least the first level from the flash and crash a bit later. That could still be power related, but seems less likely to be precisely this problem - though it still could be if the power rail has risen just enough to load the code out of the flash but then droops again as power consumption increases as the unit boots.
The other issue often seen with own-design PCBs that is "fixed" by PICO_XOSC_STARTUP_DELAY_MULTIPLIER is problems with the crystal. You said that you'd tried that, but didn't say how much it helped. Such problems are usually down to wrong crystal/bad layout around the crystal/wrong crystal loading caps. If you use precisely the crystal specified in the datasheet with short and tidy layout then it is likely to work "out of the box". If you've done anything different, then it's likely at minimum to need tuning of the crystal loading capacitors to get reliable operation.
Given that the RP2040 is specified to be able to run from 1.8V power, the power-on reset lets the CPU start running when the power rail reaches about 1V (datasheet 2.12.2.1). However, if the flash is a 3V part then the flash will not yet be usable. The RP2040 reset sequence (hardware and the bootrom software) does impose a delay before the first access to the flash, but if the power rail is rising very slowly then the flash may not be ready by the time the bootrom tries to boot from it, causing invalid contents to be read from the flash.
If you do need to boot reliably from slow power rails, then the standard solution is to fit a power monitor feeding the RP24040 RUN pin - keeping it in reset until the power supply is stable (there are thousands of chips available to do this job - one example chosen at random is the APX803L05-30SA-7).
However, although that explanation would fit your symptoms of working reliably on a unplug/replug but not at power-up of the PC, the usual failure mode is that the RP2040 fails to identify the flash at all and ends up in bootrom mode, while yours appears to load at least the first level from the flash and crash a bit later. That could still be power related, but seems less likely to be precisely this problem - though it still could be if the power rail has risen just enough to load the code out of the flash but then droops again as power consumption increases as the unit boots.
The other issue often seen with own-design PCBs that is "fixed" by PICO_XOSC_STARTUP_DELAY_MULTIPLIER is problems with the crystal. You said that you'd tried that, but didn't say how much it helped. Such problems are usually down to wrong crystal/bad layout around the crystal/wrong crystal loading caps. If you use precisely the crystal specified in the datasheet with short and tidy layout then it is likely to work "out of the box". If you've done anything different, then it's likely at minimum to need tuning of the crystal loading capacitors to get reliable operation.
Statistics: Posted by arg001 — Tue Jun 10, 2025 9:34 am