I am trying to build sensors based on RP2040 MCU and I've been struggling with this problem for days now and can not solve it by myself.
After burning .UF2 via USB or via SWD/OpenOCD the board runs perfectly. I can restart it through debugger and it works fine too - GPIO, peripherals, USB - everything. After power cycle OR pulling "RUN" pin low, the device won't boot up. The debugger says that it gets stuck in 'clock.c' -> 'bool clock_configure(...);' somewhere around lines 100-115. I can not guarantee this because it is accompanied by a lot of errors.
I have 10 pcs of custom boards from JLCPCB. 5 of them are working perfectly fine even after powercycle, 5 of them won't boot again. The boot to USB MASS device is always fine though.
What is not a problem:
- XOSC is okay
- Everything is soldered okay as it runs fine until reset/power cycle
- MCU tries to read from flash but it gets stuck in clock init
- tested plain LED blink software with nothing but GPIOs, it works on more - 7 out of 10 PCBs, still not all of them.
- Raised PICO_XOSC_STARTUP_DELAY_MULTIPLIER from 128 up to 4096 - does not work.
- Raised PICO_FLASH_SPI_CLKDIV up to 64 - does not work either.
- Disabled watchdog - not an issue
- tried debug/release/different versions of SDK - still no improvement.
I followed this design guide very precisely:
https://datasheets.raspberrypi.com/rp20 ... rp2040.pdf
I tried to compare it to official pico board on oscilloscope and I did not notice anything unusual. PCB and schematic attached.
Any hints guys? I like RP2040 A LOT and I definitely want to build things with it!
3V3 power supply:
Schematic - MCU