mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/driver-w25qxxx.git
synced 2025-09-29 00:37:33 +00:00
Some driver updates to work for the W25Q128
This commit is contained in:
64
include/sta/drivers/w25qxx_defs.hpp
Normal file
64
include/sta/drivers/w25qxx_defs.hpp
Normal file
@@ -0,0 +1,64 @@
|
||||
#ifndef STA_SENSORS_W25QXX_DEFS_HPP
|
||||
#define STA_SENSORS_W25QXX_DEFS_HPP
|
||||
|
||||
// Enable 4 Byte address mode (for W25Q512)
|
||||
#define W25QXX_4_BYTE_ADDR_ENABLE 0xB7
|
||||
|
||||
// W25Qxx-specific instructions
|
||||
#define W25QXX_WRITE_ENABLE 0x06
|
||||
#define W25QXX_VOL_SR_WRITE_ENABLE 0x06
|
||||
#define W25QXX_WRITE_DISABLE 0x04
|
||||
|
||||
// Status register read/write instructions.
|
||||
#define W25QXX_STATUS_REG_1_READ 0x05
|
||||
#define W25QXX_STATUS_REG_1_WRITE 0x01
|
||||
#define W25QXX_STATUS_REG_2_READ 0x35
|
||||
#define W25QXX_STATUS_REG_2_WRITE 0x31
|
||||
#define W25QXX_STATUS_REG_3_READ 0x15
|
||||
#define W25QXX_STATUS_REG_3_WRITE 0x11
|
||||
|
||||
// Erase memory
|
||||
#define W25QXX_CHIP_ERASE 0xC7
|
||||
#define W25QXX_ERASE_SUSPEND_PROG 0x75
|
||||
#define W25QXX_ERASE_RESUME_PROG 0x7A
|
||||
|
||||
// Power management
|
||||
#define W25QXX_POWER_DOWN 0xB9
|
||||
#define W25QXX_RELEASE_POWER_DOWN 0xAB
|
||||
|
||||
// ID reading
|
||||
#define W25QXX_DEVICE_ID 0x90
|
||||
#define W25QXX_READ_UNIQUE_ID 0x4B
|
||||
|
||||
#define W25QXX_GLOBAL_BLOCK_LOCK 0x7E
|
||||
#define W25QXX_GLOBAL_BLOCK_UNLOCK 0x98
|
||||
#define W25QXX_QPI_MODE 0x38
|
||||
#define W25QXX_ENABLE_RESET 0x66
|
||||
#define W25QXX_RESET_DEVICE 0x99
|
||||
|
||||
#define W25QXX_PAGE_PROGAM 0x02
|
||||
#define W25QXX_QUAD_PAGE_PROGAM 0x32
|
||||
|
||||
#define W25QXX_SECTOR_ERASE 0x21
|
||||
#define W25QXX_BLOCK_ERASE_32_KB 0x52
|
||||
#define W25QXX_BLOCK_ERASE_64_KB 0xD8
|
||||
|
||||
#define W25QXX_READ 0x03
|
||||
#define W25QXX_FAST_READ 0x0B
|
||||
#define W25QXX_FAST_READ_DUAL_OUT 0x3B
|
||||
#define W25QXX_FAST_READ_QUAD_OUT 0x6B
|
||||
#define W25QXX_SFDP_REG 0x5A
|
||||
|
||||
#define W25QXX_ERASE_SEC_REG 0x44
|
||||
#define W25QXX_PROGRAM_SEC_REG 0x42
|
||||
|
||||
// Lock locking/unlocking/reading for individual blocks
|
||||
#define W25QXX_INDIV_BLOCK_LOCK 0x36
|
||||
#define W25QXX_INDIV_BLOCK_UNLOCK 0x39
|
||||
#define W25QXX_READ_BLOCK_LOCK 0x3D
|
||||
|
||||
|
||||
#define W25QXX_DEVICE_ID_RESULT 0xEF
|
||||
|
||||
|
||||
#endif // STA_SENSORS_W25QXX_DEFS_HPP
|
Reference in New Issue
Block a user