libDaisy
Hardware Library for Daisy
Loading...
Searching...
No Matches
flash_IS25LP080D.h
Go to the documentation of this file.
1#ifndef IS25LP080D_H
2#define IS25LP080D_H
3#ifdef __cplusplus
4extern "C"
5{
6#endif
7
8
9#define IS25LP080D_FLASH_SIZE \
10 0x100000
11#define IS25LP080D_BLOCK_SIZE 0x10000
12#define IS25LP080D_SECTOR_SIZE 0x1000
13#define IS25LP080D_PAGE_SIZE 0x100
15#define IS25LP080D_DUMMY_CYCLES_READ_QUAD 8
16#define IS25LP080D_DUMMY_CYCLES_READ 8
17#define IS25LP080D_DUMMY_CYCLES_READ_DTR 6
18#define IS25LP080D_DUMMY_CYCLES_READ_QUAD_DTR 6
21#define IS25LP080D_DIE_ERASE_MAX_TIME 460000
22#define IS25LP080D_BLOCK_ERASE_MAX_TIME 1000
23#define IS25LP080D_SECTOR_ERASE_MAX_TIME 400
33//register stuff is CRAZY
34
36#define ENTER_DEEP_POWER_DOWN 0XB9
37#define EXIT_DEEP_POWER_DOWN 0XB9
40#define RESET_ENABLE_CMD 0x66
41#define RESET_MEMORY_CMD 0x99
44#define READ_ID_CMD 0xAB
45#define READ_ID_CMD2 0x9F
46#define MULTIPLE_IO_READ_ID_CMD 0xAF
47#define READ_SERIAL_FLASH_DISCO_PARAM_CMD 0x5A
48#define READ_MANUFACT_AND_ID 0x90
49#define READ_UNIQUE_ID 0x4B
51#define NO_OP 0x00
53#define SECTOR_UNLOCK 0x26
54#define SECTOR_LOCK 0x24
57#define INFO_ROW_ERASE_CMD 0x64
58#define INFO_ROW_PROGRAM_CMD 0x62
59#define INFO_ROW_READ_CMD 0x68
62#define PAGE_PROG_CMD 0x02
63
64#define QUAD_IN_PAGE_PROG_CMD 0x32
65#define EXT_QUAD_IN_PAGE_PROG_CMD 0x38
68#define READ_CMD 0x03
69
70#define FAST_READ_CMD 0x0B
71#define FAST_READ_DTR_CMD 0x0D
73#define DUAL_OUT_FAST_READ_CMD 0x3B
75#define DUAL_INOUT_FAST_READ_CMD 0xBB
76#define DUAL_INOUT_FAST_READ_DTR_CMD 0xBD
78#define QUAD_OUT_FAST_READ_CMD 0x6B
80#define QUAD_INOUT_FAST_READ_CMD 0xEB
81#define QUAD_INOUT_FAST_READ_DTR_CMD 0xED
84#define WRITE_ENABLE_CMD 0x06
85#define WRITE_DISABLE_CMD 0x04
88#define READ_STATUS_REG_CMD 0x05
89#define WRITE_STATUS_REG_CMD 0x01
91#define READ_FUNCTION_REGISTER 0X48
92#define WRITE_FUNCTION_REGISTER 0x42
94#define READ_READ_PARAM_REG_CMD 0x61
95#define READ_EXT_READ_PARAM_CMD 0x81
96#define CLEAR_EXT_READ_PARAM_CMD 0x82
98#define WRITE_READ_PARAM_REG_CMD 0xC0
99#define WRITE_NV_READ_PARAM_REG_CMD 0x65
100#define EXT_WRITE_READ_PARAM_REG_CMD 0x63
102#define WRITE_EXT_READ_PARAM_REG_CMD 0x83
103#define WRITE_EXT_NV_READ_PARAM_REG_CMD 0x85
106#define PAGE_PROG_CMD 0x02
107
108#define QUAD_IN_FAST_PROG_CMD 0x32
109#define EXT_QUAD_IN_FAST_PROG_CMD 0x38
112#define SECTOR_ERASE_CMD 0xd7
113#define SECTOR_ERASE_QPI_CMD 0x20
115#define BLOCK_ERASE_CMD 0xD8
116#define BLOCK_ERASE_32K_CMD 0x52
118#define CHIP_ERASE_CMD 0xC7
119#define EXT_CHIP_ERASE_CMD 0x60
121#define PROG_ERASE_RESUME_CMD 0x7A
122#define EXT_PROG_ERASE_RESUME_CMD 0x30
124#define PROG_ERASE_SUSPEND_CMD 0x75
125#define EXT_PROG_ERASE_SUSPEND_CMD 0xB0
128#define ENTER_QUAD_CMD 0x35
129#define EXIT_QUAD_CMD 0xF5
135#define IS25LP080D_SR_WIP ((uint8_t)0x01)
136#define IS25LP080D_SR_WREN ((uint8_t)0x02)
137//#define IS25LP080D_SR_BLOCKPR ((uint8_t)0x5C) /*!< Block protected against program and erase operations */
138//#define IS25LP080D_SR_PRBOTTOM ((uint8_t)0x20) /*!< Protected memory area defined by BLOCKPR starts from top or bottom */
139#define IS25LP080D_SR_SRWREN \
140 ((uint8_t)0x80)
141#define IS25LP080D_SR_QE ((uint8_t)0x40)
143 /* Non volatile Configuration Register */
144#define IS25LP080D_NVCR_NBADDR \
145 ((uint16_t)0x0001)
146#define IS25LP080D_NVCR_SEGMENT \
147 ((uint16_t)0x0002)
148#define IS25LP080D_NVCR_DUAL ((uint16_t)0x0004)
149#define IS25LP080D_NVCR_QUAB ((uint16_t)0x0008)
150#define IS25LP080D_NVCR_RH ((uint16_t)0x0010)
151#define IS25LP080D_NVCR_DTRP \
152 ((uint16_t)0x0020)
153#define IS25LP080D_NVCR_ODS ((uint16_t)0x01C0)
154#define IS25LP080D_NVCR_XIP \
155 ((uint16_t)0x0E00)
156#define IS25LP080D_NVCR_NB_DUMMY \
157 ((uint16_t)0xF000)
159 /* Volatile Configuration Register */
160#define IS25LP080D_VCR_WRAP ((uint8_t)0x03)
161#define IS25LP080D_VCR_XIP ((uint8_t)0x08)
162#define IS25LP080D_VCR_NB_DUMMY \
163 ((uint8_t)0xF0)
165 /* Extended Address Register */
166#define IS25LP080D_EAR_HIGHEST_SE \
167 ((uint8_t)0x03)
168#define IS25LP080D_EAR_THIRD_SEG \
169 ((uint8_t)0x02)
170#define IS25LP080D_EAR_SECOND_SEG \
171 ((uint8_t)0x01)
172#define IS25LP080D_EAR_LOWEST_SEG \
173 ((uint8_t)0x00)
175 /* Enhanced Volatile Configuration Register */
176#define IS25LP080D_EVCR_ODS ((uint8_t)0x07)
177#define IS25LP080D_EVCR_RH ((uint8_t)0x10)
178#define IS25LP080D_EVCR_DTRP \
179 ((uint8_t)0x20)
180#define IS25LP080D_EVCR_DUAL ((uint8_t)0x40)
181#define IS25LP080D_EVCR_QUAD ((uint8_t)0x80)
183 /* Flag Status Register */
184#define IS25LP080D_FSR_NBADDR \
185 ((uint8_t)0x01)
186#define IS25LP080D_FSR_PRERR ((uint8_t)0x02)
187#define IS25LP080D_FSR_PGSUS ((uint8_t)0x04)
188#define IS25LP080D_FSR_PGERR ((uint8_t)0x10)
189#define IS25LP080D_FSR_ERERR ((uint8_t)0x20)
190#define IS25LP080D_FSR_ERSUS ((uint8_t)0x40)
191#define IS25LP080D_FSR_READY \
192 ((uint8_t)0x80)
195#ifdef __cplusplus
196}
197#endif
198#endif