PSoC6 怎么设置Flash读保护,防止被外部读取?

公告

大中华汽车电子生态圈社区并入开发者社区- 更多资讯点击此

Tip / 登入 to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
1313_3839421
Level 3
Level 3
10 replies posted 10 questions asked 5 replies posted

PSoC6 怎么设置Flash读保护,防止被外部读取,最好是通过软件设置。

0 点赞
1 解答
LinglingG_46
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 10 questions asked

您好:

请参考下面的链接:

具体方式可以参考community thread -https://community.cypress.com/thread/47705

以及文档- https://www.cypress.com/file/447981/download Appendix B部分

如果是在PSoC Creator 这个集成开发环境下开发的话,把图示SWD接口改成GPIO,就可以阻止外部通过SWD接口读flash,这个时候芯片是不能进行debug的。

pastedImage_3.png

在原帖中查看解决方案

0 点赞
4 回复数
LinglingG_46
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 10 questions asked

您好:

请参考下面的链接:

具体方式可以参考community thread -https://community.cypress.com/thread/47705

以及文档- https://www.cypress.com/file/447981/download Appendix B部分

如果是在PSoC Creator 这个集成开发环境下开发的话,把图示SWD接口改成GPIO,就可以阻止外部通过SWD接口读flash,这个时候芯片是不能进行debug的。

pastedImage_3.png

0 点赞

您好,https://www.cypress.com/file/447981/download Appendix B这个链接已失效。

我目前是在用PSoC Creator 4.3做开发,直接把SWD改成GPIO这种方法可靠吗?当芯片hold住reset引脚的话是不是就可以读写flash了。

pastedImage_0.png

0 点赞
LinglingG_46
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 10 questions asked

To disable debug/programming port of PSoC 6, add the following code to write directly to SFLASH NAR. Refer to Chapter 14 Boot Code in P6 TRM for details on NAR bit mapping.

CY_SECTION(".cy_sflash_nar") __USED uint16_t nar = 0x0007;

However, please be caution with this method, as once the NAR bits changed to non zero, the bits can not be cleared and debug/programming port will never be restored.

注意: 本操作是不可逆的,相当于 PSoC4 的 Kill 保护模式被使能

0 点赞

明白了,非常感谢

0 点赞