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.

TMS320F28377S: Cannot write CSMPSWD to enable DCSM

Part Number: TMS320F28377S


Dear team,

I am trying to use the DCSM in F28377s based on blinky_with_DCSM project. And I followed the below steps:

1.  To modify location of linkpointer to 0x50

.sect "dcsm_otp_z1_linkpointer"
.long 0x1FFFFFF8 ;Z1-LINKPOINTER1
.long 0xFFFFFFFF ;Reserved
.long 0x1FFFFFF8 ;Z1-LINKPOINTER2
.long 0xFFFFFFFF ;Reserved
.long 0x1FFFFFF8 ;Z1-LINKPOINTER3
.long 0xFFFFFFFF ;Reserved

2. Allocate Flash B (code location)to Zone 1

.sect "dcsm_zsel_z1"

.long 0xFFFFFFFF ;Z1-EXEONLYRAM
.long 0xFFFFFFFF ;Z1-EXEONLYSECT
.long 0xFFFFFFFF ;Z1-GRABRAM
.long 0xFFFFFFFB ;Z1-GRABSECT

The value of DCSMZ1Regs is shown as below:

 I believe I have done the first 2 steps successfully.

However, when I try to write the CSMPSWDx with the following value:

.long 0x11223344 ;Z1-CSMPSWD0 (LSW of 128-bit password)
.long 0xFFFFFFFF ;Z1-CSMPSWD1
.long 0xFFFFFFFF ;Z1-CSMPSWD2
.long 0xFFFFFFFF ;Z1-CSMPSWD3 (MSW of 128-bit password)

The error occurs:

If I change value back to all F, the code can be load without error.

In the memory browser, I could observe the value in CSMPSWDx is "all F". So the value of 11223344 should be able to be written.

Does the ECC decides the value in Zonex OTP Flash must follow certain order?

Thanks for your help.

  • hi ,

    No it should not.

    I believe the below care about has been taken since i see the 0x78050 having the content programmed for GRABSECT.
    Yet,
    If the LINKPOINTER is changed, then the "dcsm_zsel_z1" section in the *_dcsm_lnk_cpu1.cmd command linker file must also change to an address decoded from the value specified in the Z1-LINKPOINTER location.

    In order to program the below memory sections, user should uncomment the .long words of each section and change the value to what is desired. Additionally, the corresponding section of *dcsm_lnk.cmd should no longer be labelled as a dummy section. Remove ", type = DSECT" in SECTIONS from the memory section that is being programmed.

    Please check if you are following these steps :
    processors.wiki.ti.com/.../C2000_Programming_OTP

    Regards.
  • Hi Wang,

    As mentioned by Meghana, Ist thing to check is the location of the Zone Select Block which you are planning to update with new password values. Please share snapshot of your linker cmd file.

    Regards,

    Vivek Singh
  • Of course I did the corresponding change as posted above. Please kindly review my post.

    If I didn't change the CMD file, the content in GRABSECT should be not be able to be written right?

    MEMORY
    {
    PAGE 0 : /* Program Memory */

    /* Z1 OTP. LinkPointers */
    DCSM_OTP_Z1_LINKPOINTER : origin = 0x78000, length = 0x00000C
    /* 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 = 0x78050, length = 0x000010

    dcsm_otp_z1_linkpointer : > DCSM_OTP_Z1_LINKPOINTER PAGE = 0
    dcsm_otp_z1_pswdlock : > DCSM_OTP_Z1_PSWDLOCK PAGE = 0, type = DSECT
    dcsm_otp_z1_crclock : > DCSM_OTP_Z1_CRCLOCK PAGE = 0, type = DSECT
    dcsm_otp_z1_bootctrl : > DCSM_OTP_Z1_BOOTCTRL PAGE = 0, type = DSECT
    dcsm_zsel_z1 : > DCSM_ZSEL_Z1_P0 PAGE = 0

  • hi ,

    The cmd file looks correct.
    From what i understand you are seeing this issue when you program the OTP in sets of 2 rather than both together in one OTP write ,

    first only GRABSECT
    .sect "dcsm_zsel_z1"

    .long 0xFFFFFFFF ;Z1-EXEONLYRAM
    .long 0xFFFFFFFF ;Z1-EXEONLYSECT
    .long 0xFFFFFFFF ;Z1-GRABRAM
    .long 0xFFFFFFFB ;Z1-GRABSECT
    .long 0xFFFFFFFF ;Z1-CSMPSWD0 (LSW of 128-bit password)
    .long 0xFFFFFFFF ;Z1-CSMPSWD1
    .long 0xFFFFFFFF ;Z1-CSMPSWD2
    .long 0xFFFFFFFF ;Z1-CSMPSWD3 (MSW of 128-bit password)

    then only password

    .long 0xFFFFFFFF ;Z1-EXEONLYRAM
    .long 0xFFFFFFFF ;Z1-EXEONLYSECT
    .long 0xFFFFFFFF ;Z1-GRABRAM
    .long 0xFFFFFFFB ;Z1-GRABSECT
    .long 0x11223344 ;Z1-CSMPSWD0 (LSW of 128-bit password)
    .long 0xFFFFFFFF ;Z1-CSMPSWD1
    .long 0xFFFFFFFF ;Z1-CSMPSWD2
    .long 0xFFFFFFFF ;Z1-CSMPSWD3 (MSW of 128-bit password)

    rather than both GRABSECT and Password together in one shot

    .long 0xFFFFFFFF ;Z1-EXEONLYRAM
    .long 0xFFFFFFFF ;Z1-EXEONLYSECT
    .long 0xFFFFFFFF ;Z1-GRABRAM
    .long 0xFFFFFFFB ;Z1-GRABSECT
    .long 0x11223344 ;Z1-CSMPSWD0 (LSW of 128-bit password)
    .long 0xFFFFFFFF ;Z1-CSMPSWD1
    .long 0xFFFFFFFF ;Z1-CSMPSWD2
    .long 0xFFFFFFFF ;Z1-CSMPSWD3 (MSW of 128-bit password)

    Generally we don't see a case where they are programmed separately but the complete section should be programmed in one shot .

    Regards.
  • Wang,

    Look like your issue is resolved. Can you share what was the issue and how did you solve it.
  • Hi Vivek,

    As you can see, I shared my .cmd and .asm files with Meghana, and we had some discussion off-line.
    Actually, we didn't see any conflict which may cause the problem when I try to flash one OTP section in two separately times. So I try to flash the OTP in one-shot, as Meghana suggested, no error occured.

    Thanks for the help from your team.