打印
[AT32F435]

AT32 F435简介1/N Security Library

[复制链接]
203|0
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
tpgf|  楼主 | 2024-2-4 13:41 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
1. 源由
对比STM32 F405进行AT32 F435 MCU的资料研读,期望获取更多差异化信息;
配合ChibiOS的porting工作,有理有据;
寻找AT32 F435的一些亮点功能和特性;
2. Security Library
随着越来越多的MCU应用程序需要复杂的算法和中间件解决方案,如何保护软件解决方案提供商开发的IP代码(如核心算法)已成为一个重要问题。

为了满足这一需求,AT32F435/437系列设计了一个安全库(sLib),用于保护重要的IP代码不被最终用户程序更改或读取。

安全库(sLib)是由主内存中受到保护的代码定义区域。软件解决方案提供商将核心算法存储在sLib中以进行保护。
Security library (sLib) is a defined area protected by a code in the main memory. Software solution providers store core algorithms in sLib for protection. The rest of the area can be used for secondary development by end users.

安全库包括只读区(SLIB_READ_ONLY)和指令区(SLIB_INSTRUCTION),可以部分或全部用作只读区或指令区。
Security library includes the read-only area (SLIB_READ_ONLY) and instruction area ((SLIB_INSTRUCTION), and it can be partially or completely used as the read-only area or instruction area.

只读区域(SLIB_READ_ONLY)的数据可以通过I-Code和D-Code总线读取,但不能写入。
Data of the read-only area (SLIB_READ_ONLY) can be read by I-Code and D-Code buses but cannot be written.

指令区中的程序代码(SLIB_instruction)只能由MCU通过I-Code总线获取(仅可执行),而不能通过DCode总线读取访问(包括ISP/ICP/调试模式或从内部RAM引导)来读取,通过读取数据来访问SLIB_ESTRUCTION操作将返回所有0xFF。
Program codes in the instruction area (SLIB_INSTRUCTION) can only be fetched by MCU through I-Code bus (only executable), and cannot be read by reading access through DCode bus (including ISP/ICP/debug mode or boot from internal RAM), for accessing SLIB_INSTRUCTION by reading data operation will return all 0xFF.

除非键入了正确的代码,否则无法擦除安全库中的程序代码和数据。如果键入了错误的代码,在尝试写入或删除安全库代码时,FLASH_STS寄存器中的EPERR=1将发出警告消息。
Program codes and data in security library cannot be erased unless the correct code is keyed in. If a wrong code is keyed in, in an attempt of writing or deleting security library code, a warning message will be issued by EPPERR=1 in the FLASH_STS register.

最终用户对主闪存的大规模擦除操作不会擦除安全库中的代码和数据。
Mass erase operation to the main Flash memory by end users will not erase the codes and data in security library.

启用sLib后,用户还可以通过将先前定义的密码写入sLib_PWD_CLR寄存器来解锁sLib保护。禁用安全库保护后,MCU将擦除整个主存储器,包括sLib。因此,即使由软件解决方案提供商定义的代码被泄露,程序代码也受到保护以防止泄露。
After sLib is enabled, users can also unlock the sLib protection by writing the previously defined password in the SLIB_PWD_CLR register. After the security library protection is disabled, the MCU will erase the whole main memory, including the sLib. Therefore, the program codes are protected against leakage even if the code defined by the software solution provider is leaked.

注:具体使用方法,详见:AN0081_AT32F435_437_Security_Library_Application_Note

3. 总结
这是一个非常好的功能,该方法可以非常好的管控知识产权,前提条件是智能生产产线的建立和质量管控。
————————————————

                            版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。

原文链接:https://blog.csdn.net/lida2003/article/details/135044011

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

1360

主题

13960

帖子

8

粉丝