WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
hal_sfc_v150_regs_def.h
浏览该文件的文档.
1
9#ifndef HAL_SFC_V150_REGS_DEF_H
10#define HAL_SFC_V150_REGS_DEF_H
11
12#include <stdint.h>
13
14#define MAX_DATABUF_NUM 16
15#define MAX_BYTE_PER_DATABUF 4
16
17#ifdef __cplusplus
18#if __cplusplus
19extern "C" {
20#endif /* __cplusplus */
21#endif /* __cplusplus */
22
34typedef union global_config {
35 uint32_t d32;
36 struct {
37 uint32_t mode : 1;
41 uint32_t wp_en : 1;
45 uint32_t flash_addr_mode : 1;
49 uint32_t rd_delay : 3;
59 uint32_t sample_test : 4;
61 uint32_t reserved : 22;
62 } b;
64
70typedef union timing {
71 uint32_t d32;
72 struct {
73 uint32_t tshsl : 4;
75 uint32_t reserved0 : 4;
76 uint32_t tcss : 3;
78 uint32_t reserved1 : 1;
79 uint32_t tcsh : 3;
81 } b;
83
89typedef union bus_config1 {
90 uint32_t d32;
91 struct {
92 uint32_t rd_mem_if_type : 3;
100 uint32_t rd_dummy_bytes : 3;
101 uint32_t rd_prefetch_cnt : 2;
102 uint32_t rd_ins : 8;
103 uint32_t wr_mem_if_type : 3;
111 uint32_t wr_dummy_bytes : 3;
112 uint32_t wr_ins : 8;
113 uint32_t wr_enable : 1;
114 uint32_t rd_enable : 1;
115 } b;
117
123typedef union bus_config2 {
124 uint32_t d32;
125 struct {
126 uint32_t wip_locate : 3;
127 uint32_t bus_ddr_mode : 1;
128 uint32_t ddr_rd_dummy_bytes : 4;
129 uint32_t ddr_wr_dummy_bytes : 4;
130 uint32_t sfc_ddr_tx_delay_enable : 1;
133 uint32_t reserved : 19;
134 } b;
136
142typedef union bus_flash_size {
143 uint32_t d32;
144 struct {
145 uint32_t flash_size_cs0 : 4;
163 uint32_t reserved0 : 4;
164 uint32_t flash_size_cs1 : 4;
166 uint32_t reserved1 : 20;
167 } b;
169
175typedef union bus_base_addr {
176 uint32_t d32;
177 struct {
178 uint32_t reserved : 16;
179 uint32_t bus_base_addr_high_cs : 16;
180 } b;
182
188typedef union bus_dma_ctrl {
189 uint32_t d32;
190 struct {
191 uint32_t dma_start : 1;
193 uint32_t dma_rw : 1;
194 uint32_t reserved0 : 2;
195 uint32_t dma_sel_cs : 1;
196 uint32_t reserved1 : 27;
197 } b;
199
205typedef union bus_dma_len {
206 uint32_t d32;
207 struct {
208 uint32_t dma_len : 30;
210 uint32_t reserved : 2;
211 } b;
213
219typedef union bus_dma_ahb_ctrl {
220 uint32_t d32;
221 struct {
222 uint32_t incr4_en : 1;
223 uint32_t incr8_en : 1;
224 uint32_t incr16_en : 1;
225 uint32_t reserved : 29;
226 } b;
228
234typedef union cmd_config {
235 uint32_t d32;
236 struct {
237 uint32_t start : 1;
239 uint32_t sel_cs : 1;
240 uint32_t reserved0 : 1;
241 uint32_t addr_en : 1;
242 uint32_t dummy_byte_cnt : 3;
243 uint32_t data_en : 1;
244 uint32_t rw : 1;
245 uint32_t data_cnt : 6;
247 uint32_t reserved : 2;
248 uint32_t mem_if_type : 3;
256 uint32_t reserved1 : 12;
257 } b;
259
265typedef union cmd_ins {
266 uint32_t d32;
267 struct {
268 uint32_t reg_ins : 8;
269 uint32_t cmd_ddr_mode : 1;
270 uint32_t reserved0 : 3;
271 uint32_t ddr_dummy_byte_cnt : 4;
272 uint32_t reserved1 : 16;
273 } b;
275
281typedef union cmd_addr {
282 uint32_t d32;
283 struct {
284 uint32_t cmd_addr : 30;
285 uint32_t reserved : 2;
286 } b;
288
294typedef union cmd_databuf {
295 uint32_t d32;
296 struct {
298 } b;
300
304typedef struct global_conf_regs {
305 volatile uint32_t global_config;
306 volatile uint32_t reserved[3];
307 volatile uint32_t timing;
309
313typedef struct bus_regs {
314 volatile uint32_t bus_config1;
315 volatile uint32_t bus_config2;
316 volatile uint32_t reserved[2];
317 volatile uint32_t bus_flash_size;
318 volatile uint32_t bus_base_addr_cs0;
319 volatile uint32_t bus_base_addr_cs1;
321
325typedef struct bus_dma_regs {
326 volatile uint32_t bus_dma_ctrl;
327 volatile uint32_t bus_dma_mem_saddr;
328 volatile uint32_t bus_dma_flash_saddr;
329 volatile uint32_t bus_dma_len;
330 volatile uint32_t bus_dma_ahb_ctrl;
332
336typedef struct cmd_regs {
337 volatile uint32_t cmd_config;
338 volatile uint32_t reserved;
339 volatile uint32_t cmd_ins;
340 volatile uint32_t cmd_addr;
342
346typedef struct cmd_databufs {
347 volatile uint32_t cmd_databuf[MAX_DATABUF_NUM];
349
354#ifdef __cplusplus
355#if __cplusplus
356}
357#endif /* __cplusplus */
358#endif /* __cplusplus */
359
360#endif
#define MAX_BYTE_PER_DATABUF
Definition hal_sfc_v150_regs_def.h:15
#define MAX_DATABUF_NUM
Definition hal_sfc_v150_regs_def.h:14
union timing timing_t
This union represents the bit fields in the SFC timing Register. Read the register into the d32 mem...
union cmd_config cmd_config_t
This union represents the bit fields in the SFC command config Register. Read the register into the...
struct cmd_regs cmd_regs_t
SPI mode Registers associated with SFC.
union cmd_ins cmd_ins_t
This union represents the bit fields in the SFC command ins Register. Read the register into the d3...
union bus_config2 bus_config2_t
This union represents the bit fields in the SFC bus config Register 2. Read the register into the d...
union bus_config1 bus_config1_t
This union represents the bit fields in the SFC bus config Register 1. Read the register into the d...
union cmd_addr cmd_addr_t
This union represents the bit fields in the SFC command address Register. Read the register into th...
union global_config global_config_t
This union represents the bit fields in the SFC global config Register. Read the register into the ...
struct cmd_databufs cmd_databufs_t
SPI data buffer Registers associated with SFC.
union bus_dma_ctrl bus_dma_ctrl_t
This union represents the bit fields in the SFC bus dma ctrl Register. Read the register into the d...
struct global_conf_regs global_conf_regs_t
Global Config Registers associated with SFC.
union bus_dma_len bus_dma_len_t
This union represents the bit fields in the SFC bus dma len Register. Read the register into the d3...
union bus_flash_size bus_flash_size_t
This union represents the bit fields in the SFC bus flash size Register. Read the register into the...
struct bus_dma_regs bus_dma_regs_t
DMA mode Registers associated with SFC.
union cmd_databuf cmd_databuf_t
This union represents the bit fields in the SFC command data buffer Register. Read the register int...
union bus_base_addr bus_base_addr_t
This union represents the bit fields in the SFC bus base addr Register. Read the register into the ...
struct bus_regs bus_regs_t
Bus mode Registers associated with SFC.
union bus_dma_ahb_ctrl bus_dma_ahb_ctrl_t
This union represents the bit fields in the SFC bus dma ahb ctrl Register. Read the register into t...
DMA mode Registers associated with SFC.
Definition hal_sfc_v150_regs_def.h:325
volatile uint32_t bus_dma_ahb_ctrl
Definition hal_sfc_v150_regs_def.h:330
volatile uint32_t bus_dma_flash_saddr
Definition hal_sfc_v150_regs_def.h:328
volatile uint32_t bus_dma_len
Definition hal_sfc_v150_regs_def.h:329
volatile uint32_t bus_dma_mem_saddr
Definition hal_sfc_v150_regs_def.h:327
volatile uint32_t bus_dma_ctrl
Definition hal_sfc_v150_regs_def.h:326
Bus mode Registers associated with SFC.
Definition hal_sfc_v150_regs_def.h:313
volatile uint32_t bus_config2
Definition hal_sfc_v150_regs_def.h:315
volatile uint32_t bus_flash_size
Definition hal_sfc_v150_regs_def.h:317
volatile uint32_t bus_config1
Definition hal_sfc_v150_regs_def.h:314
volatile uint32_t reserved[2]
Definition hal_sfc_v150_regs_def.h:316
volatile uint32_t bus_base_addr_cs1
Definition hal_sfc_v150_regs_def.h:319
volatile uint32_t bus_base_addr_cs0
Definition hal_sfc_v150_regs_def.h:318
SPI data buffer Registers associated with SFC.
Definition hal_sfc_v150_regs_def.h:346
SPI mode Registers associated with SFC.
Definition hal_sfc_v150_regs_def.h:336
volatile uint32_t reserved
Definition hal_sfc_v150_regs_def.h:338
volatile uint32_t cmd_config
Definition hal_sfc_v150_regs_def.h:337
volatile uint32_t cmd_ins
Definition hal_sfc_v150_regs_def.h:339
volatile uint32_t cmd_addr
Definition hal_sfc_v150_regs_def.h:340
Global Config Registers associated with SFC.
Definition hal_sfc_v150_regs_def.h:304
volatile uint32_t global_config
Definition hal_sfc_v150_regs_def.h:305
volatile uint32_t timing
Definition hal_sfc_v150_regs_def.h:307
volatile uint32_t reserved[3]
Definition hal_sfc_v150_regs_def.h:306
This union represents the bit fields in the SFC bus base addr Register. Read the register into the ...
Definition hal_sfc_v150_regs_def.h:175
uint32_t reserved
Definition hal_sfc_v150_regs_def.h:178
uint32_t d32
Definition hal_sfc_v150_regs_def.h:176
struct bus_base_addr::@39 b
uint32_t bus_base_addr_high_cs
Definition hal_sfc_v150_regs_def.h:179
This union represents the bit fields in the SFC bus config Register 1. Read the register into the d...
Definition hal_sfc_v150_regs_def.h:89
uint32_t wr_mem_if_type
Definition hal_sfc_v150_regs_def.h:103
uint32_t rd_enable
Definition hal_sfc_v150_regs_def.h:114
struct bus_config1::@34 b
uint32_t rd_dummy_bytes
Definition hal_sfc_v150_regs_def.h:100
uint32_t wr_enable
Definition hal_sfc_v150_regs_def.h:113
uint32_t rd_prefetch_cnt
Definition hal_sfc_v150_regs_def.h:101
uint32_t rd_mem_if_type
Definition hal_sfc_v150_regs_def.h:92
uint32_t wr_dummy_bytes
Definition hal_sfc_v150_regs_def.h:111
uint32_t wr_ins
Definition hal_sfc_v150_regs_def.h:112
uint32_t rd_ins
Definition hal_sfc_v150_regs_def.h:102
uint32_t d32
Definition hal_sfc_v150_regs_def.h:90
This union represents the bit fields in the SFC bus config Register 2. Read the register into the d...
Definition hal_sfc_v150_regs_def.h:123
uint32_t d32
Definition hal_sfc_v150_regs_def.h:124
uint32_t bus_ddr_mode
Definition hal_sfc_v150_regs_def.h:127
uint32_t sfc_ddr_tx_delay_enable
Definition hal_sfc_v150_regs_def.h:130
uint32_t ddr_rd_dummy_bytes
Definition hal_sfc_v150_regs_def.h:128
struct bus_config2::@37 b
uint32_t ddr_wr_dummy_bytes
Definition hal_sfc_v150_regs_def.h:129
uint32_t wip_locate
Definition hal_sfc_v150_regs_def.h:126
uint32_t reserved
Definition hal_sfc_v150_regs_def.h:133
This union represents the bit fields in the SFC bus dma ahb ctrl Register. Read the register into t...
Definition hal_sfc_v150_regs_def.h:219
struct bus_dma_ahb_ctrl::@42 b
uint32_t incr8_en
Definition hal_sfc_v150_regs_def.h:223
uint32_t incr16_en
Definition hal_sfc_v150_regs_def.h:224
uint32_t incr4_en
Definition hal_sfc_v150_regs_def.h:222
uint32_t reserved
Definition hal_sfc_v150_regs_def.h:225
uint32_t d32
Definition hal_sfc_v150_regs_def.h:220
This union represents the bit fields in the SFC bus dma ctrl Register. Read the register into the d...
Definition hal_sfc_v150_regs_def.h:188
uint32_t d32
Definition hal_sfc_v150_regs_def.h:189
uint32_t reserved0
Definition hal_sfc_v150_regs_def.h:194
uint32_t dma_start
Definition hal_sfc_v150_regs_def.h:191
uint32_t reserved1
Definition hal_sfc_v150_regs_def.h:196
struct bus_dma_ctrl::@40 b
uint32_t dma_sel_cs
Definition hal_sfc_v150_regs_def.h:195
uint32_t dma_rw
Definition hal_sfc_v150_regs_def.h:193
This union represents the bit fields in the SFC bus dma len Register. Read the register into the d3...
Definition hal_sfc_v150_regs_def.h:205
uint32_t reserved
Definition hal_sfc_v150_regs_def.h:210
struct bus_dma_len::@41 b
uint32_t d32
Definition hal_sfc_v150_regs_def.h:206
uint32_t dma_len
Definition hal_sfc_v150_regs_def.h:208
This union represents the bit fields in the SFC bus flash size Register. Read the register into the...
Definition hal_sfc_v150_regs_def.h:142
struct bus_flash_size::@38 b
uint32_t flash_size_cs1
Definition hal_sfc_v150_regs_def.h:164
uint32_t d32
Definition hal_sfc_v150_regs_def.h:143
uint32_t reserved1
Definition hal_sfc_v150_regs_def.h:166
uint32_t reserved0
Definition hal_sfc_v150_regs_def.h:163
uint32_t flash_size_cs0
Definition hal_sfc_v150_regs_def.h:145
This union represents the bit fields in the SFC command address Register. Read the register into th...
Definition hal_sfc_v150_regs_def.h:281
struct cmd_addr::@45 b
uint32_t cmd_addr
Definition hal_sfc_v150_regs_def.h:284
uint32_t reserved
Definition hal_sfc_v150_regs_def.h:285
uint32_t d32
Definition hal_sfc_v150_regs_def.h:282
This union represents the bit fields in the SFC command config Register. Read the register into the...
Definition hal_sfc_v150_regs_def.h:234
uint32_t reserved1
Definition hal_sfc_v150_regs_def.h:256
uint32_t rw
Definition hal_sfc_v150_regs_def.h:244
uint32_t data_en
Definition hal_sfc_v150_regs_def.h:243
struct cmd_config::@43 b
uint32_t addr_en
Definition hal_sfc_v150_regs_def.h:241
uint32_t d32
Definition hal_sfc_v150_regs_def.h:235
uint32_t reserved
Definition hal_sfc_v150_regs_def.h:247
uint32_t dummy_byte_cnt
Definition hal_sfc_v150_regs_def.h:242
uint32_t mem_if_type
Definition hal_sfc_v150_regs_def.h:248
uint32_t data_cnt
Definition hal_sfc_v150_regs_def.h:245
uint32_t start
Definition hal_sfc_v150_regs_def.h:237
uint32_t sel_cs
Definition hal_sfc_v150_regs_def.h:239
uint32_t reserved0
Definition hal_sfc_v150_regs_def.h:240
This union represents the bit fields in the SFC command data buffer Register. Read the register int...
Definition hal_sfc_v150_regs_def.h:294
uint8_t databyte[4]
Definition hal_sfc_v150_regs_def.h:297
struct cmd_databuf::@46 b
uint32_t d32
Definition hal_sfc_v150_regs_def.h:295
This union represents the bit fields in the SFC command ins Register. Read the register into the d3...
Definition hal_sfc_v150_regs_def.h:265
uint32_t cmd_ddr_mode
Definition hal_sfc_v150_regs_def.h:269
uint32_t reserved0
Definition hal_sfc_v150_regs_def.h:270
uint32_t reserved1
Definition hal_sfc_v150_regs_def.h:272
uint32_t reg_ins
Definition hal_sfc_v150_regs_def.h:268
uint32_t ddr_dummy_byte_cnt
Definition hal_sfc_v150_regs_def.h:271
struct cmd_ins::@44 b
uint32_t d32
Definition hal_sfc_v150_regs_def.h:266
This union represents the bit fields in the SFC global config Register. Read the register into the ...
Definition hal_sfc_v150_regs_def.h:34
uint32_t reserved
Definition hal_sfc_v150_regs_def.h:61
struct global_config::@31 b
uint32_t rd_delay
Definition hal_sfc_v150_regs_def.h:49
uint32_t d32
Definition hal_sfc_v150_regs_def.h:35
uint32_t wp_en
Definition hal_sfc_v150_regs_def.h:41
uint32_t sample_test
Definition hal_sfc_v150_regs_def.h:59
uint32_t flash_addr_mode
Definition hal_sfc_v150_regs_def.h:45
uint32_t mode
Definition hal_sfc_v150_regs_def.h:37
This union represents the bit fields in the SFC timing Register. Read the register into the d32 mem...
Definition hal_sfc_v150_regs_def.h:70
uint32_t reserved0
Definition hal_sfc_v150_regs_def.h:75
uint32_t tcsh
Definition hal_sfc_v150_regs_def.h:79
uint32_t tcss
Definition hal_sfc_v150_regs_def.h:76
struct timing::@32 b
uint32_t reserved1
Definition hal_sfc_v150_regs_def.h:78
uint32_t d32
Definition hal_sfc_v150_regs_def.h:71
uint32_t tshsl
Definition hal_sfc_v150_regs_def.h:73