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.

TMS320F280049: DSP not booting after lock flash with PWD

Part Number: TMS320F280049

I have locked the flash with CCS using this locking passwords. With Code Composer I can Lock & unlock the flash, preventing it from reading with CCS.

I can program and erase flash without problem when I unlock the flash using the password, but now if I erase all the flash, and program our application on flash, seems application is not starting,

After Power On, if I attach the debugger, open CCS and Unlock the flash with PWD, and the I Load Symbols, and try to run the application from CCS the application is executed without problem, and DSP is responding SPI commands.

Is it possible DSP is not booting because flash is locked and we are booting from flash?? 

Is there any else to configure to boot from flash when the flash is locked??

  • Hi,

    In order to eliminate if it is a Flash locking issue or the Flash boot issue, can you try not locking the flash, load the application code and do a power on without connecting to CCS to see if the application is running/executing or not?

    Best Regards,

    Nirav

  • The locking password has been stored in OTP refisters Z1OTP-CSMPSWD0/1/2/3 so after a power On the flash is locked again.

    Of course before store the Locking Password the flash has booting without any issue after a PowerOn..

    I have an other DSP without the PWD on OTP and it's booting from flash without problem.

  • Hi,

    Thanks for your reply. May I ask apart from CSM passwords are you programming any other security settings in the Zone select block? Wanted to make sure your GRABSECT and GRABRAM are also configured and they are not all 1's.

    Best Regards,

    Nirav

  • GRABSECT was programed to assign all sectors to zone1 (0b01 for each sector):

    B0-Z1OTP-GRBSECT: 0x55555555

    B0-Z1OTP-GRBSECT: 0x55555555

    GRABRM has not been configured, so is on it's initial value 0b11 for all RAM areas:

    Z1OTP-GRABRAM: 0x0000FFFF

    May be this is the issue? GRABRAM must be configure to assign all RAM areas to Zone1?

    Thank's for your support!

  • Yes GRABRAM must be configured as well to value other than 0b11.

    Best Regards,

    Nirav

  • Programing GRABRAM 0x00005555 solves my issue. Now It's booting from flash and flash is locked.

    Thank you very much!

  • New issue detected,

    Once I have programed GRABRAM with value 0x00005555, now dsp is booting (is responding SPI commands), but now CCS is not connecting with the device.

    This is the log when trying to connect:

    C28xx_CPU1: Trouble Halting Target CPU: (Error -1156 @ 0x0) Device may be operating in low-power mode. Do you want to bring it out of this mode? Choose 'Yes' to force the device to wake up and retry the operation. Choose 'No' to retry the operation without waking the device. (Emulation package 9.6.0.00172)
    C28xx_CPU1: Trouble Halting Target CPU: (Error -1135 @ 0x0) The debug probe reported an error. Confirm debug probe configuration and connections, reset the debug probe, and retry the operation. (Emulation package 9.6.0.00172)
    C28xx_CPU1: Error: (Error -1135 @ 0x0) The debug probe reported an error. Confirm debug probe configuration and connections, reset the debug probe, and retry the operation. (Emulation package 9.6.0.00172)
    C28xx_CPU1: Unable to determine target status after 20 attempts
    C28xx_CPU1: Failed to remove the debug state from the target before disconnecting. There may still be breakpoint op-codes embedded in program memory. It is recommended that you reset the emulator before you connect and reload your program before you continue debugging
    C28xx_CPU1: GEL: Error while executing OnTargetConnect(): Could not write 0x0005F412@Data: target is not connected
    at *((int*) 0x5F412)=0x0003 [f280049m.gel:83]
    at OnTargetConnect()
    C28xx_CPU1: Trouble Halting Target CPU: (Error -1156 @ 0x0) Device may be operating in low-power mode. Do you want to bring it out of this mode? Choose 'Yes' to force the device to wake up and retry the operation. Choose 'No' to retry the operation without waking the device. (Emulation package 9.6.0.00172)
    C28xx_CPU1: Trouble Halting Target CPU: (Error -1135 @ 0x0) The debug probe reported an error. Confirm debug probe configuration and connections, reset the debug probe, and retry the operation. (Emulation package 9.6.0.00172)
    C28xx_CPU1: Error: (Error -1135 @ 0x0) The debug probe reported an error. Confirm debug probe configuration and connections, reset the debug probe, and retry the operation. (Emulation package 9.6.0.00172)
    C28xx_CPU1: Unable to determine target status after 20 attempts
    C28xx_CPU1: Failed to remove the debug state from the target before disconnecting. There may still be breakpoint op-codes embedded in program memory. It is recommended that you reset the emulator before you connect and reload your program before you continue debugging
    C28xx_CPU1: Error occurred during flash operation: Could not read 0x05FB00@Program: target is not connected
    C28xx_CPU1: GEL: Error while executing OnTargetConnect(): Could not write 0x0005F412@Data: target is not connected
    at *((int*) 0x5F412)=0x0003 [f280049m.gel:83]
    at OnTargetConnect()
    C28xx_CPU1: Error occurred during flash operation: Could not write 0x05FB00@Program: target is not connected
    C28xx_CPU1: Error occurred during flash operation: Could not read 0x0005F800@Data: target is not connected
    C28xx_CPU1: Error occurred during flash operation: Could not write 0x0005F800@Data: target is not connected
    C28xx_CPU1: Error occurred during flash operation: Could not read 0x0700B0@Program: target is not connected
    C28xx_CPU1: Error occurred during flash operation: Could not write 0x05FB00@Program: target is not connected
    C28xx_CPU1: Error occurred during flash operation: Could not write 0x0005F800@Data: target is not connected
    C28xx_CPU1: Error initializing flash programming: Interface returned from dll, but flash is not available on this device.
    C28xx_CPU1: Trouble Halting Target CPU: (Error -1156 @ 0x0) Device may be operating in low-power mode. Do you want to bring it out of this mode? Choose 'Yes' to force the device to wake up and retry the operation. Choose 'No' to retry the operation without waking the device. (Emulation package 9.6.0.00172)
    C28xx_CPU1: Trouble Halting Target CPU: (Error -1135 @ 0x0) The debug probe reported an error. Confirm debug probe configuration and connections, reset the debug probe, and retry the operation. (Emulation package 9.6.0.00172)
    C28xx_CPU1: Error: (Error -1135 @ 0x0) The debug probe reported an error. Confirm debug probe configuration and connections, reset the debug probe, and retry the operation. (Emulation package 9.6.0.00172)
    C28xx_CPU1: Unable to determine target status after 20 attempts
    C28xx_CPU1: Failed to remove the debug state from the target before disconnecting. There may still be breakpoint op-codes embedded in program memory. It is recommended that you reset the emulator before you connect and reload your program before you continue debugging
    C28xx_CPU1: GEL: Error while executing OnTargetConnect(): Could not write 0x0005F412@Data: target is not connected
    at *((int*) 0x5F412)=0x0003 [f280049m.gel:83]
    at OnTargetConnect()
    C28xx_CPU1: Trouble Halting Target CPU: (Error -1156 @ 0x0) Device may be operating in low-power mode. Do you want to bring it out of this mode? Choose 'Yes' to force the device to wake up and retry the operation. Choose 'No' to retry the operation without waking the device. (Emulation package 9.6.0.00172)

    How Can I connect now with CCS? Is there any way modifying the f280049m.gel file to add the keys?

    I have tried to put the keys on OnTargetConnect() function on gel file but it's not working...

    *(int *)0x5F010 =0x00112233;

    *(int *)0x5F012 =0x44556677;

    *(int *)0x5F014 =0x8899AABB;

    *(int *)0x5F016 =0xCCDDEEFF;

  • Hi,

    Let me look into this in details, I will get back to you by tomorrow.

    Best Regards,

    Nirav

  • Hi,

    Apologize for delay in response.

    Once you secure RAM, the code cannot halt in that region and hence CCS gets disconnected. Please change your BOOT pin configuration to wait boot, then you should be able to connect.

    Best Regards,

    Nirav

  • Can you give more details regarding how to change the boot pìn configuration to select wait boot? I'm looking on CCS menus but I can not find an option...

    DSP has been previously configured the OTP to boot from flash, this is the actually OTP configuration:

    Z1OTP-GPREG1: 5AFFFFFF

    Z1OTP-GPREG2: 5AFFFF3F

         Z1OTP-GPREG3: 0FFFFF03

    Z1OTP-BOOTCTRL: FFFFFFFF

  • Hi Francesc,

    Did you go through the BOOTROM chapter in TRM? It provides all the details needed for configuring BOOT pins.

    How are the Boot pins GPIO24 and GPIO32 configured on board?

    Please configure them in the Wait BOOT mode and try.

    Best Regards,

    Nirav

  • Hi Nirav, thanks for your support, of course I read the BootRom chapter, but on our project we are using all pins, and pins GPIO24 and GPIO32 are used as PWM outputs so for us is not possible to use this pins because we can't change the hardware... 

    Our issue is only when we try to 'connect' CCS... so, as we can't modify Boor Rom pins,

    is it possible to use EMU_BOOTPIN_CONFIG to change the boot sequence to wait boot when we use CCS?

    How can we change EMU_BOOTPIN_CONFIG if we can not connect to DSP with CCS?

    Is it possible to modify the gel file to force wait boot?

  • Hi,

    is it possible to use EMU_BOOTPIN_CONFIG to change the boot sequence to wait boot when we use CCS?

    How can we change EMU_BOOTPIN_CONFIG if we can not connect to DSP with CCS?

    Anything related to emulation only take effect after you are connected to CCS so that will not work.

    We should not be using any critical function (like PWM) on BOOT pins. If default boot pins need to be used for critical function then user should choose different pins as BOOT pins but look like that is not done on this device. If you can not change the BOOTMODE pins then I am afraid, it may not be possible to connect to the device now.

    Regards,

    Vivek Singh