fmc_byte_program(write_addr, data_buf[data_write_num]); fmc_flag_clear(FMC_FLAG_RDDERR|FMC_FLAG_PGSERR|FMC_FLAG_PGMERR|FMC_FLAG_WPERR|FMC_FLAG_OPERR); write_addr++; } fmc_lock(); } 4.4.2Flash读取数据函数 Flash读取数据函数如下所示,采用直接寻址的方式,读取字节数据。 C uint8_t fmc...
fmc_byte_program(write_addr, data_buf[data_write_num]);fmc_flag_clear(FMC_FLAG_RDDERR|FMC_...
2.4.4.Statusregister0(FMC_STAT0)54 2 GD32F30xUserManual 2.4.5.Controlregister0(FMC_CTL0)55 2.4.6.Addressregister0(FMC_ADDR0)56 2.4.7.Optionbytestatusregister(FMC_OBSTAT)57 2.4.8.Erase/ProgramProtectionregister(FMC_WP)57 2.4.9.Unlockkeyregister1(FMC_KEY1)58 2.4.10.Statusregister1(FMC...
c #include "gd32f10x.h" // 定义Flash页面大小 #define FLASH_PAGE_SIZE (4096U) // Flash写入函数 uint8_t Flash_WriteByte(uint32_t Address, uint8_t Data) { uint32_t temp; fmc_state_enum status; // 解锁Flash控制器 fmc_unlock(); // 清空状态寄存器 fmc_flag_clear(FMC_FLAG_END | ...
fmc_word_program(Address, data);fmc_flag_clear(FMC_FLAG_END | FMC_FLAG_WPERR | FMC_FLAG_...
4096KbytesFlashmemory,and320Kbytes(288Kbytes+32KbyteShared)SRAMat mostisavailableforstoringprogramsanddata.Table2-2.GD32VW553xxmemory mapshowsthememorymapoftheGD32VW553xxseriesofdevices,includingcode, SRAM,peripheral,andotherpre-definedregions. 3.3.Clock,resetandsupplymanagement Internal16MHzfactory-tri...
a flash memory with a 256-byte page size could still require that flash memory should be erased in 4-Kbyte chunks. The block size must always be a multiple of the page size. A flash memory can consist of several blocks of different sizes. It can also lack such restrictions, in which ...
NOR Flash是一种非易失闪存技术,是Intel在1988年创建。是市场上两种主要的非易失闪存技术之一。 以GD25Q64E为例,该 Flash为64M-bit大小,即8192K-Byte。 W25Q64将8M的容量分为127个块(Block),每个块大小为64K字节,每个块又分为16个扇区(Sector),每个扇区4K个字节。W25Q64的最小擦除单位为一个扇区,也就是...
}fmc_halfword_program(addr+i, buf16); buf +=2; }/* lock the main FMC after the erase operation */fmc_lock();returnsize; }staticintfal_flash_erase(longoffset,size_tsize){size_ti;rt_uint32_taddr = GD32_FLASH_START_ADRESS + offset;if((addr + size) > GD32_FLASH_END_ADDRESS) ...
FLASH_Status FLASH_ProgramOptionByteData(uint32_t Address, uint8_t Data);uint32_t FLASH_Get...