×
嵌入式 > 技术百科 > 详情

加密系统调试_HCS12学习笔记(8)

发布时间:2020-06-06 发布时间:
|
最近搞了一下关于加密的调试,在此做个记录。

 

 

其实很简单,只是对#FF0F进行操作一下就可以了,具体位操作详见S12FTS256KV2.PDF,寄存器FESC。

 

 

在MAIN.C的最后加上

 

const volatile unsigned char SecureReg @(0xFF0F)=0xFC;

 

即可,注意VOLATILE字样,如果没有的话,可能被DUBUG掉。

 

我对所有的程序进行了调试,一切正常,只有在涉及到FLASH擦写时,程序无法正常运行,或者把程序段放入FLASH分页时无法正常运行。查了N多资料,未果。

 

于是找了FREESCALE的技术支持,交流过后发现,是我芯片型号的问题,因为我的芯片的MASK是1K79X,比较老的型号,所以确实在这个方面是有问题的,如果换成了DT256或者高版本的MASK,即可解决问题。

 

这里是1K79X参错里的内容,描述了这个问题。

MUCts00603: FLASH
Program & erase blocked in normal single chip mode when secure
Description
In normal single chip mode, when security is enabled, it is not possible to launch the Program ($20), Sector-Erase ($40) and Erase-Verify ($05) commands in the Flash. The Mass-Erase ($41) command can be launched.


Workaround
To enable the Program ($20), Sector-Erase ($40) and Erase-Verify ($05) commands in the flash, security must be disabled via the backdoor key sequence. See Flash User Guide for details of the backdoor key operation.

 

 


『本文转载自网络,版权归原作者所有,如有侵权请联系删除』

热门文章 更多
Semtech的LoRa技术携手Chipsafer将牧场连接至云端