打印
[STM32F0]

请问关于STM32F042MCU_IAP计算flash

[复制链接]
850|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

粉丝