匿名
未登录
登录
丢石头百科
搜索
查看“STM8 FLASH寄存器”的源代码
来自丢石头百科
名字空间
页面
讨论
更多
更多
页面选项
查看
查看源代码
历史
←
STM8 FLASH寄存器
因为以下原因,您没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
FLASH控制寄存器1(FLASH_CR1) 地址偏移值:0x00 复位值:0x00 [[File:STM8_P29_1.jpg]] <table border="1" height="105" width="541"><tbody><tr bgcolor="#FFFFFF" class="type_483D8B" style="font-size: 12px; line-height: 20px; border-top-style: none; color: rgb(72, 61, 139);"><th class="type_483D8B_12px_b" style="font-family: Arial, Helvetica, sans-serif;" width="49">位7:4</th><td align="left" style="padding-left: 10px; padding-right: 5px;" width="476">保留位,必须保持为0</td></tr><tr bgcolor="#FFFFFF" class="type_483D8B" style="font-size: 12px; line-height: 20px; border-top-style: none; color: rgb(72, 61, 139);"><th class="type_483D8B_12px_b" style="font-family: Arial, Helvetica, sans-serif;">位3</th><td align="left" style="padding-left: 10px; padding-right: 5px;">HALT:停机(Halt)模式下掉电 该位可由软件来置位或清零。 0:当MCU在停机(Halt)模式时FLASH处于掉电模式 1:当MCU在停机(Halt)模式时FLASH处于运行模式</td></tr><tr bgcolor="#FFFFFF" class="type_483D8B" style="font-size: 12px; line-height: 20px; border-top-style: none; color: rgb(72, 61, 139);"><th class="type_483D8B_12px_b" style="font-family: Arial, Helvetica, sans-serif;">位2</th><td align="left" style="padding-left: 10px; padding-right: 5px;">AHALT:活跃停机(Active halt)模式下掉电 0:当MCU在活跃停机模式时FLASH处于掉电模式 1:当MCU在活跃停机模式时FLASH处于运行模式</td></tr><tr bgcolor="#FFFFFF" class="type_483D8B" style="font-size: 12px; line-height: 20px; border-top-style: none; color: rgb(72, 61, 139);"><th class="type_483D8B_12px_b" style="font-family: Arial, Helvetica, sans-serif;">位1</th><td align="left" style="padding-left: 10px; padding-right: 5px;">IE:FLASH中断使能 0:中断禁止 1:中断使能。当FLASH_IAPSR寄存器中的EOP或WR_PG_DIS位被置位时产生中断</td></tr><tr bgcolor="#FFFFFF" class="type_483D8B" style="font-size: 12px; line-height: 20px; border-top-style: none; color: rgb(72, 61, 139);"><th class="type_483D8B_12px_b" style="font-family: Arial, Helvetica, sans-serif;">位0</th><td align="left" style="padding-left: 10px; padding-right: 5px;">FIX:固定的编程时间 0:当存储器已经被擦除过时,编程时间为标准编程时间的一半(1/2 tprog),否则为标准的编程时间tprog。 1:编程时间固定为标准编程时间tprog。</td></tr></tbody></table> FLASH控制寄存器2(FLASH_CR2) 地址偏移值:0x01 复位值:0x00 [[File:STM8_P30_1.jpg]] <table border="1" height="105" width="541"><tbody><tr bgcolor="#FFFFFF" class="type_483D8B" style="font-size: 12px; line-height: 20px; border-top-style: none; color: rgb(72, 61, 139);"><th class="type_483D8B_12px_b" style="font-family: Arial, Helvetica, sans-serif;" width="49">位7</th><td align="left" style="padding-left: 10px; padding-right: 5px;" width="476">OPT:对选项字节进行写操作 该位可由软件来置位或清零。 0:对选项字节进行写操作被禁止 1:对选项字节进行写操作被使能</td></tr><tr bgcolor="#FFFFFF" class="type_483D8B" style="font-size: 12px; line-height: 20px; border-top-style: none; color: rgb(72, 61, 139);"><th class="type_483D8B_12px_b" style="font-family: Arial, Helvetica, sans-serif;">位6</th><td align="left" style="padding-left: 10px; padding-right: 5px;">WPRG:字编程 当操作完成时,该位由硬件来置位或清零。 0:字编程操作被禁止 1:字编程操作被使能</td></tr><tr bgcolor="#FFFFFF" class="type_483D8B" style="font-size: 12px; line-height: 20px; border-top-style: none; color: rgb(72, 61, 139);"><th class="type_483D8B_12px_b" style="font-family: Arial, Helvetica, sans-serif;">位5</th><td align="left" style="padding-left: 10px; padding-right: 5px;">ERASE(1):块擦除 当操作完成时,该位由硬件来置位或清零。 0:块擦除操作被禁止 1:块擦除操作被使能</td></tr><tr bgcolor="#FFFFFF" class="type_483D8B" style="font-size: 12px; line-height: 20px; border-top-style: none; color: rgb(72, 61, 139);"><th class="type_483D8B_12px_b" style="font-family: Arial, Helvetica, sans-serif;">位4</th><td align="left" style="padding-left: 10px; padding-right: 5px;">FPRG(1):快速块编程 当操作完成时,该位由硬件来置位或清零。 0:快速块编程操作被禁止 1:快速块编程操作被使能</td></tr><tr bgcolor="#FFFFFF" class="type_483D8B" style="font-size: 12px; line-height: 20px; border-top-style: none; color: rgb(72, 61, 139);"><th class="type_483D8B_12px_b" style="font-family: Arial, Helvetica, sans-serif;">位3:1</th><td align="left" style="padding-left: 10px; padding-right: 5px;">保留位</td></tr><tr bgcolor="#FFFFFF" class="type_483D8B" style="font-size: 12px; line-height: 20px; border-top-style: none; color: rgb(72, 61, 139);"><th class="type_483D8B_12px_b" style="font-family: Arial, Helvetica, sans-serif;">位0</th><td align="left" style="padding-left: 10px; padding-right: 5px;">PRG:标准块编程 当操作完成时,该位由硬件来置位或清零。 0:标准块编程操作被禁止 1:标准块编程操作被使能</td></tr></tbody></table>* 当存储器忙时,ERASE和FPRG位被锁住。 FLASH互补控制寄存器2(FLASH_NCR2) 地址偏移值:0x02 复位值:0xFF [[File:STM8_P31_1.jpg]] <table border="1" height="105" width="541"><tbody><tr bgcolor="#FFFFFF" class="type_483D8B" style="font-size: 12px; line-height: 20px; border-top-style: none; color: rgb(72, 61, 139);"><th class="type_483D8B_12px_b" style="font-family: Arial, Helvetica, sans-serif;" width="49">位7</th><td align="left" style="padding-left: 10px; padding-right: 5px;" width="476">NOPT:对选项字节进行写操作 该位可由软件来置位或清零。 0:对选项字节进行写操作被使能 1:对选项字节进行写操作被禁止</td></tr><tr bgcolor="#FFFFFF" class="type_483D8B" style="font-size: 12px; line-height: 20px; border-top-style: none; color: rgb(72, 61, 139);"><th class="type_483D8B_12px_b" style="font-family: Arial, Helvetica, sans-serif;">位6</th><td align="left" style="padding-left: 10px; padding-right: 5px;">NWPRG:字编程 当操作完成时,该位由硬件来置位或清零。 0:字编程操作被使能 1:字编程操作被禁止</td></tr><tr bgcolor="#FFFFFF" class="type_483D8B" style="font-size: 12px; line-height: 20px; border-top-style: none; color: rgb(72, 61, 139);"><th class="type_483D8B_12px_b" style="font-family: Arial, Helvetica, sans-serif;">位5</th><td align="left" style="padding-left: 10px; padding-right: 5px;">NERASE:块擦除 当操作完成时,该位可由软件来置位或清零。 0:块擦除操作被使能 1:块擦除操作被禁止</td></tr><tr bgcolor="#FFFFFF" class="type_483D8B" style="font-size: 12px; line-height: 20px; border-top-style: none; color: rgb(72, 61, 139);"><th class="type_483D8B_12px_b" style="font-family: Arial, Helvetica, sans-serif;">位4</th><td align="left" style="padding-left: 10px; padding-right: 5px;">FPRG(1):快速块编程 当操作完成时,该位由硬件来置位或清零。 0:快速块编程操作被禁止 1:快速块编程操作被使能</td></tr><tr bgcolor="#FFFFFF" class="type_483D8B" style="font-size: 12px; line-height: 20px; border-top-style: none; color: rgb(72, 61, 139);"><th class="type_483D8B_12px_b" style="font-family: Arial, Helvetica, sans-serif;">位3:1</th><td align="left" style="padding-left: 10px; padding-right: 5px;">保留位</td></tr><tr bgcolor="#FFFFFF" class="type_483D8B" style="font-size: 12px; line-height: 20px; border-top-style: none; color: rgb(72, 61, 139);"><th class="type_483D8B_12px_b" style="font-family: Arial, Helvetica, sans-serif;">位0</th><td align="left" style="padding-left: 10px; padding-right: 5px;">NPRG:标准块编程 当操作完成时,该位可由软件来置位或清零。 0:标准块编程操作被使能 1:标准块编程操作被禁止</td></tr></tbody></table> FLASH保护寄存器(FLASH_FPR) 地址偏移值:0x03 复位值:0x00 [[File:STM8_P32_1.jpg]] <table border="1" height="105" width="541"><tbody><tr bgcolor="#FFFFFF" class="type_483D8B" style="font-size: 12px; line-height: 20px; border-top-style: none; color: rgb(72, 61, 139);"><th class="type_483D8B_12px_b" style="font-family: Arial, Helvetica, sans-serif;" width="49">位7:6</th><td align="left" style="padding-left: 10px; padding-right: 5px;" width="476">保留位,必须保持为'0'</td></tr><tr bgcolor="#FFFFFF" class="type_483D8B" style="font-size: 12px; line-height: 20px; border-top-style: none; color: rgb(72, 61, 139);"><th class="type_483D8B_12px_b" style="font-family: Arial, Helvetica, sans-serif;">位5:0</th><td align="left" style="padding-left: 10px; padding-right: 5px;">WPB[5:0]:用户启动代码保护位。 这些位指示用户启动代码的大小,其值在启动时从UBC选项字节装载。请参考数据手册来了解关于保护页部分的细节。</td></tr></tbody></table> FLASH互补保护寄存器(FLASH_NFPR) 地址偏移值:0x04 复位值:0xFF [[File:STM8_P33_1.jpg]] <table border="1" height="105" width="541"><tbody><tr bgcolor="#FFFFFF" class="type_483D8B" style="font-size: 12px; line-height: 20px; border-top-style: none; color: rgb(72, 61, 139);"><th class="type_483D8B_12px_b" style="font-family: Arial, Helvetica, sans-serif;" width="49">位7:6</th><td align="left" style="padding-left: 10px; padding-right: 5px;" width="476">保留位,必须保持为'1'</td></tr><tr bgcolor="#FFFFFF" class="type_483D8B" style="font-size: 12px; line-height: 20px; border-top-style: none; color: rgb(72, 61, 139);"><th class="type_483D8B_12px_b" style="font-family: Arial, Helvetica, sans-serif;">位5:0</th><td align="left" style="padding-left: 10px; padding-right: 5px;">NWPB[5:0]:用户启动代码保护位。 这些位指示用户启动代码的大小,其值在启动时从NUBC选项字节装载。请参考数据手册来了解关于保护页部分的细节。</td></tr></tbody></table> FLASH程序存储器解保护寄存器(FLASH_PUKR) 地址偏移值:0x08 复位值:0x00 [[File:STM8_P34_1.jpg]] <table border="1" height="105" width="541"><tbody><tr bgcolor="#FFFFFF" class="type_483D8B" style="font-size: 12px; line-height: 20px; border-top-style: none; color: rgb(72, 61, 139);"><th class="type_483D8B_12px_b" style="font-family: Arial, Helvetica, sans-serif;" width="49">位7:0</th><td align="left" style="padding-left: 10px; padding-right: 5px;" width="476">PUK[7:0]:主程序存储器解锁密钥 该位可由软件来进行写操作(在任何模式下)。当读该寄存器时,返回值为0x00。请参考对主程序区域的写操作来了解主程序区域解除写保护机制的更多细节。</td></tr></tbody></table> DATA EEPROM解保护寄存器(FLASH_DUKR) 地址偏移值:0x0A 复位值:0x00 [[File:STM8_P35_1.jpg]] <table border="1" height="105" width="541"><tbody><tr bgcolor="#FFFFFF" class="type_483D8B" style="font-size: 12px; line-height: 20px; border-top-style: none; color: rgb(72, 61, 139);"><th class="type_483D8B_12px_b" style="font-family: Arial, Helvetica, sans-serif;" width="49">位7:0</th><td align="left" style="padding-left: 10px; padding-right: 5px;" width="476">DUK[7:0]:DATA EEPROM解锁密钥 该位可由软件来进行写操作(在任何模式下)。当读该寄存器时,返回值为00h。请参考对DATA区域的写操作来了解数据区域解除写保护机制的更多细节。</td></tr></tbody></table> FLASH状态寄存器(FLASH_IAPSR) 地址偏移值:0x05 复位值:0x00 [[File:STM8_P36_1.jpg]] <table border="1" height="105" width="541"><tbody><tr bgcolor="#FFFFFF" class="type_483D8B" style="font-size: 12px; line-height: 20px; border-top-style: none; color: rgb(72, 61, 139);"><th class="type_483D8B_12px_b" style="font-family: Arial, Helvetica, sans-serif;" width="49">位7</th><td align="left" style="padding-left: 10px; padding-right: 5px;" width="476">保留位,由硬件保证强迫其为0</td></tr><tr bgcolor="#FFFFFF" class="type_483D8B" style="font-size: 12px; line-height: 20px; border-top-style: none; color: rgb(72, 61, 139);"><th class="type_483D8B_12px_b" style="font-family: Arial, Helvetica, sans-serif;">位6</th><td align="left" style="padding-left: 10px; padding-right: 5px;">HVOFF:高压结束标志 0:HV开,开始真正的编程 1:HV关,高压结束</td></tr><tr bgcolor="#FFFFFF" class="type_483D8B" style="font-size: 12px; line-height: 20px; border-top-style: none; color: rgb(72, 61, 139);"><th class="type_483D8B_12px_b" style="font-family: Arial, Helvetica, sans-serif;">位5:4</th><td align="left" style="padding-left: 10px; padding-right: 5px;">保留位,由硬件保证强迫其为0</td></tr><tr bgcolor="#FFFFFF" class="type_483D8B" style="font-size: 12px; line-height: 20px; border-top-style: none; color: rgb(72, 61, 139);"><th class="type_483D8B_12px_b" style="font-family: Arial, Helvetica, sans-serif;">位3</th><td align="left" style="padding-left: 10px; padding-right: 5px;">DUL:DATA EEPROM区域解锁标志 该位由硬件置位,可由软件向其写入0来清零。 0:DATA EEPROM区域写保护使能 1:DATA EEPROM区域写保护可通过使用MASS密钥来解除</td></tr><tr bgcolor="#FFFFFF" class="type_483D8B" style="font-size: 12px; line-height: 20px; border-top-style: none; color: rgb(72, 61, 139);"><th class="type_483D8B_12px_b" style="font-family: Arial, Helvetica, sans-serif;">位2</th><td align="left" style="padding-left: 10px; padding-right: 5px;">EOP:编程结束(写或擦除操作)标志 0:没有EOP事件发生 1:有EOP事件发生。如果FLASH_CR1中的IE为1,将有中断产生</td></tr><tr bgcolor="#FFFFFF" class="type_483D8B" style="font-size: 12px; line-height: 20px; border-top-style: none; color: rgb(72, 61, 139);"><th class="type_483D8B_12px_b" style="font-family: Arial, Helvetica, sans-serif;">位1</th><td align="left" style="padding-left: 10px; padding-right: 5px;">PUL:快速程序存储器结束标志 该位由硬件置位,可由软件向其写入0来清零 0:主程序存储器区域写保护使能 1:主程序存储器区域写保护可通过使用MASS密钥来解除</td></tr><tr bgcolor="#FFFFFF" class="type_483D8B" style="font-size: 12px; line-height: 20px; border-top-style: none; color: rgb(72, 61, 139);"><th class="type_483D8B_12px_b" style="font-family: Arial, Helvetica, sans-serif;">位0</th><td align="left" style="padding-left: 10px; padding-right: 5px;">WR_PG_DIS:试图向被保护页进行写操作的标志 该位由硬件置位,可由软件通过读该寄存器来清零 0:没有WR_PG_DIS事件发生。 1:试图向被保护页进行写操作事件发生。如果FLASH_CR1中的IE为1,将有中断产生</td></tr></tbody></table> FLASH寄存器映射和复位值 <blockquote style="color: rgb(72, 61, 139); font-family: Arial, 新宋体, 微软雅黑; font-size: 12px; line-height: 20px;"> 要了解更多STM8的寄存器边界地址,请参考数据手册中通用硬件寄存器映射部分。 </blockquote> [[File:STM8_P37_1.jpg]] (表6:STM8 FLASH寄存器映射及复位值)
返回至
STM8 FLASH寄存器
。
导航
导航
首页
最近更改
随机页面
MediaWiki帮助
首页
首页
树莓派
主机
配件包
外壳
键鼠
电源
扩展板
显示屏
墨水屏
摄像模块
通信模块
继电器
电机驱动板
游戏机
产品分类
树莓派
Arduino
micro:bit
STM32
Espressif
WiFi模块
蓝牙模块
无线模块
LoRa模块
4G模块
GSM
GPRS
以太网
导航模块
北斗卫星
GPS
LCD
墨水屏
OLED
摄像头
USB模块
串口模块
RS232
RS485
CAN
传感器
温度模块
湿度模块
气压模块
继电器
电机模块
指纹模块
电平转换
音频模块
编程器
Wiki工具
Wiki工具
特殊页面
页面工具
页面工具
用户页面工具
更多
链入页面
相关更改
页面信息
页面日志