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.

ERROR 66: CSM unlock error using C2000-GANG programmer

Other Parts Discussed in Thread: C2000-GANG, TMS320F28069, UNIFLASH, TMS320F28034

Good afternoon,

I'm using the C2000-GANG programmer to program a TMS320F28069 Piccolo processor in circuit. We created a custom interface between the programmer and our target board, so that the hardware has its own 3.3V regulator to power our board from the upstream voltage. Therefore there is no load on the programmer when powering the board. The power output V_EXT from the programmer enables our own regulator. We have everything set up to program our target board, and are able to do so successfully when enabling the V_EXT output using the GUI tool (“Target Supplied by Programmer Voltage 3.3V”). If we do not power on our system in advance and select the “GO” button, the programmer powers up our board (it takes about 5mS from the time the programmer output signal till our board has full power), then begins communication (communications begins 60mS from the time our board has full power), then fails programming with the error “ERROR 66: CSM unlock error”. We tried to set up the programmer to program our board, stand-alone and got the same results. It seems as though the time to power up our system before communications begins would be sufficient for programming to begin. The thing that is curious is the error. We are not securing our device. We’re wondering if the programmer operates differently in software given the sequence of programming with power already applied.

Please let us know if you have any suggestions!

Best regards,

Chris

  • I have more information on the programming issue we are having with the C2000-Gang Programmer. We are using the C2000-Gang programmer for programming up to 4 devices. If we put one device in slot 1, select a file and select ‘GO’. The programmer fails the procedure with an ERROR 66 every time. If we use the GUI and select VCC On/Off to turn power on for that single target, then select the ‘GO’ button, it programs ok. If we start from scratch and apply power manually to the target and try to program it works OK. But, if we simply load the target slot select the file and select ‘GO’ it fails every time. Now, if we leave the single device in slot one and enable another slot (an empty slot) and select ‘GO’, the device in slot one programs ok and the ‘Dummy’ slot fails. I verified that the timing between the application of power to the target and the beginning of communication does not change if we have one slot selected or two.

    Any suggestions?

    Thanks,
    Chris
  • Are these brand new chips that have never been programmed before?
    Are the boot mode pins being pulled up/down on the gang programmer VCC/GND? Or, on your custom board?
    Be sure to configure the boot pins correctly (and to the right VCC/GND) to get it into wait mode.
  • These are not usually brand new chips. The boot pins are not connected to anything in the system, so they come up with the internal pull up on which, according to the documentation I read, effectively boots to FLASH. Remember that if we select a "dummy" or unloaded target on the programmer as well as a loaded target, the loaded target programs ok. It seems unlikely that this is related to the target system.
  • Hi Fulano,

    Jim is working with me on this project and up to speed with our current setup and problems. Following up on Jim's response, will the internal pull up on the boot pins set the target into wait mode?

    Thanks,
    Chris
  • Good morning TI community,

    Any suggestions about my earlier posts? To summarize, we can program our target board when we enable V_EXT in advance of programming, but it fails every time with 'ERROR 66: CSM unlock error' when trying to program without this option (or in standalone mode).

    Is there a way to enable V_EXT in advance in standalone mode?

    The other strange phenomenon is that by enabling a second target to be programmed (i.e. board connected to slot 1, but both slots 1 and 2 are set to be programmed), then we're able to successfully program our target board on slot 1.

    Please let us know if you have any ideas!

    Thanks,

    Chris

  • Chris,

    I asked the C2000-GANG experts to look in to this.

    Thanks and regards,
    Vamsi
  • Chris,

    Looks like you are already working with Elprotronic folks on this. They mentioned that they are waiting for your reply. Please communicate with them.

    Thanks and regards,
    Vamsi
  • Chris,

    Spoke to Elprotronic offline on the status.  

    Did you make sure to configure the boot mode pins to wait mode (GPIO37 should be high and GPIO34 should be low)?  If not, the internal pull ups on these pins will configure the boot mode to GetMode which defaults to boot to flash mode unless the OTP_BMODE field is programmed for a different boot mode.

    Thanks and regards,

    Vamsi

  • I'm not sure what that will buy us. We are in a JTAG programmer mode. I don't think security is set in our parts. The data sheet for the part says:

    "When initially debugging a device with the password locations in flash programmed (that is, secured), the
    CPU will start running and may execute an instruction that performs an access to a protected ECSL area.
    If this happens, the ECSL will trip and cause the emulator connection to be cut."

    "The solution is to use the Wait boot option. This will sit in a loop around a software breakpoint to allow an
    emulator to be connected without tripping security. Piccolo devices do not support a hardware wait-inreset
    mode."

    I'm not sure what the last sentence means exactly, but we are using a Piccolo device and we are not secured.
  • You are not secured, so the password in location 0x3F7FF8-0x3F7FFF are all 0xFFFF? Can you verify this is actually the case? Maybe post parts of your .cmd file and passwords.asm

    Maybe try doing a full FLASH erase on the device (with something other than C2000-GANG, maybe UniFlash) to be 100% sure the entire FLASH is all 0xFFFF.

    Even if you have no passwords (all 0xFFFF), CSM is always locked on power up (even if unsecured). In the Boot ROM code, a dummy read of the passwords is performed and if they are all 0xFFFF, then it will unlock.

    Also make sure that csm_rsvd section 0x3F7FF0-0x3F7FF5 are all programmed to 0x0000.

    It seems the C2000-GANG is calling Unlock_CSM() in the gel file and something is not allowing it to unlock.

  • James,

    Does your application (programmed in to Flash) put the device in to a low power mode?

    Can you try replacing the application with a dummy loop and see if that lets you reprogram?

    Thanks and regards,

    Vamsi

  • Below is the password information:

    If I do a full erase, then the parts program fine. The problem is that I have to set the VCC settle timeout to 100 to be able to erase the target. Once I erase the target, then I can set the VCC settle time back to 0 then it programs fine. I'm suspicious that there is something in the programmer's software state machine that is causing this delay to be required when a device is not erased.

  • @Vamsi, doesn't a password of all 0s permanently lock the device?
  • If, so, then how come I can erase and program just fine as long as I set the VCC settle time to 100?
  • James,

    All 0s will permanently secure the device.  I don't think GANG programmer will read the "none" field to program.  It uses that field to unlock.  "None" means that you are not programming any password.  So, it should be all 1s in your device - you can connect to debugger and check.  In the latest devices, I noticed that GANG will keep the none value as all 1s.  Did you modify the none field to all 0s for your F28069 configuration or is it the default value?  

    Reason, I asked you try the wait mode is to rule out the case where your application might be causing an issue by keeping the device in low power mode or by programming a password (which you might not have noticed).

    Thanks and regards,

    Vamsi

     

     

  • Hi Vamsi,

    This is the default setting for the F28069 configuration.

    Thanks,

    Chris

  • I scoped out the JTAG signals. The TRST signal is asserted at the beginning of the programmer's operations. That should overcome any low power mode, boot mode, or software issues. If the device were truly secured, the JTAG may not work, but we know that the device is not secured because I can program it at will with the VCC Settling time set to 100. To me, that points to something in the programmers sequence of events in programming and/or erasing as the instigator of this issue.
  • James,

    The default (empty) CSM password for unlocking MCU is 0xFFFF in software. The value displayed on the screen is wrong. That would be corrected, however in the real firmware the correct empty 0xFFFF value is used.
    The unlocking sequence is easy - unlocking CSM at the beginning - after powerup and programmable Vcc Settle Time. It is the first step for getting access to MCU. It would be good if I get your code, download to blank MCU and check why you need additional delay for unlocking the MCU. Is it possible? 

    Best regards,
    Gregory

  • I have a similar problem,Please let us know if you have any suggestions!

    SCM model is TMS320F28034.

    There is no problem in the last picture?I see the information inside the password is written in the 3F7FF8-3F7FFF these flash position.

  • Hello,

    The thread you replied to has been inactive since Aug 2016. If you have an issue which needs to be addressed, please create a new forum post for the best chances of support. If there is pertinent information in this post you can add a link pointing back to here in your new thread.

    Best Regards,
    Adam Dunhoft
  • Hi,

    Elprotronic (GANG programmer provider) tried and could not succeed to reproduce the issue that you mentioned. They are still looking in to it. They will update this thread after some more experiments.

    Thanks and regards,
    Vamsi
  • We tested with the targets and we do not have the problem with the CSM password. Just in case please download the latest software version 1.0.7.0 from TI website www.ti.com/c2000-gang  and try it.

    I noticed that in your configuration the target is supplied from the C2000-GANG. Programmer can supply target with the max current not higher than 150mA. Make sure that your target is taking less current, or use external power supply, otherwise the Vcc can drop-off and communication can have a problem. Let me know if that helps.

    Best regards,

    Gregory

  • Thanks for your answer,I have solved this problem.Because I didn't give an external power supply to the MCU,Just supply a power adapter to C2000-GANG.In other words, the use of C2000-GANG requires two power supply.(I do not know if this operation is not right,But only in this way can be achieved using C2000-GANG programming.)
    I found that the use of JTAG online simulation must also provide additional power to the target MCU. This is the same as C2000-GANG, Do I have to use it in this way(two power)?
    So I have a question that why not use the C2000-GANG or JTAG to target MCU power supply,Isn't it more convenient?
    If you have any suggestions, please let me know. Thank you very much!!!
  • Thanks for your answer,I have solved this problem.Because I didn't give an external power supply to the MCU,Just supply a power adapter to C2000-GANG.In other words, the use of C2000-GANG requires two power supply.(I do not know if this operation is not right,But only in this way can be achieved using C2000-GANG programming.)
    I found that the use of JTAG online simulation must also provide additional power to the target MCU. This is the same as C2000-GANG, Do I have to use it in this way(two power)?
    So I have a question that why not use the C2000-GANG or JTAG to target MCU power supply,Isn't it more convenient?
    If you have any suggestions, please let me know. Thank you very much!!!!!!
  • Thanks for your answer,I have solved this problem.Because I didn't give an external power supply to the MCU,Just supply a power adapter to C2000-GANG.In other words, the use of C2000-GANG requires two power supply.(I do not know if this operation is not right,But only in this way can be achieved using C2000-GANG programming.)
    I found that the use of JTAG online simulation must also provide additional power to the target MCU. This is the same as C2000-GANG, Do I have to use it in this way(two power)?
    So I have a question that why not use the C2000-GANG or JTAG to target MCU power supply,Isn't it more convenient?
    If you have any suggestions, please let me know. Thank you very much!!
  • Hi,

    I see that the password in the code file is empty. I assume that also the password saved in the MCU is empty, otherwise you will not be able to unlock programmed MCU. Other issue - the target is powered from Gang Programmer. The max current supplied from programmer is limited to 150 mA. Make sure that the target device is not taking more current, otherwise the MCU can be reset unintentionally when the Vcc drop off. Can you check it with the external power supply if target takes more than 150 mA?

    Best regards,
    Gregory Czajkowski
  • Hi,

    Did you check if the target takes more than the 150mA limit that GANG can supply?

    Thanks and regards,
    Vamsi
  • Hi,

    I am closing this thread since I did not hear back from you.

    Thanks and regards,
    Vamsi