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.
Hi expert,
My customer can not program with the error:
C28xx_CPU1: Error during Flash Programming. Address 0x00078028, Data 0x0000D008, FMSTAT 0x00001010
C28xx_CPU1: File Loader: Memory write failed: Unknown error
C28xx_CPU1: GEL: File: E:\28003X\H500_280039\HOPE510soft\Debug\Hope500.out: Load failed.
C28xx_CPU1: Error during Flash Programming. Address 0x00078004, Data 0x0000D000, FMSTAT 0x00000030
C28xx_CPU1: Please make sure the memory location you are programming have not already been programmed.
Here are their codes:
.sect "dcsm_otp_z1_linkpointer" ;//0x78000
.retain
.long 0x00003FFF ;(Programmed by TI)
.long 0x00003FFF ;(Programmed by TI)
.long 0x00003FFF ;(Programmed by TI)
.sect "dcsm_zsel_z1" ;//0X78020
.retain
.long PSWD0 ;Z1OTP_CSMPSWD0 (LSW of 128-bit password)
.long PSWD1 ;Z1OTP_CSMPSWD1
.long PSWD2 ;Z1OTP_CSMPSWD2
.long PSWD3 ;Z1OTP_CSMPSWD3 (MSW of 128-bit password)
.long 0x55555555 ;Z1OTP_GRABSECT1
.long 0x55555555 ;Z1OTP_GRABSECT2
.long 0x55555555 ;Z1OTP_GRABSECT3
.long 0xFFFFFFFF ;Z1OTP_GRABRAM1
.long 0xFFFFFFFF ;Reserved
.long 0xFFFFFFFF ;Reserved
.long 0xFFFFFFFF ;Z1OTP_EXEONLYSECT1
.long 0xFFFFFFFF ;Z1OTP_EXEONLYSECT2
.long 0xFFFFFFFF ;Z1OTP_EXEONLYRAM1
.long 0xFFFFFFFF ;Reserved
.long 0xFFFFFFFF ;Z1OTP_JTAGPSWDL0
.long 0x2bffffff ;Z1OTP_JTAGPSWDL1
The second question is when they add the following codes:
.sect "dcsm_otp_z1_jlm_enable" ;//0x78006
.retain
.long 0xFFFF000F ;(Programmed by TI)
It can program successfully. But after programing, it can only properly run once with XDS100V3. When they disconnect XDS100V3 and reconnect, it can not run.
The third question is whether following codes are right or not?
;//read password
MOVL XAR1,#0x78020
MOVL XAR0,*XAR1
MOVL XAR1,#0x78022
MOVL XAR0,*XAR1
MOVL XAR1,#0x78024
MOVL XAR0,*XAR1
MOVL XAR1,#0x78026
MOVL XAR0,*XAR1
;//unlock password
EALLOW
MOVL XAR0,#PSWD0
MOVL XAR1,#0x05F010
MOVL *XAR1,XAR0
MOVL XAR0,#PSWD1
MOVL XAR1,#0x05F012
MOVL *XAR1,XAR0
MOVL XAR0,#PSWD2
MOVL XAR1,#0x05F014
MOVL *XAR1,XAR0
MOVL XAR0,#PSWD3
MOVL XAR1,#0x05F016
MOVL *XAR1,XAR0
EDIS
Hi Angela,
To answer your first question, the flash is programmed in 64 bit blocks by the flash API. Since linkpointer3 and JLM_ENABLE are within the same 64 bit block, you must specify the value you are programming for both of these fields if you wish to program either field. If you do not specify JLM_ENABLE but have specified linkpointer3, the flash API will attempt to program JLM_ENABLE to all Fs, and you will get a flash programming error.
After disconnecting XDS100V3 and before attempting to reconnect, is the device powered off? Could you try configuring the device to be in wait boot mode instead of boot to flash? If the device boots from flash and the debugger attempts to connect while the program counter is accessing secure code, the JTAG access will be disconnected.
One way to test the code you have shared in question 3 is to perform an ECSL unlock in the On-Chip flash tool. This will allow you to set breakpoints before and after this code snippet. If you set a breakpoint after this code snippet and then attempt to read a secure resource in the memory browser such as address 0x78000, and the secure resource is visible in the memory browser, then this will prove that you successfully unlocked the zone.
Thank you,
Luke