Using
CCS 3.3.82.13 (recently updated to SR12)
ID 5.98.0.393
BIOS 5.31.02
CGT V5.0.1
We are using an F28335 device
We compile two versions of our code. The first is labled "Debug "and the second is "Release". These are the same code but we compile in the passwords in the "Release" version. If we program the target with the"debug" version using SDFLASH we can start CCS & connect to the target (although sometimes it doesn't connect the first time but retry works ok) we can program the passwords and lock and unlock the device using tools\F28xx on-chip Flash programmer. If we power cycle the board and restart CCS the device is locked (as expected) and we can unlock with the tools\F28xx on-chip flash programmer(Note if we try to run before unlocking the code in the target is corrupter??).
Our problem is if we program the target with the "release" version (using SDFLASH we can never connect to the target.
Here is the assembly file that differentiates the two code versions
; The "csmpasswords" section contains the actual CSM passwords that will be
; linked and programmed into to the CSM password locations (PWL) in flash.
; These passwords must be known in order to unlock the CSM module.
; All 0xFFFF's (erased) is the default value for the password locations (PWL).
; It is recommended that all passwords be left as 0xFFFF during code
; development. Passwords of 0xFFFF do not activate code security and dummy
; reads of the CSM PWL registers is all that is required to unlock the CSM.
; When code development is complete, modify the passwords to activate the
; code security module.
.sect "csmpasswds"
.if _LOCKED == 1
.int 0x24D4 ;PWL0 (LSW of 128-bit password)
.int 0x43F1 ;PWL1
.int 0xF893 ;PWL2
.int 0xC264 ;PWL3
.int 0x6730 ;PWL4
.int 0x4D45 ;PWL5
.int 0x8AC2 ;PWL6
.int 0xEF54 ;PWL7 (MSW of 128-bit password)
.else
.int 0xFFFF ;PWL0 (LSW of 128-bit password)
.int 0xFFFF ;PWL1
.int 0xFFFF ;PWL2
.int 0xFFFF ;PWL3
.int 0xFFFF ;PWL4
.int 0xFFFF ;PWL5
.int 0xFFFF ;PWL6
.int 0xFFFF ;PWL7 (MSW of 128-bit password)
.endif
;----------------------------------------------------------------------
; For code security operation, all addresses between 0x33FF80 and
; 0X33fff5 cannot be used as program code or data. These locations
; must be programmed to 0x0000 when the code security password locations
; (PWL) are programmed. If security is not a concern, then these addresses
; can be used for code or data.
; The section "csm_rsvd" can be used to program these locations to 0x0000.
.sect "csm_rsvd"
.loop (33FFF5h - 33FF80h + 1)
.int 0x0000
.endloop
;//===========================================================================
;// End of file.
;//===========================================================================
Any suggestions?