[STM32F0] 请问关于STM32F042MCU_IAP计算flash

[复制链接]
1081|3
 楼主| Diyer2015 发表于 2018-12-19 09:56 | 显示全部楼层 |阅读模式
/* Exported types ------------------------------------------------------------*/
/* Exported constants --------------------------------------------------------*/
#define USER_FLASH_LAST_PAGE_ADDRESS  0x08007800
#define USER_FLASH_END_ADDRESS        0x08007FFF /* 64 KBytes */
#define FLASH_PAGE_SIZE               0x400      /* 1 Kbytes */

/* define the address from where user application will be loaded,
   the application address should be a start sector address */
#define APPLICATION_ADDRESS     (uint32_t)0x08003000

/* Get the number of Sector from where the user program will be loaded */
#define  FLASH_PAGE_NUMBER      (uint32_t)((APPLICATION_ADDRESS - 0x08000000) >> 6)

/* Compute the mask to test if the Flash memory, where the user program will be
   loaded, is write protected */
#define  FLASH_PROTECTED_PAGES   ((uint32_t)~((1 << FLASH_PAGE_NUMBER) - 1))

/* define the user application size */
#define USER_FLASH_SIZE   (USER_FLASH_END_ADDRESS - APPLICATION_ADDRESS + 1)

请问,使用串口IAP,stm32f042 的计算,这样是不是也不对呢?

flash_if.h 文件夹里面!
 楼主| Diyer2015 发表于 2018-12-19 09:56 | 显示全部楼层
使用 stm32f042 iap 一直接收都不能成功!
哪位可以指点一下?
wowu 发表于 2019-1-1 17:05 | 显示全部楼层
什么叫计算flash啊
 楼主| Diyer2015 发表于 2019-1-2 09:21 | 显示全部楼层
就是 F042 的flash 起始位置
您需要登录后才可以回帖 登录 | 注册

本版积分规则

63

主题

1615

帖子

13

粉丝
快速回复 在线客服 返回列表 返回顶部