-
Notifications
You must be signed in to change notification settings - Fork 889
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect PICO_FLASH_SPI_CLKDIV for WaveShare RP2040-Zero #1304
Comments
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 <raspberrypi#1304>.
I meet this problem too with 2 of 3 RP2040-Zeros I bought, a interesting thing is I found setting But your words are more reasonable, and I tried your suggestion, it does fix the bug, so I submit a PR according to this issue. Thanks! |
In case it's useful, see the related discussion in #401 |
Thanks! My test shows that only change |
) 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>.
merged into develop |
…spberrypi#1421) 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 <raspberrypi#1304>.
src\boards\include\boards\waveshare_rp2040_zero.h sets PICO_FLASH_SPI_CLKDIV to 2.
However, according to the board schematics (https://www.waveshare.com/w/upload/4/4c/RP2040_Zero.pdf), this board uses Winbond W25Q16JVUXIQ chip. According to the chip's datasheet (https://www.winbond.com/resource-files/w25q16jv%20spi%20revh%2004082019%20plus.pdf), its max Clock frequency for Read Data instruction (03h) is 50 MHz (Section 10.6 AC Electrical Characteristics). PICO_FLASH_SPI_CLKDIV of 2 sets the clock to around 60 MHz exceeding the spec.
In my experiments with various binaries I see that the code always works right after flashing it, but does not work after restarting the board. This includes the officially released binary for picoprobe.
For home-built projects Debug binaries sometimes work even after reset but Release do not. Sometimes even Debug binaries do not work after reset.
CircuitPython works fine because it uses PICO_FLASH_SPI_CLKDIV of 4 (confirmed by disassembling the binary).
I think PICO_FLASH_SPI_CLKDIV should be set to 4 in SDK for this board.
The text was updated successfully, but these errors were encountered: