OpenEdv-开源电子网

 找回密码
 立即注册
正点原子全套STM32/Linux/FPGA开发资料,上千讲STM32视频教程免费下载...
查看: 4960|回复: 1

FLM下载算法FlashDevice参数

[复制链接]

4

主题

10

帖子

0

精华

新手上路

积分
36
金钱
36
注册时间
2022-5-31
在线时间
6 小时
发表于 2023-4-17 09:36:39 | 显示全部楼层 |阅读模式
1金钱
struct FlashDevice  {
   unsigned short     Vers;    // Version Number and Architecture
   char       DevName[128];    // Device Name and Description
   unsigned short  DevType;    // Device Type: ONCHIP, EXT8BIT, EXT16BIT, ...
   unsigned long    DevAdr;    // Default Device Start Address
   unsigned long     szDev;    // Total Size of Device
   unsigned long    szPage;    // Programming Page Size
   unsigned long       Res;    // Reserved for future Extension
   unsigned char  valEmpty;    // Content of Erased Memory

   unsigned long    toProg;    // Time Out of Program Page Function
   unsigned long   toErase;    // Time Out of Erase Sector Function

   struct FlashSectors sectors[SECTOR_NUM];
};

想问一下这个超时时间的具体含义?是指调用一次ProgramPage和EraseSector函数的时间?还是根据程序大小比如32K,页大小1K,调用32次函数的总时间?
然后这个时间和SW时钟有关系吗?


正点原子逻辑分析仪DL16劲爆上市
回复

使用道具 举报

4

主题

10

帖子

0

精华

新手上路

积分
36
金钱
36
注册时间
2022-5-31
在线时间
6 小时
 楼主| 发表于 2023-4-17 09:55:31 | 显示全部楼层
  1. #ifdef STM32F10x_128
  2. struct FlashDevice const FlashDevice  =  {
  3.    FLASH_DRV_VERS,             // Driver Version, do not modify!
  4.    "STM32F10x Med-density Flash", // Device Name (128kB/64kB/32kB)
  5.    ONCHIP,                     // Device Type
  6.    0x08000000,                 // Device Start Address
  7.    0x00020000,                 // Device Size in Bytes (128kB)
  8.    1024,                       // Programming Page Size
  9.    0,                          // Reserved, must be 0
  10.    0xFF,                       // Initial Content of Erased Memory
  11.    100,                        // Program Page Timeout 100 mSec
  12.    500,                        // Erase Sector Timeout 500 mSec

  13. // Specify Size and Address of Sectors
  14.    0x0400, 0x000000,           // Sector Size 1kB (128 Sectors)
  15.    SECTOR_END
  16. };
  17. #endif
复制代码
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则



关闭

原子哥极力推荐上一条 /2 下一条

正点原子公众号

QQ|手机版|OpenEdv-开源电子网 ( 粤ICP备12000418号-1 )

GMT+8, 2025-4-30 09:16

Powered by OpenEdv-开源电子网

© 2001-2030 OpenEdv-开源电子网

快速回复 返回顶部 返回列表