硬汉嵌入式论坛

 找回密码
 立即注册
查看: 10133|回复: 0
收起左侧

STM8S如何设置Flash读保护。通过 SWIM 无法读出程序。

[复制链接]

760

主题

1052

回帖

3337

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
3337
发表于 2012-9-19 16:56:09 | 显示全部楼层 |阅读模式
当选项字节中的ROP字节被编程为’0xAA’时,读保护就生效了。这种情况下,无论写保护是否生效,在ICP模式中(使用SWIM接口)读取或修改FLASH程序存储器和DATA区域都是被禁止的。即使认为没有什么保护是完全不可破解的,对于一个通用微处理器来说,STM8的读保护的特性也提供了一个非常高水平的保护级别。
可以在ICP模式中通过对选项字节中的ROP字节重新编程来解除程序存储器、UBC和DATA区域的读保护。在这种情况下,程序存储器、UBC、DATA区域以及选项字节都被自动擦除,器件也可以被重新编程了。

The readout protection can be set by writing 0xAA in the ROP option byte. It can be disabled
by reprogramming the ROP option byte. Enabling and disabling readout protection is
possible only in ICP mode.

When the readout protection is selected, reading or modifying the Flash program memory in
ICP mode (using the SWIM interface) is forbidden. When available, the data EEPROM
memory is also protected against read and write access through ICP.

Erasing the ROP option byte to disable the readout protection causes the Flash program
memory, the DATA area and the option bytes to be erased.

POP选项字的地址为 0x4800
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋|Archiver|手机版|硬汉嵌入式论坛

GMT+8, 2025-8-12 17:41 , Processed in 0.033884 second(s), 23 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表