import { _ as _export_sfc, c as createElementBlock, o as openBlock, a8 as createStaticVNode } from "./chunks/framework.B9AX-CPi.js"; const __pageData = JSON.parse('{"title":"FLASH Driver Configuration","description":"","frontmatter":{},"headers":[],"relativePath":"drivers/flash.md","filePath":"drivers/flash.md"}'); const _sfc_main = { name: "drivers/flash.md" }; const _hoisted_1 = /* @__PURE__ */ createStaticVNode('

FLASH Driver Configuration

The FLASH driver can be swapped out depending on the needs of the keyboard, or whether extra hardware is present.

DriverDescription
FLASH_DRIVER = spiSupports writing to almost all NOR Flash chips. See the driver section below.

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 overrideDescriptionDefault Value
#define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PINSPI Slave select pin in order to inform that the FLASH is currently being addressednone
#define EXTERNAL_FLASH_SPI_CLOCK_DIVISORClock divisor used to divide the peripheral clock to derive the SPI frequency8
#define EXTERNAL_FLASH_PAGE_SIZEThe Page size of the FLASH in bytes, as specified in the datasheet256
#define EXTERNAL_FLASH_SECTOR_SIZEThe sector size of the FLASH in bytes, as specified in the datasheet(4 * 1024)
#define EXTERNAL_FLASH_BLOCK_SIZEThe block size of the FLASH in bytes, as specified in the datasheet(64 * 1024)
#define EXTERNAL_FLASH_SIZEThe total size of the FLASH in bytes, as specified in the datasheet(512 * 1024)
#define EXTERNAL_FLASH_ADDRESS_SIZEThe Flash address size in bytes, as specified in datasheet3

WARNING

All the above default configurations are based on MX25L4006E NOR Flash.

', 7); const _hoisted_8 = [ _hoisted_1 ]; function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { return openBlock(), createElementBlock("div", null, _hoisted_8); } const flash = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]); export { __pageData, flash as default };