From 8093dfeb1861ba9f114ad016ce214c5bdfa94778 Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Mon, 7 Aug 2023 14:21:13 +0800 Subject: [PATCH] fl16: Increase EEPROM size and reserve last 4K sector More space, more wear leveling and don't use sector that's reserved for the serial number. Signed-off-by: Daniel Schaefer --- keyboards/framework/config.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/keyboards/framework/config.h b/keyboards/framework/config.h index 812535b6d1..89d9eeaf06 100644 --- a/keyboards/framework/config.h +++ b/keyboards/framework/config.h @@ -6,6 +6,18 @@ // Allow (emulated) EEPROM reset using VIA #define VIA_EEPROM_ALLOW_RESET +// Increase to 16K for more storage space +// With 64K backing size, this spread the wear level over 4 blocks +#define WEAR_LEVELING_LOGICAL_SIZE (4*4096) +// Increase to 64K backing size to allow more wear leveling +#define WEAR_LEVELING_BACKING_SIZE (16 * 4096) +// We use 1MB flash +#define PICO_FLASH_SIZE_BYTES (1 * 1024 * 1024) +#define WEAR_LEVELING_RP2040_FLASH_SIZE PICO_FLASH_SIZE_BYTES +// Keep the last 4K sector free for the serial number +#define WEAR_LEVELING_RP2040_FLASH_BASE ((PICO_FLASH_SIZE_BYTES) - (WEAR_LEVELING_BACKING_SIZE + 4096)) + + // Prints every second how many matrix scans were done (Frequency in Hz) // Only during debugging, since it prevents the host from going to sleep //#define DEBUG_MATRIX_SCAN_RATE