当前位置:网站首页>STM8S-----option byte
STM8S-----option byte
2022-08-04 02:34:00 【kick the player】
Option Byte ( O p t i o n B y t e )
The configuration word of the STM8S is similar to the Fuse bit of the AVR.It is used to configure the port's multiplexing function and read protection and other operations.Different from the fuse bit of AVR, the clock configuration of STM8S is not in Option Byte, and there will be no embarrassment that the chip is directly locked after writing STM8S.Option bytes are used to configure hardware features and memory protection status and are located in a specific memory array on the same page
.The option byte can be modified in ICP / SW IM mode or in I AP mode, that is, the configuration word can be written through STlink, or the option word can be written through the program
When the second function of the port needs to be enabled, it needs to be consideredOption byte programming, otherwise it will not be able to achieve the desired function of the program
For example: S TM8S has a buzzer controller B E E P, the corresponding port of this B E E P is PD 4. But PD 4 has two multiplexing functions, it can be
1.AFR7 = 1, BEEP buzzer output
2.AFR7 = 0, Tim2 compare output 1 is Tim2_CC1
Users must choose one of these two functions, only one.So how do you make PD 4 a B E E P output?The answer is to configure AF R 7 as 1 by setting the Opt ion by t e
option word, and use PD 4 to output the signal of BEE P, otherwise, PD 4 will output the signal of Tim 2 _ C C 1.
Of course, with any configuration, users can still use PD 4 like normal IO.
Optio n Byte In addition to being able to configure the multiplexing function of the port, it can also set the chip's read protection when the ROP byte in the option byte is programmed as '0 x AA'.In this case, regardless of whether the write protection is in effect, reading or modifying the FLASH program memory and DATA area in ICP mode (using the SWIM interface) is prohibited.Even if no protection is considered completely unbreakable, the STM8's read-protect feature provides a very high level of protection for a general-purpose microprocessor.That is to say, the way to prevent others from copying your program can be to program the ROP byte to enable read protection, then the other party cannot read your Flash data from STM8 no matter what
边栏推荐
猜你喜欢
LeetCode:899. 有序队列【思维题】
MallBook 助力SKT思珂特教育集团,立足变化,拥抱敏捷交易
Flask框架初学-05-命令管理Manager及数据库的使用
一文看懂推荐系统:召回05:矩阵补充、最近邻查找,工业界基本不用了,但是有助于理解双塔模型
倒计时2天,“文化数字化战略新型基础设施暨文化艺术链生态建设发布会”启幕在即
Development of Taurus. MVC WebAPI introductory tutorial 1: download environment configuration and operation framework (including series directory).
lombok注解@RequiredArgsConstructor的使用
Zabbix设置邮件告警+企业微信告警
DHCP服务详解
小程序:扫码打开参数解析
随机推荐
idea中diagram使用
Download install and create/run project for HBuilderX
5. Scrapy middleware & distributed crawler
Zabbix set up email alert + enterprise WeChat alert
实例037:排序
Example: 036 is a prime number
In the season of going overseas, the localization of Internet tips for going overseas
织梦内核电动伸缩门卷闸门门业公司网站模板 带手机版【站长亲测】
Ant - the design of the Select component using a custom icon (suffixIcon attribute) suffixes, click on the custom ICONS have no reaction, will not display the drop-down menu
Kubernetes:(九)coredns(浪不动了)
Example 039: Inserting elements into an ordered list
Zabbix设置邮件告警+企业微信告警
flinkcdc 消费 mysql binlog 没有 sqltype=delete 的数据是什么原
2022广东省安全员A证第三批(主要负责人)考试题库及模拟考试
STM8S项目创建(STVD创建)---使用 COSMIC 创建 C 语言项目
2022焊工(初级)上岗证题目模拟考试平台操作
2022年茶艺师(中级)考试试题模拟考试平台操作
What is SVN (Subversion)?
Deep Learning (3) Classification Theory Part
22/8/3(板子)树状dp板子+中国剩余定理+求组合数3,4+容斥原理