-
-
Notifications
You must be signed in to change notification settings - Fork 40k
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
RP2040 emulated EEPROM. #17519
RP2040 emulated EEPROM. #17519
Conversation
Having the EEPROM emulation so fast after the RP2040 merge to develop is really awesome! Thanks for your hard work 🎉 I have tested the code and it works fine on a regular RPI Pico, Sparkfun RP2040, Elite-pi and Splinky boards - all with different QSPI flash chips. Reading through the code I noticed some opportunities for clean-up and improvements that are due to the fact that we know the exact use-cases for the flashing code before hand. I'm not sure how much time the bulk write saves but attaching and detaching the whole qspi flash for a single 16bit write seems a bit excessive. I have attached my findings as patch file as a suggestion how I would solve it. |
@KarlK90 -- added, tweaked to do bulk actual read/write operations instead of piecemeal. Seems to work fine. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have tested the changes with all the boards that I have at hand and it works just fine. When testing it with the wear leveling "test keyboard" the scan rate improved from 9k to 11k, that is nice! Should rp2040_flash
be added to the wear leveling docs? Otherwise this is good to go in from my side.
|
||
// Define how much flash space we have (defaults to lib/pico-sdk/src/boards/include/boards/***) | ||
#ifndef WEAR_LEVELING_RP2040_FLASH_SIZE | ||
# define WEAR_LEVELING_RP2040_FLASH_SIZE (PICO_FLASH_SIZE_BYTES) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we should revisit this once we have the information in the QMK repository.
platforms/chibios/drivers/wear_leveling/wear_leveling_rp2040_flash.c
Outdated
Show resolved
Hide resolved
platforms/chibios/drivers/wear_leveling/wear_leveling_rp2040_flash.c
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, LGTM
A quick test on the Splinky (RP2040-based board, https://github.com/plut0nium/0xB2), and I can confirm that Via now works out of the box. Thanks for the continuous efforts to support RP2040! 🙏 |
@0xcharly Could you share your sample code? I can build the firmware successfully now but VIA doesn't work with it. |
You can have a look at any of the |
@0xcharly Thanks, it works with VIA v2 now. However, VIA v2 seems buggy, compared with v1. |
Description
As it says on the title.
Docs forthcoming.
Types of Changes
Checklist