This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
工具与软件:
我希望实现一个单区域 DCSM 来保护整个器件的存储器。 初步测试正在 LAUNCHXL-F28379D 上完成。 我从 C2000Ware_4_00_00_00\driverlib\f2837xd\examples\cpu1\dcsm 中导入了 DCSM 安全工具工程示例。 我按如下所示更新了 SysConfig 并对器件进行了编程。 它编程成功。 初始编程后、我无法再次对器件进行编程。 我将密码放在了调试配置窗口中(如下所示)、但仍然无法正常工作。 连接到如下所示的目标时出现错误、但当我通过目标配置 ccxml 运行测试连接时、JTAG DR 完整性扫描测试成功。 我想我错过了一些简单的东西,但我不知道什么。 设计意图是在器件投入生产后、保护器件上的所有存储器。 我在 TRM 中查看了器件和 DCSM 安全工具应用指南、但不知道有什么问题。
您好、William、
当您在片上闪存工具中提供 CSM 密码、然后选择"Unlock"时、DSCM 是否成功解锁?
谢谢!
Luke
否、我已经通过 uniflash 程序尝试过并通过 CCS、得到了以下错误:
C28xx_CPU1: Unlocking device... C28xx_CPU1: Error occurred during flash operation: Could not read 0x00078000@Data: target is not connected C28xx_CPU1: Error occurred during flash operation: Could not read 0x00078004@Data: target is not connected C28xx_CPU1: Error occurred during flash operation: Could not read 0x00078008@Data: target is not connected C28xx_CPU1: Error occurred during flash operation: Could not read 0x0005F000@Data: target is not connected C28xx_CPU1: Error occurred during flash operation: Could not read 0x000781F0@Data: target is not connected C28xx_CPU1: Error occurred during flash operation: Could not read 0x000781F2@Data: target is not connected C28xx_CPU1: Error occurred during flash operation: Could not read 0x000781F4@Data: target is not connected C28xx_CPU1: Error occurred during flash operation: Could not read 0x000781F6@Data: target is not connected C28xx_CPU1: Error occurred during flash operation: Could not read 0x000781F8@Data: target is not connected C28xx_CPU1: Error occurred during flash operation: Could not read 0x000781FA@Data: target is not connected C28xx_CPU1: Error occurred during flash operation: Could not read 0x000781FC@Data: target is not connected C28xx_CPU1: Error occurred during flash operation: Could not read 0x000781FE@Data: target is not connected C28xx_CPU1: Error occurred during flash operation: Could not write 0x0005F010@Data: target is not connected C28xx_CPU1: Error occurred during flash operation: Could not write 0x0005F012@Data: target is not connected C28xx_CPU1: Error occurred during flash operation: Could not write 0x0005F014@Data: target is not connected C28xx_CPU1: Error occurred during flash operation: Could not write 0x0005F016@Data: target is not connected C28xx_CPU1: Error occurred during flash operation: Could not read 0x0005F019@Data: target is not connected C28xx_CPU1: Lock status: 1 C28xx_CPU1: Error unlocking device. Device still locked. Please recheck the entered password. C28xx_CPU1: Error occurred during flash operation: Could not write 0x0005F800@Data: target is not connected
不知何故、在对器件编程之后、我根本无法再连接到该器件。
您好、William、
器件是否配置为使用等待引导或闪存引导? 如果闪存引导、由于 ECSL 保护、您将无法连接到器件(在闪存受到保护时)。
谢谢!
Luke
我最初是在仿真引导中运行、但也尝试了等待引导。
我注意到 DCSM 安全工具的引导控制地址似乎有错误。 TRM 显示 Z1-BOOTCTRL 为0x7801E、而自动生成的 DCSM.cmd 文件具有0x7801C 的 Z1引导控制。 我没有选择系统配置文件中的引导控制部分、因此删除了 dcsm.asm 文件的该部分。 我想、由于 dcsm_opt_z1_bootctrl 被注释掉、这不会引起问题。 我不确定 应该将什么存储在0x7801C 中。 我将包含用于参考的整个 dcsm.asm 和 dcsm.cmd 文件以及冲突的 TRM 片段。 唯一改变的是 dcsm.asm 文件中的实际密码文本。
;---------------------------------------------------------------------- ; Zone 1 ;---------------------------------------------------------------------- .sect "dcsm_otp_z1_linkpointer" .retain .long 0x1FFFFFFF .long 0xFFFFFFFF ;Reserved .long 0x1FFFFFFF .long 0xFFFFFFFF ;Reserved .long 0x1FFFFFFF .long 0xFFFFFFFF ;Reserved .sect "dcsm_otp_z1_pswdlock" .retain .long 0xFFFFFFF0 .long 0xFFFFFFFF ;Reserved .sect "dcsm_otp_z1_crclock" .retain .long 0xFFFFFFFF .long 0xFFFFFFFF ;Reserved ;; .sect "dcsm_otp_z1_bootctrl" ;; .retain ;; .long 0xFFFFFFFF ;Reserved ;; .long 0x49550B5A .sect "dcsm_zsel_z1" .retain .long 0x000000FF ;Z1-EXEONLYRAM .long 0x00003FFF ;Z1-EXEONLYSECT .long 0x10005555 ;Z1-GRABRAM .long 0x05555555 ;Z1-GRABSECT .long 0xPASSWORD .long 0xPASSWORD .long 0xPASSWORD .long 0xPASSWORD ;---------------------------------------------------------------------- ; For code security operation,after development has completed, prior to ; production, all other zone select block locations should be programmed ; to 0x0000 for maximum security. ; If the first zone select block at offset 0x10 is used, the section ; "dcsm_rsvd_z1" can be used to program these locations to 0x0000. ; This code is commented out for development. ; .sect "dcsm_rsvd_z1" ; .loop (1e0h) ; .int 0x0000 ; .endloop ;---------------------------------------------------------------------- ; Zone 2 ;---------------------------------------------------------------------- .sect "dcsm_otp_z2_linkpointer" .retain .long 0x1FFFFFFF .long 0xFFFFFFFF ;Reserved .long 0x1FFFFFFF .long 0xFFFFFFFF ;Reserved .long 0x1FFFFFFF .long 0xFFFFFFFF ;Reserved .sect "dcsm_otp_z2_pswdlock" .retain .long 0xFFFFFFFF .long 0xFFFFFFFF ;Reserved .sect "dcsm_otp_z2_crclock" .retain .long 0xFFFFFFFF .long 0xFFFFFFFF ;Reserved ;; .sect "dcsm_otp_z2_bootctrl" ;; .retain ;; .long 0xFFFFFFFF ;Reserved ;; .long 0x49550B5A .sect "dcsm_zsel_z2" .retain .long 0x000000FF ;z2-EXEONLYRAM .long 0x00003FFF ;z2-EXEONLYSECT .long 0x3000FFFF ;z2-GRABRAM .long 0x0FFFFFFF ;z2-GRABSECT .long 0xFFFFFFFF .long 0xFFFFFFFF .long 0xFFFFFFFF .long 0xFFFFFFFF ;---------------------------------------------------------------------- ; For code security operation,after development has completed, prior to ; production, all other zone select block locations should be programmed ; to 0x0000 for maximum security. ; If the first zone select block at offset 0x10 is used, the section ; "dcsm_rsvd_z2" can be used to program these locations to 0x0000. ; This code is commented out for development. ; .sect "dcsm_rsvd_z2" ; .loop (1e0h) ; .int 0x0000 ; .endloop ;---------------------------------------------------------------------- ; End of file ;----------------------------------------------------------------------
/* this linker command file is to be included if user wants to use the DCSM feature on the device * DCSM means Dual Zone Code Security Module. * This linker command file works as an addendum ot the already existing Flash/RAM linker command file * that the project has. * The sections in the *_ZoneSelectBlock.asm source file is linked as per the commands given in the file * NOTE - please note fill=0xFFFF, this helps if users include this file in the project by mistake and * doesn't provide the needed proper *_ZoneSelectBlock.asm sources . * Please refer to the Blinky DCSM example in the controlsuite examples for proper usage of this. * * Once users are confident that they want to program the passwords in OTP, the DSECT section type can be removed. * */ MEMORY { PAGE 0 : /* Program Memory */ /* Z1 OTP. LinkPointers */ DCSM_OTP_Z1_LINKPOINTER : origin = 0x78000, length = 0x00000C /* Z1 OTP. GPREG1/GPREG2 */ DCSM_OTP_Z1_GPREG : origin = 0x7800C, length = 0x000004 /* Z1 OTP. PSWDLOCK/RESERVED */ DCSM_OTP_Z1_PSWDLOCK : origin = 0x78010, length = 0x000004 /* Z1 OTP. CRCLOCK/RESERVED */ DCSM_OTP_Z1_CRCLOCK : origin = 0x78014, length = 0x000004 /* Z1 OTP. RESERVED/BOOTCTRL */ DCSM_OTP_Z1_BOOTCTRL : origin = 0x7801C, length = 0x000004 /* DCSM Z1 Zone Select Contents (!!Movable!!) */ /* Z1 OTP. Z1 password locations / Flash and RAM partitioning */ DCSM_ZSEL_Z1_P0 : origin = 0x78020, length = 0x000010 /* Z2 OTP. LinkPointers */ DCSM_OTP_Z2_LINKPOINTER : origin = 0x78200, length = 0x00000C /* Z2 OTP. GPREG1/GPREG2 */ DCSM_OTP_Z2_GPREG : origin = 0x7820C, length = 0x000004 /* Z2 OTP. PSWDLOCK/RESERVED */ DCSM_OTP_Z2_PSWDLOCK : origin = 0x78210, length = 0x000004 /* Z2 OTP. CRCLOCK/RESERVED */ DCSM_OTP_Z2_CRCLOCK : origin = 0x78214, length = 0x000004 /* Z2 OTP. GPREG3/BOOTCTRL */ DCSM_OTP_Z2_BOOTCTRL : origin = 0x7821C, length = 0x000004 /* DCSM Z2 Zone Select Contents (!!Movable!!) */ /* Z2 OTP. Z2 password locations / Flash and RAM partitioning */ DCSM_ZSEL_Z2_P0 : origin = 0x78220, length = 0x000010 } SECTIONS { dcsm_otp_z1_linkpointer : > DCSM_OTP_Z1_LINKPOINTER PAGE = 0 dcsm_otp_z1_pswdlock : > DCSM_OTP_Z1_PSWDLOCK PAGE = 0 dcsm_otp_z1_crclock : > DCSM_OTP_Z1_CRCLOCK PAGE = 0 dcsm_otp_z1_bootctrl : > DCSM_OTP_Z1_BOOTCTRL PAGE = 0, type = DSECT dcsm_zsel_z1 : > DCSM_ZSEL_Z1_P0 PAGE = 0 dcsm_otp_z2_linkpointer : > DCSM_OTP_Z2_LINKPOINTER PAGE = 0 dcsm_otp_z2_pswdlock : > DCSM_OTP_Z2_PSWDLOCK PAGE = 0 dcsm_otp_z2_crclock : > DCSM_OTP_Z2_CRCLOCK PAGE = 0 dcsm_otp_z2_bootctrl : > DCSM_OTP_Z2_BOOTCTRL PAGE = 0, type = DSECT dcsm_zsel_z2 : > DCSM_ZSEL_Z2_P0 PAGE = 0 } /* //=========================================================================== // End of file. //=========================================================================== */
您好、William、
由于您使用的是默认引导设置、仍然可能已经通过引导模式选择引脚选择了闪存引导:
您是否可以确保 GPIO72和 GPIO84配置为使用等待引导?
谢谢!
Luke
是的、我使用 LaunchPad 上的开关将 GPIO72和 GPIO 84配置为等待引导。
您能否尝试以下步骤、并告诉我是否可行:
执行以下步骤后是否仍无法连接?
谢谢!
Luke
好的、完成此操作后、我仍然无法连接到器件。 TRM 和安全工具之间的引导控制寄存器不匹配是否是问题的一部分? 我想知道我是否更改了引导配置/引脚。
您好、William、
TRM 中的地址不正确、将在下一个版本的 TRM 中更正。
您是否可以在配置等待引导引脚并重复上面分享的步骤后尝试对器件进行下电上电?
谢谢!
Luke
在尝试连接到目标之前、我会遇到同样的问题。
您好、William、
您是否有其他器件可供测试? 我不确定哪些因素可能会导致您无法根据 DCSM 设置进行连接。 您能否将 C2000Ware 更新到最新版本、使用 SysConfig 对 DCSM 设置进行编程、看看是否存在同样的问题?
让我跟随 JTAG 专家、看看他们是否有什么想法、可能会导致调试器无法连接。
谢谢!
Luke
是的、我要使用另一个器件进行测试、但在重复相同的步骤并再次将自己锁定到整个器件之前、我一直在寻找问题可能是什么原因。
您好、William、
请注意、我将尝试在我这边使用最新的 C2000Ware 和 CCS 版本重新创建这个问题、我将在1月6日回到办公室测试这个问题。
谢谢!
Luke
好的、谢谢! 我感谢您的帮助。
您好、William、
我想我已经在我这边重现了问题。 编程后、我可以重新连接但无法重新编程、我将调查此问题的根本原因、并在获得更新后告知您。
谢谢!
Luke
您好、William、
我已经在我这边测试了这个问题、并且成功地能够解锁已锁定的器件并对其重新编程。 有几个问题:
您是否将 Launchpad 上的开关更改为:
SW1:关闭
SW2:开启
SW3:开启
如果您仍然无法编程、您能否修改 GEL 文件的 ECSLUnlock 函数以使用自定义密码?
您是否能够确保在尝试编程之前未选中片上闪存工具中的"在闪存编程操作之前重置目标"选项?
谢谢!
Luke
我最初没有将开关设置为关闭、开启、开启、但在尝试重新编程时做了尝试。 我将使用 C2000Ware 版本:5.04.00.00重试。 & CCStudio 版本:20.0.1。
没有正确的禁止密码?
只要您没有将任何默认值为0的位设置为1、就没有禁止的密码。 无论如何、尝试将0翻转为1都将导致编程失败。
此外、一个全为0的密码将导致区域被永久锁定。
确保在调整开关后进行下电上电、以使引导模式生效。
当我取消选中"Reset target before flash programming"选项时、我可以对器件重新编程。 我在 GEL 文件中未看到任何 ECSL 解锁函数。 这是我应该添加的内容吗?
您好、William、
我认为您尝试执行的操作不需要这样做。 某些器件可能在 GEL 文件中没有 ECSL 解锁功能、此功能是可以的。 如果您有其他问题、请告诉我。
谢谢!
Luke
顺便说一下、"在闪存编程操作之前复位目标"会阻止您进行编程是因为 DCSM 在器件复位时始终重新启用、这将阻止闪存编程。
是的、一旦我看到它、它就会点击。 当我处理此操作时、我没有将复位视为默认操作、但现在它确实很有道理。 感谢您的帮助!
当然,很高兴你能够得到问题的解决:)