当前位置:网站首页>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
边栏推荐
- cdh6.x 集成spark-sql
- 融云「音视频架构实践」技术专场【内含完整PPT】
- sql有关问题,小时粒度,找到前一个小时内的数据
- MallBook联合人民交通出版社,推动驾培领域新发展,开启驾培智慧交易新生态
- Dong mingzhu live cold face away, when employees frequency low-level mistakes, no one can understand their products
- 小程序+新零售,玩转行业新玩法!
- 阿里云国际版基于快照与镜像功能迁移云服务器数据
- Example: 036 is a prime number
- Big guys, it takes a long time to read mysql3 million single tables, what parameters can be discounted, or is there any way to hurry up
- Continuing to pour money into commodities research and development, the ding-dong buy vegetables in win into the supply chain
猜你喜欢
随机推荐
融云「音视频架构实践」技术专场【内含完整PPT】
脚手架内容详解分析
esp32 releases robot battery voltage to ros2 (micro-ros+CoCube)
出海季,互联网出海锦囊之本地化
FileNotFoundException: This file can not be opened as a file descriptor; it is probably compressed
实例038:矩阵对角线之和
Utilities of Ruineng Micrometer Chip RN2026
QNX Hypervisor 2.2用户手册]10.1 通用vdev选项
Flutter3.0线程——四步教你如何全方位了解(事件队列)
STM8S105K4T6------串口发送和接收
[Original] Start the XPS/OXPS reader that comes with Windows 10
在更一般意义上验算移位距离和假设
cdh6.x 集成spark-sql
Instance, 038: the sum of the diagonal matrix
yum 仅下载包
keytool命令
Rongyun "Audio and Video Architecture Practice" technical session [complete PPT included]
Web APIs BOM - operating browser: swiper plug-in
单片机C语言->的用法,和意思
2022焊工(初级)上岗证题目模拟考试平台操作









