Go to the documentation of this file.
29 #include "periph_conf.h"
64 typedef struct __attribute__((packed)) {
75 #define JEDEC_NEXT_BANK (0x7f)
82 #define JEDEC_BANK_MAX (10)
87 #define SPI_NOR_F_SECT_4K (1)
92 #define SPI_NOR_F_SECT_32K (2)
97 #define SPI_NOR_F_SECT_64K (4)
uint8_t rdsr
Read status register.
uint8_t page_addr_shift
number of right shifts to get the address to the start of the page
const mtd_spi_nor_opcode_t * opcode
Opcode table for the device.
uint8_t wake
Release from deep power down.
mtd_jedec_id_t jedec_id
JEDEC ID of the chip.
uint32_t wait_32k_erase
32KB page erase wait time in µs
Low-level SPI peripheral driver interface definition.
uint32_t wait_64k_erase
64KB page erase wait time in µs
uint8_t sec_addr_shift
number of right shifts to get the address to the start of the sector
uint8_t read
Read data bytes, 3 byte address.
uint8_t manuf
Manufacturer ID, 1 byte.
uint8_t wren
Write enable.
SPI NOR flash opcode table.
spi_mode_t
Available SPI modes, defining the configuration of clock polarity and clock phase.
uint8_t block_erase_32k
32KiB block erase
uint8_t page_program
Page program.
uint8_t read_fast
Read data bytes, 3 byte address, at higher speed.
gpio_t wp
Write Protect pin GPIO handle.
uint32_t wait_sector_erase
4KB sector erase wait time in µs
uint32_t wait_chip_erase
Full chip erase wait time in µs.
const mtd_spi_nor_opcode_t mtd_spi_nor_opcode_default_4bytes
Default 4-byte addresses opcodes.
uint16_t flag
Config flags.
spi_clk_t
Available SPI clock speeds.
mtd_dev_t base
inherit from mtd_dev_t object
spi_t spi
SPI bus the device is connected to.
uint8_t wrsr
Write status register.
uint8_t rdid
Read identification (JEDEC ID)
uint8_t sleep
Deep power down.
uint32_t wait_chip_wake_up
Chip wake up time in µs.
Compile-time parameters for a serial flash device.
uint8_t addr_width
Number of bytes in addresses, usually 3 for small devices.
Internal representation of JEDEC memory ID codes.
Low-level GPIO peripheral driver interface definitions.
uint32_t page_addr_mask
bitmask to corresponding to the page address
Device descriptor for serial flash memory devices.
uint8_t chip_erase
Chip erase.
const mtd_desc_t mtd_spi_nor_driver
NOR flash SPI MTD device operations table.
gpio_t hold
HOLD pin GPIO handle.
uint32_t sec_addr_mask
bitmask to corresponding to the sector address
gpio_t cs
CS pin GPIO handle.
const mtd_spi_nor_opcode_t mtd_spi_nor_opcode_default
Default command opcodes.
uint8_t block_erase_64k
Block erase (usually 64 KiB)
uint8_t sector_erase
Block erase 4 KiB.
uint8_t bank
Manufacturer ID bank number, 1 through 10, see JEP106.
const mtd_spi_nor_params_t * params
SPI NOR params.
unsigned int spi_t
Default type for SPI devices.