aboutsummaryrefslogtreecommitdiff
path: root/docs/drivers/flash.md
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2024-06-02 12:42:24 +1000
committerGitHub <noreply@github.com>2024-06-02 12:42:24 +1000
commit78a0adfbb4d2c4e12f93f2a62ded0020d406243e (patch)
treee6e123b36569559233025add654580e090dc0154 /docs/drivers/flash.md
parentfa6d23235bf429446250cd5212e209d5fbfdbac2 (diff)
[docs] Organize driver & feature docs into subfolders (#23848)
Co-authored-by: Nick Brassel <nick@tzarc.org>
Diffstat (limited to 'docs/drivers/flash.md')
-rw-r--r--docs/drivers/flash.md26
1 files changed, 26 insertions, 0 deletions
diff --git a/docs/drivers/flash.md b/docs/drivers/flash.md
new file mode 100644
index 0000000000..4160721350
--- /dev/null
+++ b/docs/drivers/flash.md
@@ -0,0 +1,26 @@
+# FLASH Driver Configuration {#flash-driver-configuration}
+
+The FLASH driver can be swapped out depending on the needs of the keyboard, or whether extra hardware is present.
+
+Driver | Description
+-----------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+`FLASH_DRIVER = spi` | Supports writing to almost all NOR Flash chips. See the driver section below.
+
+
+## SPI FLASH Driver Configuration {#spi-flash-driver-configuration}
+
+Currently QMK supports almost all NOR Flash chips over SPI. As such, requires a working spi_master driver configuration. You can override the driver configuration via your config.h:
+
+`config.h` override | Description | Default Value
+-----------------------------------------------|--------------------------------------------------------------------------------------|-----------------
+`#define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN` | SPI Slave select pin in order to inform that the FLASH is currently being addressed | _none_
+`#define EXTERNAL_FLASH_SPI_CLOCK_DIVISOR` | Clock divisor used to divide the peripheral clock to derive the SPI frequency | `8`
+`#define EXTERNAL_FLASH_PAGE_SIZE` | The Page size of the FLASH in bytes, as specified in the datasheet | `256`
+`#define EXTERNAL_FLASH_SECTOR_SIZE` | The sector size of the FLASH in bytes, as specified in the datasheet | `(4 * 1024)`
+`#define EXTERNAL_FLASH_BLOCK_SIZE` | The block size of the FLASH in bytes, as specified in the datasheet | `(64 * 1024)`
+`#define EXTERNAL_FLASH_SIZE` | The total size of the FLASH in bytes, as specified in the datasheet | `(512 * 1024)`
+`#define EXTERNAL_FLASH_ADDRESS_SIZE` | The Flash address size in bytes, as specified in datasheet | `3`
+
+::: warning
+All the above default configurations are based on MX25L4006E NOR Flash.
+:::