Skip to content

Commit

Permalink
Fix waveshare_rp2040_zero USB unrecognize after unplug and replug (#1421
Browse files Browse the repository at this point in the history
)

Some RP2040-Zero boards from WaveShare can only be recognized via USB
after flashing UF2 into it, and if you unplug and replug it, nothing
happens on both USB host and device, RP2040-Zero seems just not booting.

According to @ArkBrj, it seems that setting `PICO_FLASH_SPI_CLKDIV` to
`2` makes the clock chip exceed the spec, setting it to `4` fixes this
bug.

I tested it with the blink program in pico-examples, this does fix the
bug for me.

Fixes <#1304>.
  • Loading branch information
AlynxZhou authored Dec 15, 2023
1 parent 7ed83dd commit 7dcb984
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/boards/include/boards/waveshare_rp2040_zero.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@
#define PICO_BOOT_STAGE2_CHOOSE_W25Q080 1

#ifndef PICO_FLASH_SPI_CLKDIV
#define PICO_FLASH_SPI_CLKDIV 2
#define PICO_FLASH_SPI_CLKDIV 4
#endif

#ifndef PICO_FLASH_SIZE_BYTES
#define PICO_FLASH_SIZE_BYTES (2 * 1024 * 1024)
#endif

// All boards have B1 RP2040
#ifndef PICO_RP2040_B0_SUPPORTED
#ifndef PICO_RP2040_B0_SUPPORTED
#define PICO_RP2040_B0_SUPPORTED 0
#endif

Expand Down

0 comments on commit 7dcb984

Please sign in to comment.