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 <dhs@frame.work>
This commit is contained in:
Daniel Schaefer 2023-08-07 14:21:13 +08:00
parent 7c2001a515
commit 8093dfeb18

View File

@ -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