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.

TMS320F2802: C2000-GANG Error 23 and 66

Part Number: TMS320F2802
Other Parts Discussed in Thread: C2000-GANG,

Hi,

 

My customer is trying to program TMS320F28022 with C2000-GANG and facing Error 23 and Error 66.

I could not find any details about these errors in C2000-GANG User’s Guide.

What is the meaning of Error 23 and Error 66?

What should I check?

 

Thanks & Regards,

-Shibata

  • Shibata-san,

    I can ask Elprotronic to comment, would it be possible to post a screen image of the error; or is the above the only information?  I think there may be a error definition in the GANG GUI interface, but am not sure at the moment.

    Best,

    Matthew

  • Hi Matthew,

     

    Please find attached screenshot.

     

     

     

    Here is an additional information.

    Customer run self-test just after connecting C2000-GANG to host PC via USB, and then faced “Image Flash Access Error”.

    They run the self-test again after configuration is done, but the result was the same.

    Please find below screenshot.

     

     

     

     

    Best regards,

    -Shibata

  • Shibata-san,

    I think I see the issue.  The customer is trying to use F2802 device, however in the device selection they have picked "F28xx Piccolo" as the group and then "F28022" and the device.

    For F2802 device they should choose F28xx Fixed Point in the group drop down, and then they should see F2802 device that matches the device in use.  I've attached a screen shot of the C2000GANG GUI with the correct setting.

    Best,

    Matthew

  • Hi Matthew,

     

    Customer tried it, but “Error 32 used wrong MCU” occurred.

    Could you please double check?

     

     

     

     

    Thanks,

    -Shibata

     

  • Shibata-san,

    I noticed that in your post you mention the F28022 device, but the title of the thread is F2802.  Can you comment on the correct part number?  If it is helpful we can ask the customer to take a picture of the top of the device and attach the image here.

    I think the original error is still related to the correct/incorrect device being used.

    Best,
    Matthew

  • Hi Matthew,

    Sorry for the confusion.

    The correct part number is TMS320F28022PTQ.

    Please confirm.

    Thanks,

    -Shibata

  • Shibata-san,

    Is it possible for the customer to place the device in wait boot mode?  GPIO34 = 0V and GPIO37 = 3.3V.  This will make sure the device doesn't attempt to run code, and potentially lock the CSM before the GANG can communicate with it.

    Best,

    Matthew

  • Hi Matthew,

     

    I will check the boot mode.

    Btw, is it okay to revert the MCU type to Group: F28xx Piccolo, TMS320F28022?

     

    Thanks,

    -Shibata

  • Hi Matthew,

     

    Customer tried following steps:

     

    - Reverted the MCU type to F28xx Piccolo, TMS320F28022

    - Set boot mode to wait boot

     

    Even with these changes they got Error 66.

    I will share the screenshot later.

     

    Best regards,

    -Shibata

     

    P.S. Attached the screenshot.

     

  • Shibata-san,

    Yes, reverting back to Piccolo, F28022 was the right thing to do.

    Putting the device in Wait Boot mode has helped; this forces the C2000 to not execute code, most importantly code that is in secure memory.  On this device if a JTAG access is attempted while code is executing from a secure region, it will not allow the JTAG to connect.  I believe this was the first error the customer observed.

    Now that we are in wait boot, the device can connect properly but now is giving a failure that indicates that the CSM password is not erased(0xFFFF).  If this is a fresh/new device it should be in the erased state.  If customer has previously programmed the device, and wants to erase/reprogram they will need to provide the CSM password file they used into the C2000GANG GUI as part of the password file.  Once the device is unlocked they can program it as they want.

    Can you comment if customer had previously attempted to program either the password or programmed the flash and it did not complete?  

    Best,

    Matthew

  • Hi Matthew,

     

    Thanks for your comments.

     

    I will check with customer if they erased the flash or not.

    They are using socketed board when facing the error 66.

     

    Now customer is trying to use the other (non-socketed) board and encountering different error (Error 70).

    I will post a new thread for details.

     

    Thanks,

    -Shibata

     

  • Hi Matthew,

     

    Here is a summary of the experiments done by customer.

     

    Test 1

    Device used: New device (not erased)

    Result: Error 23

     

    Test 2

    Device used: The device once used in Test 1 (faced Error 23)

    Condition:

       - XRS pin is connected to GND

    Result: Error 66

    NOTE: The purpose of connecting XRS pin to GND is to narrow down the root cause of Error 23 in Test 1

     

    Test 3

    Device used: New device (not erased)

    Condition:

       - XRS pin is kept in H

       - boot mode: wait boot mode

    Result: Error 66

     

    Please find screenshot for CSM/DCSM Security Passwords below.

    They selected “none” here.

    In that case, Password is not configured, or default password is used?

    How to unlock?

     

     

     

      

    Best regards,

    -Shibata

  • Part Number: TMS320F28022

    Hi,

     

    This is an another issue related to below thread.

     

    https://e2e.ti.com/support/microcontrollers/c2000/f/171/t/954781

     

    Customer is trying to program TMS320F28022PTQ mounted on non-socketed board by C2000-GANG.

    In previous thread, customer used socketed board and faced Error 66.

    Now they are facing different issue as follows:

     

    1. For the 1st time, programing by C2000-GANG can be done without error.

    2. For the 2nd time (using the same board in step 1), Error 70 is reported.

    3. The issue is reproducible with a couple of boards.

    4. When trying to program the board Error 70 is reported in Step2 by different programer (YOKOGAWA), they can program it without error.

     

    So please let us know:

    - Why this happens in 2nd time with C2000-GANG only?

    - How to resolve this issue?

     

    Please find below screenshot captured in working case and failing case.

     

     

     

     

    Best regards,

    -Shibata

     

     

  • Taro,

    I think this is similar to the other post.  Can you ask the customer to confirm if they are programming the device password(CSM) at addresses 0x3F7FF8-0x3F7FFF?

    One way to verify this is to connect using CCS/JTAG and read this location in a memory window.  If it reads back 0xFFFF's then device is unlocked.  If it reads back 0x0000; then we need customer to enter their password in the locations in the other post(I'll post there as well). 

    If device is unlocked(and we still face this issue), can customer use CCS/JTAG to read the Device Cal at 0x3D7C80-0x3D7CC0 and post the contents back to this thread?

    My thought is that the device is locked, and the device calibration cannot be used since the OTP is also password protected.  Will see what the customer replies to the above though.  The other programmer may not be using this clock/dev cal.

    Best,
    Matthew  

  • Shibata-san,

    This is correct if the device is unlocked.  As I mentioned the error coming back from the C2000GANG seems to indicate that the device is password protected.  If that is the case it would need to be entered in the "defined password" field so that the GANG can unlock the device.

    Password is at 0x3F7FF8-0x3F7FFF, if customer has placed some non 0xFFFF data in these locations it will lock the device.

    One other point, do we know if this has been a process that has been working for some time and just now working incorrectly, or this is new development by the customer?

    Best,

    Matthew

  • Hi Matthew,

     

    Thanks for your advice.

    Customer is preparing debug setup.

    Once confirmed I will update you.

     

    Best regards,

    -Shibata

     

  • Hi Matthew,

     

    As I posed in another thread, customer is preparing the debug setup. Please wait.

     

    > One other point, do we know if this has been a process that has been working for some time and just now working incorrectly, or this is new development by the customer?

    The process has been working for a long time with the other programmer.

    Now they are trying to switch the programmer with C2000-GANG and encountered the issue.

     

    Best regards,

    -Shibata

  • Hi Matthew,

     

    Customer checked the address in 2 TMS320F28022 boards with CCS connection.

    Please find below results.

     

    Test 1 - Reading address 0x3F7FF8-0x3F7FFF

     

    Board #1

     

     

    Board #2

      

      

    Test 2 - Reading address 0x3D7C80-0x3D7C0

     

    Board #1

     

     Board #2

     

      

    Further updates:

    - Kept Pin19 (GPIO34/COMP2OUT) open

    - Tried to program the TMS320F28022PTQ board from C2000-GANG

    - Result: Both 1st was programming was successful, but the 2nd programming onward failed with ERROR70

     

    - Connected Pin19 (GPIO34/COMP2OUT) to GND

    - Tried to program the TMS320F28022PTQ board from C2000-GANG

    - Result: Both 1st and 2nd programming were successful

     

     

    Summary:

    - It looks like the ERROR70 issue has been resolved by connecting Pin19 (GPIO34/COMP2OUT) to GND, that means the device is in “wait boot” mode

    - I'm not sure why 1st programing was successful even though the board is NOT in "wait boot" mode?

    - In last month, customer tried “wait boot” mode with socketed board and faced ERROR66. It might be due to another HW issue.

     

    Please let me know your thought?

     

    Best regards,

    -Shibata

     

     

     

     

     

     

  • Shibata-san,

    Thanks for the update.  I have merged the two threads since they were on similar topics and we can use this one thread to keep up with both issues.

    For the error 70, and data I requested, customer has confirmed that the device is unlocked and all the device cal is correctly in the TI OTP.  I believe that the C2000GANG attempts to calibrate the internal oscillator before programming.  

    Since these locations are in OTP, they will be password/CSM protected if the device is locked.  As such it will appear to be all 0x0000s and will trim the internal oscillator incorrectly(hence the message out of the GANG on bad frequency match).

    Wait boot will ensure that no code is executed past a certain point in the BROM and that the CSM never gets triggered.  I suspect on an erased device the code will stall after it attempts to jump to flash, and CSM won't get locked either.  There could be some portion of the customer code that activates the CSM, even if there is no password programmed.  In this case a read of the password locations would unlock it, but I am not sure the C2000 GANG does this.

    For the other error, I think there is another scenario if customer code is executing from a secure region and CSM is activated.  On these devices, if JTAG attempts to connected(or is already connected) and the CSM is active it will not allow(or terminate) the JTAG connection entirely.  Wait Boot should fix that as well, however, so I'm at a loss to explain why this doesn't solve all issues.

    Has customer had a chance to look at those devices with a different error code?

    Best,
    Matthew

  • Hi Mathew,

     

    Sorry, I’m not fully understand your comment about below point.

    > - I'm not sure why 1st programing was successful even though the board is NOT in "wait boot" mode?

    I would like to clarify this.

    Customer can try additional experiments if required.

    So could you please advise what we should check next?

     

    Regarding the other errors with the socketed board, customer decided not to use the socketed board with C2000-GANG.

    So we don’t need to investigate further.

     

    One more comment.

    As I mentioned earlier, Error code list (all error codes and descriptions) is not present in C2000-GANG User’s Guide.

    Could you please discuss with Elprotronic if they can add the list to UG?

     

    Thanks,

    -Shibata

     

  • Shibata-san,

    When flash is erased, and the boot mode is set to boot from flash the device will still attempt to run from flash.  Since erased state is 0xFFFF, executing this code will generate an ITRAP1 (Illegal instruction), and jump to that ISR.  I assume at this point it will be the default ISR which is in bootROM so the device will be executing from non-secure memory.

    I will ask Elprotronic about possibility of adding the error codes to the docs.

    Best,

    Matthew

  • Hi Mathew,

     

    Thanks a lot for the clarification.

    Please close this thread.

     

    Best regards,

    -Shibata