| | |
| | | { |
| | | // sizeof(stKMInfoBlock), |
| | | (BOARD_TYPE<<8) + BOARD_VER, //nDeviceType BOARD_VER, //nDevieVer |
| | | 0x0104, //ProgVer |
| | | 0x0107, //ProgVer |
| | | 0x0100, //KLinkVer |
| | | 0x0100, //KBusVer |
| | | // 0x0100, //KNetVer |
| | |
| | | 0, //nAbility; |
| | | 6, //nSwitchBits; |
| | | }; |
| | | const char VersionStr[] __attribute__((at(FLASH_BASE + 0X1000))) //__attribute__((at(0X8001000))) |
| | | /* |
| | | const char VersionStr[] __attribute__((at(FLASH_BASE + 0X2000))) //__attribute__((at(0X8001000))) |
| | | = "3.00"; |
| | | |
| | | */ |
| | | const stStoredKMSysCfg KMDefaultSysCfg /*__attribute__((at(STORECFGBASE)))*/ = |
| | | { |
| | | START_SIGN, |
| | |
| | | res = HAL_FLASH_Unlock(); |
| | | uint32_t ErrNo; |
| | | FLASH_EraseInitTypeDef erase1; |
| | | erase1.NbPages=1; |
| | | erase1.NbPages=(nByteSize-1) / FLASH_PAGESIZE + 1;; |
| | | erase1.PageAddress=(unsigned int)pAddrFlash; |
| | | erase1.TypeErase=FLASH_TYPEERASE_PAGES; |
| | | res = HAL_FLASHEx_Erase(&erase1,&ErrNo); |