STM32F769IDiscovery
1.00
uDANTE Audio Networking with STM32F7 DISCO board
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
Examples
File List
Globals
Eclipse_WS2
STM32F769IDiscovery
Utilities
Components
n25q128a
n25q128a.h
Go to the documentation of this file.
1
38
/* Define to prevent recursive inclusion -------------------------------------*/
39
#ifndef __N25Q128A_H
40
#define __N25Q128A_H
41
42
#ifdef __cplusplus
43
extern
"C"
{
44
#endif
45
46
/* Includes ------------------------------------------------------------------*/
47
75
#define N25Q128A_FLASH_SIZE 0x1000000
/* 128 MBits => 16MBytes */
76
#define N25Q128A_SECTOR_SIZE 0x10000
/* 256 sectors of 64KBytes */
77
#define N25Q128A_SUBSECTOR_SIZE 0x1000
/* 4096 subsectors of 4kBytes */
78
#define N25Q128A_PAGE_SIZE 0x100
/* 65536 pages of 256 bytes */
79
80
#define N25Q128A_DUMMY_CYCLES_READ 8
81
#define N25Q128A_DUMMY_CYCLES_READ_QUAD 10
82
83
#define N25Q128A_BULK_ERASE_MAX_TIME 250000
84
#define N25Q128A_SECTOR_ERASE_MAX_TIME 3000
85
#define N25Q128A_SUBSECTOR_ERASE_MAX_TIME 800
86
90
/* Reset Operations */
91
#define RESET_ENABLE_CMD 0x66
92
#define RESET_MEMORY_CMD 0x99
93
94
/* Identification Operations */
95
#define READ_ID_CMD 0x9E
96
#define READ_ID_CMD2 0x9F
97
#define MULTIPLE_IO_READ_ID_CMD 0xAF
98
#define READ_SERIAL_FLASH_DISCO_PARAM_CMD 0x5A
99
100
/* Read Operations */
101
#define READ_CMD 0x03
102
#define FAST_READ_CMD 0x0B
103
#define DUAL_OUT_FAST_READ_CMD 0x3B
104
#define DUAL_INOUT_FAST_READ_CMD 0xBB
105
#define QUAD_OUT_FAST_READ_CMD 0x6B
106
#define QUAD_INOUT_FAST_READ_CMD 0xEB
107
108
/* Write Operations */
109
#define WRITE_ENABLE_CMD 0x06
110
#define WRITE_DISABLE_CMD 0x04
111
112
/* Register Operations */
113
#define READ_STATUS_REG_CMD 0x05
114
#define WRITE_STATUS_REG_CMD 0x01
115
116
#define READ_LOCK_REG_CMD 0xE8
117
#define WRITE_LOCK_REG_CMD 0xE5
118
119
#define READ_FLAG_STATUS_REG_CMD 0x70
120
#define CLEAR_FLAG_STATUS_REG_CMD 0x50
121
122
#define READ_NONVOL_CFG_REG_CMD 0xB5
123
#define WRITE_NONVOL_CFG_REG_CMD 0xB1
124
125
#define READ_VOL_CFG_REG_CMD 0x85
126
#define WRITE_VOL_CFG_REG_CMD 0x81
127
128
#define READ_ENHANCED_VOL_CFG_REG_CMD 0x65
129
#define WRITE_ENHANCED_VOL_CFG_REG_CMD 0x61
130
131
/* Program Operations */
132
#define PAGE_PROG_CMD 0x02
133
#define DUAL_IN_FAST_PROG_CMD 0xA2
134
#define EXT_DUAL_IN_FAST_PROG_CMD 0xD2
135
#define QUAD_IN_FAST_PROG_CMD 0x32
136
#define EXT_QUAD_IN_FAST_PROG_CMD 0x12
137
138
/* Erase Operations */
139
#define SUBSECTOR_ERASE_CMD 0x20
140
#define SECTOR_ERASE_CMD 0xD8
141
#define BULK_ERASE_CMD 0xC7
142
143
#define PROG_ERASE_RESUME_CMD 0x7A
144
#define PROG_ERASE_SUSPEND_CMD 0x75
145
146
/* One-Time Programmable Operations */
147
#define READ_OTP_ARRAY_CMD 0x4B
148
#define PROG_OTP_ARRAY_CMD 0x42
149
153
/* Status Register */
154
#define N25Q128A_SR_WIP ((uint8_t)0x01)
155
#define N25Q128A_SR_WREN ((uint8_t)0x02)
156
#define N25Q128A_SR_BLOCKPR ((uint8_t)0x5C)
157
#define N25Q128A_SR_PRBOTTOM ((uint8_t)0x20)
158
#define N25Q128A_SR_SRWREN ((uint8_t)0x80)
160
/* Nonvolatile Configuration Register */
161
#define N25Q128A_NVCR_LOCK ((uint16_t)0x0001)
162
#define N25Q128A_NVCR_DUAL ((uint16_t)0x0004)
163
#define N25Q128A_NVCR_QUAB ((uint16_t)0x0008)
164
#define N25Q128A_NVCR_RH ((uint16_t)0x0010)
165
#define N25Q128A_NVCR_ODS ((uint16_t)0x01C0)
166
#define N25Q128A_NVCR_XIP ((uint16_t)0x0E00)
167
#define N25Q128A_NVCR_NB_DUMMY ((uint16_t)0xF000)
169
/* Volatile Configuration Register */
170
#define N25Q128A_VCR_WRAP ((uint8_t)0x03)
171
#define N25Q128A_VCR_XIP ((uint8_t)0x08)
172
#define N25Q128A_VCR_NB_DUMMY ((uint8_t)0xF0)
174
/* Enhanced Volatile Configuration Register */
175
#define N25Q128A_EVCR_ODS ((uint8_t)0x07)
176
#define N25Q128A_EVCR_VPPA ((uint8_t)0x08)
177
#define N25Q128A_EVCR_RH ((uint8_t)0x10)
178
#define N25Q128A_EVCR_DUAL ((uint8_t)0x40)
179
#define N25Q128A_EVCR_QUAD ((uint8_t)0x80)
181
/* Flag Status Register */
182
#define N25Q128A_FSR_PRERR ((uint8_t)0x02)
183
#define N25Q128A_FSR_PGSUS ((uint8_t)0x04)
184
#define N25Q128A_FSR_VPPERR ((uint8_t)0x08)
185
#define N25Q128A_FSR_PGERR ((uint8_t)0x10)
186
#define N25Q128A_FSR_ERERR ((uint8_t)0x20)
187
#define N25Q128A_FSR_ERSUS ((uint8_t)0x40)
188
#define N25Q128A_FSR_READY ((uint8_t)0x80)
213
#ifdef __cplusplus
214
}
215
#endif
216
217
#endif
/* __N25Q128A_H */
218
219
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Generated by
1.8.11