N25Q NOR Flash

NuttX provides support for QSPI based NOR flashes from N25Q family. The supported capacity is up to 1 Gbit (128 MB).

The driver is enabled by option CONFIG_MTD_N25QXX. It is possible to select the QSPI mode with CONFIG_N25QXX_QSPIMODE option and communication frequency with CONFIG_N25QXX_QSPI_FREQUENCY option.

The flash allows to simulate 512-byte large erase blocks if option CONFIG_N25QXX_SECTOR512 is enabled.

The size of the flash is set automatically during the device initialization.

The flash memory has to be initialized before used. This is typically done from board support package layer during the board’s bringup phase. This operation is performed by following function.

#include <nuttx/mtd/mtd.h>

FAR struct mtd_dev_s *n25qxxx_initialize(FAR struct qspi_dev_s *qspi,
                                         bool unprotect)