当前位置:网站首页>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
边栏推荐
- Example 039: Inserting elements into an ordered list
- Download install and create/run project for HBuilderX
- golang中的unsafe.Pointer,指针,引用
- Continuing to invest in product research and development, Dingdong Maicai wins in supply chain investment
- QNX Hypervisor 2.2用户手册]10.1 通用vdev选项
- TOML配置文件格式,YAML最有力的竞争者
- Oracle迁移到瀚高之后,空值问题处理
- Promise solves blocking synchronization and turns asynchronous into synchronous
- 【Playwright测试教程】5分钟上手
- 5. Scrapy middleware & distributed crawler
猜你喜欢

参加Oracle OCP和MySQL OCP考试的学员怎样在VUE预约考试

系统太多,多账号互通如何实现?

activiti流程执行过程中,数据库表的使用关系

【云原生】DevOps(六):Jenkins流水线

小程序+新零售,玩转行业新玩法!

Pine脚本 | 如何显示和排版绘图开关?

Continuing to invest in product research and development, Dingdong Maicai wins in supply chain investment

2022年T电梯修理考题及答案

如何在MySQL中的数据库下删除所有的表

esp32 releases robot battery voltage to ros2 (micro-ros+CoCube)
随机推荐
瑞能微计量芯片RN2026的实用程序
出海季,互联网出海锦囊之本地化
香港服务器有哪些常用的型号
Example: 036 is a prime number
The browser
返回字符串中的最大回文数
QNX Hypervisor] 10.2 vdev 8259 2.2 user manual
[QNX Hypervisor 2.2 User Manual] 10.3 vdev gic
如何在MySQL中的数据库下删除所有的表
MallBook 助力SKT思珂特教育集团,立足变化,拥抱敏捷交易
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
QNX Hypervisor 2.2 user manual] 10.1 gm vdev options
STM32-遥感数据处理
yum 仅下载包
SAP SD模块前台操作
小程序:扫码打开参数解析
FileNotFoundException: This file can not be opened as a file descriptor; it is probably compressed
Download install and create/run project for HBuilderX
【原创】启动Win10自带的XPS/OXPS阅读器
一文看懂推荐系统:召回04:离散特征处理,one-hot编码和embedding特征嵌入