)u16 STMFLASH_BUF[STM_SECTOR_SIZE/2];//最多是2K字节void STMFLASH_Write(u32 WriteAddr,u16 *pBuffer,u16 NumToWrite) { u32 secpos; //扇区地址 u16 secoff; //扇区内偏移地址(16位字计算) u16 secremain; //扇区内剩余
uint32_t CalculateCRC32(uint8_t *data, size_t length); void SystemClock_Config(void); void InitializePeripherals(void); void JumpToApplication(uint32_t appAddress); void EraseFlashPage(uint32_t page_addr); void WriteToFlash(uint32_t addr, uint16_t data);...
Flash Address: 0x8000000~0x800FFFF 64K 芯片类型Flash大小Flash每页大小 小容量<=32K1K 中容量<=128K1K 大容量<=256K2K #defineFLASH_PAGE_SIZE ((uint16_t)0x400)//Flash每页大小#defineBT_APP_INFO_ADDR ((uint32_t)0x08001000)//APP固件版本信息保存地址#defineBT_APP_START_ADDR ((uint32_t)0x...
flash都是一个page一个page的擦除,你要看看那个page是不是有东西
STMFLASH_H_16#define_DRIVE_STMFLASH_H_17#include"stm32f10x.h"1819#defineFLASH_SIZE 64//所选MCU的FLASH容量大小202122#ifFLASH_SIZE < 25623#defineSECTOR_SIZE 1024//单位Byte24#defineSTM32_FLASH_BASE 0x800FC00//FLASH起始地址25#else26#defineSECTOR_SIZE 2048//单位Byte27#defineSTM32_FLASH_BASE...
5.STM32F103C8T6拥有128KByte的flash和20KByte的sram。本程序将0x0800 0000 - 0x0800 FFFF作为Boot...
You can compare it to Arduino DUE but it has got a very small size like the arduino Nano. T here’s lack of proper documentation on it and everything available in the internet is quite scattered. So, here’s something to get you started easily.STEPS:1.First download all the resources ...
/* Define the user application size */ #define USER_FLASH_SIZE ((uint32_t)0x0000C000) /*...
(STMFLASH_BUF[secoff+i]!=0XFFFF)break;//需要擦除 } if(i<secremain)//需要擦除 { FLASH_ErasePage(secpos*STM_SECTOR_SIZE+STM32_FLASH_BASE);//擦除这个扇区 for(i=0;i<secremain;i++)//复制 { STMFLASH_BUF[i+secoff]=pBuffer[i]; } STMFLASH_Write_NoCheck(secpos*STM_SECTOR_SIZE+...
Flash page at addr: 0x0800f800 erased 2023-07-30T12:43:04 INFO common.c: Finished erasing 63 pages of 1024 (0x400) bytes 2023-07-30T12:43:04 INFO common.c: Starting Flash write for VL/F0/F3/F1_XL core id 2023-07-30T12:43:04 INFO flash_loader.c: Successfully loaded flash loader...