12 #define SPIC_DMA_MODEFI 0 //待芯片回来,提高主频后,再测试哪一种方式效率更高,且代码更少 15 #define RX_NAGE_SAMPLE 0 17 #define DELAY_LINE 0x1A //1 ~ 32S 32 MD_SEL_RESERVED_0 = 3,
33 MD_SEL_LINE_1_MERGE = 4,
34 MD_SEL_LINE_4_MERGE = 5,
35 MD_SEL_RESERVED_1 = 6,
36 MD_SEL_RESERVED_2 = 7,
37 MD_SEL_DTR_LINE_1 = 8,
38 MD_SEL_DTR_LINE_4 = 9,
39 MD_SEL_DTR_LINE_8 = 10,
40 MD_SEL_RESERVED_3 = 11,
41 MD_SEL_DTR_LINE_1_MERGE = 12,
42 MD_SEL_DTR_LINE_4_MERGE = 13,
43 MD_SEL_RESERVED_4 = 14,
79 int32_t
spic_clk_phase_set(uint32_t spic_base,uint32_t tx_shift,uint32_t tx_nege_en,uint32_t rx_shift,uint32_t rx_nege_en);
int32_t spic_init(uint32_t spic_base, spic_init_p init)
spic控制器初始化
Definition: ci130x_dtrflash.c:592
md_sel_t data_md
Definition: ci130x_dtrflash.h:56
uint32_t flash_sel
Definition: ci130x_dtrflash.h:49
int32_t spic_clk_phase_set(uint32_t spic_base, uint32_t tx_shift, uint32_t tx_nege_en, uint32_t rx_shift, uint32_t rx_nege_en)
flash时钟相位调制
Definition: ci130x_dtrflash.c:622
flash_clk_div_t flash_clk_div
Definition: ci130x_dtrflash.h:48
uint32_t addr_size
Definition: ci130x_dtrflash.h:50
void spic_prefetch_en(uint32_t spic_base, bool en)
flash预取开关
Definition: ci130x_dtrflash.c:691
md_sel_t cmd_md
Definition: ci130x_dtrflash.h:55
uint32_t addr_en
Definition: ci130x_dtrflash.h:60
uint32_t cmd1
Definition: ci130x_dtrflash.h:58
int32_t spic_read_xip(uint32_t spic_base, spic_base_config_p spic_base_config, uint8_t *read_data, uint32_t read_len)
void spic_hardware_reset(uint32_t spic_base, uint8_t enable)
struct spic_init_t * spic_init_p
Definition: ci130x_dtrflash.h:46
int32_t spic_cmd(uint32_t spic_base, spic_base_config_p spic_base_config)
spic向flash发送命令
Definition: ci130x_dtrflash.c:335
struct spic_base_config_t * spic_base_config_p
int32_t spic_write_by_cpu(uint32_t spic_base, spic_base_config_p spic_base_config, uint8_t *write_data, uint32_t write_len)
spic以CPU的方式向flash写数据
Definition: ci130x_dtrflash.c:415
int32_t spic_xip_config(uint32_t spic_base, spic_base_config_p spic_base_config)
Definition: ci130x_dtrflash.c:571
uint32_t cmd0
Definition: ci130x_dtrflash.h:57
uint32_t addr
Definition: ci130x_dtrflash.h:59
void spic_change_clk(uint32_t spic_base, flash_clk_div_t clk)
Definition: ci130x_dtrflash.c:128
Definition: ci130x_dtrflash.h:53
uint32_t dummy
Definition: ci130x_dtrflash.h:61
int32_t spic_read_by_dma(uint32_t spic_base, spic_base_config_p spic_base_config, uint8_t *read_data, uint32_t read_len)
spic以DMA的方式向flash读数据
Definition: ci130x_dtrflash.c:468
uint32_t dummy_en
Definition: ci130x_dtrflash.h:62
int32_t spic_write_by_dma(uint32_t spic_base, spic_base_config_p spic_base_config, uint8_t *write_data, uint32_t write_len)
spic以DMA的方式向flash写数据
Definition: ci130x_dtrflash.c:524
int32_t spic_read_by_cpu(uint32_t spic_base, spic_base_config_p spic_base_config, uint8_t *read_data, uint32_t read_len)
spic以CPU的方式向flash读数据
Definition: ci130x_dtrflash.c:358