libDaisy
Hardware Library for Daisy
Loading...
Searching...
No Matches
flash_IS25LP064A.h
Go to the documentation of this file.
1#ifndef IS25LP064A_H
2#define IS25LP064A_H
3#ifdef __cplusplus
4extern "C"
5{
6#endif
7
8
9#define IS25LP064A_FLASH_SIZE \
10 0x800000
11#define IS25LP064A_BLOCK_SIZE 0x10000
12#define IS25LP064A_SECTOR_SIZE 0x1000
13#define IS25LP064A_PAGE_SIZE 0x100
15#define IS25LP064A_DUMMY_CYCLES_READ_QUAD 8
16#define IS25LP064A_DUMMY_CYCLES_READ 8
17#define IS25LP064A_DUMMY_CYCLES_READ_DTR 6
18#define IS25LP064A_DUMMY_CYCLES_READ_QUAD_DTR 6
21#define IS25LP064A_DIE_ERASE_MAX_TIME 460000
22#define IS25LP064A_BLOCK_ERASE_MAX_TIME 1000
23#define IS25LP064A_SECTOR_ERASE_MAX_TIME 400
34#define ENTER_DEEP_POWER_DOWN 0XB9
35#define EXIT_DEEP_POWER_DOWN 0XB9
38#define RESET_ENABLE_CMD 0x66
39#define RESET_MEMORY_CMD 0x99
42#define READ_ID_CMD 0xAB
43#define READ_ID_CMD2 0x9F
44#define MULTIPLE_IO_READ_ID_CMD 0xAF
45#define READ_SERIAL_FLASH_DISCO_PARAM_CMD 0x5A
46#define READ_MANUFACT_AND_ID 0x90
47#define READ_UNIQUE_ID 0x4B
49#define NO_OP 0x00
51#define SECTOR_UNLOCK 0x26
52#define SECTOR_LOCK 0x24
55#define INFO_ROW_ERASE_CMD 0x64
56#define INFO_ROW_PROGRAM_CMD 0x62
57#define INFO_ROW_READ_CMD 0x68
60#define READ_CMD 0x03
61
62#define FAST_READ_CMD 0x0B
63#define FAST_READ_DTR_CMD 0x0D
65#define DUAL_OUT_FAST_READ_CMD 0x3B
67#define DUAL_INOUT_FAST_READ_CMD 0xBB
68#define DUAL_INOUT_FAST_READ_DTR_CMD 0xBD
70#define QUAD_OUT_FAST_READ_CMD 0x6B
72#define QUAD_INOUT_FAST_READ_CMD 0xEB
73#define QUAD_INOUT_FAST_READ_DTR_CMD 0xED
76#define WRITE_ENABLE_CMD 0x06
77#define WRITE_DISABLE_CMD 0x04
80#define READ_STATUS_REG_CMD 0x05
81#define WRITE_STATUS_REG_CMD 0x01
83#define READ_FUNCTION_REGISTER 0X48
84#define WRITE_FUNCTION_REGISTER 0x42
86#define WRITE_READ_PARAM_REG_CMD 0xC0
89#define PAGE_PROG_CMD 0x02
90
91#define QUAD_IN_PAGE_PROG_CMD 0x32
92#define EXT_QUAD_IN_PAGE_PROG_CMD 0x38
95#define SECTOR_ERASE_CMD 0xd7 //already defined in 80
96#define SECTOR_ERASE_QPI_CMD 0x20
98#define BLOCK_ERASE_CMD 0xD8
99#define BLOCK_ERASE_32K_CMD 0x52
101#define CHIP_ERASE_CMD 0xC7
102#define EXT_CHIP_ERASE_CMD 0x60
104#define PROG_ERASE_RESUME_CMD 0x7A
105#define EXT_PROG_ERASE_RESUME_CMD 0x30
107#define PROG_ERASE_SUSPEND_CMD 0x75
108#define EXT_PROG_ERASE_SUSPEND_CMD 0xB0
111#define ENTER_QUAD_CMD 0x35
112#define EXIT_QUAD_CMD 0xF5
117 /* Status Register */
118#define IS25LP064A_SR_WIP ((uint8_t)0x01)
119#define IS25LP064A_SR_WREN ((uint8_t)0x02)
120//#define IS25LP064A_SR_BLOCKPR ((uint8_t)0x5C) /*!< Block protected against program and erase operations */
121//#define IS25LP064A_SR_PRBOTTOM ((uint8_t)0x20) /*!< Protected memory area defined by BLOCKPR starts from top or bottom */
122#define IS25LP064A_SR_SRWREN \
123 ((uint8_t)0x80)
124#define IS25LP064A_SR_QE ((uint8_t)0x40)
126 /* Non volatile Configuration Register */
127#define IS25LP064A_NVCR_NBADDR \
128 ((uint16_t)0x0001)
129#define IS25LP064A_NVCR_SEGMENT \
130 ((uint16_t)0x0002)
131#define IS25LP064A_NVCR_DUAL ((uint16_t)0x0004)
132#define IS25LP064A_NVCR_QUAB ((uint16_t)0x0008)
133#define IS25LP064A_NVCR_RH ((uint16_t)0x0010)
134#define IS25LP064A_NVCR_DTRP \
135 ((uint16_t)0x0020)
136#define IS25LP064A_NVCR_ODS ((uint16_t)0x01C0)
137#define IS25LP064A_NVCR_XIP \
138 ((uint16_t)0x0E00)
139#define IS25LP064A_NVCR_NB_DUMMY \
140 ((uint16_t)0xF000)
142 /* Volatile Configuration Register */
143#define IS25LP064A_VCR_WRAP ((uint8_t)0x03)
144#define IS25LP064A_VCR_XIP ((uint8_t)0x08)
145#define IS25LP064A_VCR_NB_DUMMY \
146 ((uint8_t)0xF0)
148 /* Extended Address Register */
149#define IS25LP064A_EAR_HIGHEST_SE \
150 ((uint8_t)0x03)
151#define IS25LP064A_EAR_THIRD_SEG \
152 ((uint8_t)0x02)
153#define IS25LP064A_EAR_SECOND_SEG \
154 ((uint8_t)0x01)
155#define IS25LP064A_EAR_LOWEST_SEG \
156 ((uint8_t)0x00)
158 /* Enhanced Volatile Configuration Register */
159#define IS25LP064A_EVCR_ODS ((uint8_t)0x07)
160#define IS25LP064A_EVCR_RH ((uint8_t)0x10)
161#define IS25LP064A_EVCR_DTRP \
162 ((uint8_t)0x20)
163#define IS25LP064A_EVCR_DUAL ((uint8_t)0x40)
164#define IS25LP064A_EVCR_QUAD ((uint8_t)0x80)
166 /* Flag Status Register */
167#define IS25LP064A_FSR_NBADDR \
168 ((uint8_t)0x01)
169#define IS25LP064A_FSR_PRERR ((uint8_t)0x02)
170#define IS25LP064A_FSR_PGSUS ((uint8_t)0x04)
171#define IS25LP064A_FSR_PGERR ((uint8_t)0x10)
172#define IS25LP064A_FSR_ERERR ((uint8_t)0x20)
173#define IS25LP064A_FSR_ERSUS ((uint8_t)0x40)
174#define IS25LP064A_FSR_READY \
175 ((uint8_t)0x80)
178#ifdef __cplusplus
179}
180#endif
181#endif