-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Adafruit Feather RP2040 fixes #279
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
Adafruit Feather RP2040 fixes #279
Conversation
I encounter the issue with |
See #275 😉 |
Yup, for |
@lurch @kilograham thanks for the link to #275 (and apologies for not taking a look at the issue list prior to opening this PR). Would you prefer I drop commit 57e51b4 from this pull request? Alternatively, as an interim solution, would it make sense for the default in |
@sandeepmistry Thanks for the PR, I was able to get blink/ from the examples working properly. |
Thanks for opening this PR! I was just about to look at this myself.
I just changed this. We now use our own templated C stage2 code that pulls flash info from our nvm.toml repo. This separates out the init code from specific flash skus. (It also uses 0xe7 quad word read which is 2 dummy cycles instead of 0xeb's four cycles.) One reason the I'd expect the 2 divisor to work with the quad setup after QE has been set. (The datasheet says commands work up to 80mhz.) However, it seems to be unreliable and the 4 divisor is a much safer bet. |
I've move #275 into our next bug fix release, so nothing going to happen b4 then - yes please remove 57e4 tho (and rebase to develop-1.1.1) |
57e51b4
to
3b24055
Compare
@kilograham done, please let me know if anything needs to be changed in this PR. |
Thanks @lurch That is great to know that we can add board-specific cmake file. while waiting for #275 should I add cmake for Feather rp2040 to dictate the boot stage2, or just wait for it since header only is nicer I guess. |
subsumed by #293 |
note 1.1.1 has been released which should fix feather issues |
The GD25Q64C flash on the Feather board doesn't support two-byte writes to the status register with the 01h command, instead it needs a 31h command to write the 2nd status register byte. Besides that, it's totally compatible with the Pico's W25Q080 flash. Add a new PICO_FLASH_SUPPORTS_WRITE_STATUS2 config option that changes the boot2 code to use 31h to write the status command. With this the Feather is able to run in fast QSPI mode rather than 4x slower single SPI mode (this difference is measurable in test code). Also double the SPI clock speed, using a clock divider of 2 rather than 4. The Feather seems to work fine with a divider of 2 in my testing. Much thanks to [1] for identifying what needs to change. [1] raspberrypi#279 (comment)
The following changes are based on information from the Adafruit forum: https://forums.adafruit.com/viewtopic.php?f=57&t=176745&p=860819&hilit=rp2040#p860819
The pre-built CircuitPython .uf2 was working on my board, but none of the
pico-examples
were without the following SDK changes.The board has 8 MB of flash according to the product page: https://www.adafruit.com/product/4884
CircultPython sets
PICO_FLASH_SPI_CLKDIV
to4
: https://github.com/adafruit/circuitpython/blob/main/ports/raspberrypi/Makefile#L237CircultPython uses
boot2_generic_03h.S
for boot2: https://github.com/adafruit/circuitpython/blob/main/ports/raspberrypi/Makefile#L236There's probably a better have a board specific
PICO_DEFAULT_BOOT_STAGE2_FILE
value instead of editingsrc/rp2_common/boot_stage2/CMakeLists.txt
- but I wanted to get the discussion going :)