请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
器件型号:F28M35H52C 大家好、我很难处理 M3 DCSM 解锁序列...
我要做的是在设置 CSM 武装(位11)的情况下将安全性重置为干净状态。
我尝试通过首先设置 FORCESEC 位、然后对密码位置执行虚拟读取来进入此状态。 当使用 JTAG 仿真器执行时、这似乎起作用、但是当我从 MCU 中的非安全 RAM 运行相同的序列时、我无法将 CSM 连接到 ARM。 下面是测试代码和调试输出。 我必须缺少一些基本的东西。
遗憾的是、《技术参考》在 DCSM 主题上非常模糊。
是否还有其他应用手册、或者可能还有一些示例代码可与我分享?
谢谢!
调试终端:
CSM status before forcesec:0x00001F80 CSM status after forcesec:0x00000460 OTPSECLOCK:0x00FFFFFF CSM status after OTPSECLOCK read:0x00000460 CSM status after password read:0x00000440
代码:
volatile unsigned long status、temp; //禁用保护 HWREG (SYSCTL_MWRALLOW)= 0xA5A5A5; status = HWREG (csm_base + DCSM_O_Z1_CR); debug_write_string ("HWesec 之前的 CSM 状态:0x"); status = HWREG (status);dcsm_write_texcr ( + tebug_cr_1) ;tebug_r_cr"(0xESCR/d"(+ tebug_cr"= 0x_r_r_r_r_ble/d_ble/dcsm);tebug_cr"(+ tebug_r_r_cr"(0xESCR/d_r_r_b_/dcsm);tebug_r_cr_cr"= 0xESCR/d_b/d/ t/tebug_r_r_/dcsm);tebug_r_r_r_r_ // OTPSECLOCK in OPT status = HWREG (csm_base + 0x120);// OTPSECLOCK 寄存器 debug_write_string ("OTPSECLOD3 :0x");debug_write_long (status);debug_write_string ("\n"r);status = HWREG (dcsm_base + dcsm_write_d1 );HWRECO_offset = z_d1 + tebug_cr_while (z_regist_regist_offset);HWREG_while + z1_offset + z_offset + z_set + z1_swcs_set + z_set + t_set + z_set + z_offset + z_set (z_set + t_set)+ tor_set + z_cr_set 状态= HWREG (csm_base + dcsm_O_Z1_CR); debug_write_string (密码读取后的 CSM 状态:0x"); debug_write_long (status); debug_write_string ("\n\r");