Board logo

标题: stm8s的UBC参数问题 [打印本页]

作者: feitiandadao    时间: 2012-2-22 20:16     标题: stm8s的UBC参数问题

在做bootload时发现UBC选项字节和手册上的差别甚大,
不知道是手册错误还是设置问题
datasheet:
UBC[7:0] User boot code area
0x00: no UBC, no write-protection
0x01: Page 0 to 1 defined as UBC, memory write-protected
0x02: Page 0 to 3 defined as UBC, memory write-protected
0x03: Page 0 to 4 defined as UBC, memory write-protected
...
0x3E: Pages 0 to 63 defined as UBC, memory write-protected
Other values: Reserved
Note: Refer to the family reference manual (RM0016) section on
Flash write protection for more details.

我的bootload为4K即为4096/128=32页,那么opt1=32-2=30

但是当opt1为此值时发现0x9000处不能写

后用stvp实验发现当opt1=6时恰好前4k写保护!!




欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) Powered by Discuz! 7.0.0