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.

TMS320F280025C: XDS110 Writing failure

Part Number: TMS320F280025C
Other Parts Discussed in Thread: C2000WARE

Tool/software:

Hello.

Now, I am using the XDS110 and trying to write software to TMS320F280025C. But I can't do that. The configuration is shown in the TMS320F280025C data sheet P76 Figure 7-17 and is connected by a TI Legacy 14-pin (TI14). The XDS110 LED is glowing green and not red.

In addition, the error code at the time of writing is "Error-2131@0x0". We must hurry up the development of products with TMS320F280025C.

Thank you in advance.

----------------------------------Below is the full error----------------------------------

IcePick_C_0: Error connecting to the target: (Error -2131 @ 0x0) Unable to access device register. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 12.7.0.00105) 

 

  • Hi,

    Could you please open your target configuration file in Code Composer Studio, could you please test connection?  https://www.youtube.com/watch?v=o_2iMqZ1EbU

    If you follow these instructions for manually launching a debug session, are you able to connect to the device? https://software-dl.ti.com/ccs/esd/documents/users_guide/ccs_debug-main.html#launching-a-debug-session

    Best Regards,

    Ben Collier

  • Hi Benjamin,

    Thank you for your response.
    I checked carefully and found a flaw in the configuration.
    We are now able to write and check the operation.

    However, we are facing a new problem.
    In "CMD" in the syscfg file, I have specified that the program should be written to FLASH ROM.
    In the "Memory Allocation" that can be checked on CCS, it is confirmed that the text is in FLASH_BANK.
    However, when a power reset is performed after writing to the processor, the program behaves unexpectedly.
    When the same project is written to the development board (via USB), this does not happen, and a power reset confirms that the project behaves as written.

    Is this some kind of problem at the writing stage?

    Best Regards,

    Hiroki

  • Hi Hiroki,

    Where are you putting your text section? And where are you putting codestart? 

    Thanks,

    Ben Collier

  • Hi Benjamin,

    Currently, the TEXT section is located in FLASH_BANK0_SEC2 through FLASH_BANK0_SEC6.
    The start of the code is set to "Boot from Flash Sector 0".

    Thank you in advance.

    Hiroki

  • Ok, are you able to put your TEXT section starting in sector 0? 

  • We started the TEXT section with SECTOR 0. However, there was no change and the program did not start running after a power reset.
    Is it only the text section that has a problem?

    Thank you in advance for your help.

  • Hi Hiroki, 

    Are you facing the issue when you are loading the .out file using CCS and emulator as XDS100?

    Were you able to run any existing example present in the C2000Ware SDK (Eg. Led blinky example) in FLASH config, do a POR and check if it is running after a POR?

    Is it possible to share the lnker cmd file for further analysis?

    Thanks

    Aswin

  • I am sorry.
    I did not know how to attach the file, so I will note how directly.

    #define FLASH_lnk
    #ifdef FLASH_lnk

    MEMORY
    {

    RAMM0 : origin = 0x000128, length = 0x0002D8
    RAMM1 : origin = 0x000400, length = 0x0003F8
    RAMLS4 : origin = 0x00A000, length = 0x000800
    RAMLS5 : origin = 0x00A800, length = 0x000800
    RAMLS6 : origin = 0x00B000, length = 0x000800
    RAMLS7 : origin = 0x00B800, length = 0x000800
    RAMGS0 : origin = 0x00C000, length = 0x0007F8
    FLASH_BANK0_SEC0 : origin = 0x080000, length = 0x001000
    FLASH_BANK0_SEC1 : origin = 0x081000, length = 0x001000
    FLASH_BANK0_SEC2 : origin = 0x082000, length = 0x001000
    FLASH_BANK0_SEC3 : origin = 0x083000, length = 0x001000
    FLASH_BANK0_SEC4 : origin = 0x084000, length = 0x001000
    FLASH_BANK0_SEC5 : origin = 0x085000, length = 0x001000
    FLASH_BANK0_SEC6 : origin = 0x086000, length = 0x001000
    FLASH_BANK0_SEC7 : origin = 0x087000, length = 0x001000
    FLASH_BANK0_SEC8 : origin = 0x088000, length = 0x001000
    FLASH_BANK0_SEC9 : origin = 0x089000, length = 0x001000
    FLASH_BANK0_SEC10 : origin = 0x08A000, length = 0x001000
    FLASH_BANK0_SEC11 : origin = 0x08B000, length = 0x001000
    FLASH_BANK0_SEC12 : origin = 0x08C000, length = 0x001000
    FLASH_BANK0_SEC13 : origin = 0x08D000, length = 0x001000
    FLASH_BANK0_SEC14 : origin = 0x08E000, length = 0x001000
    FLASH_BANK0_SEC15 : origin = 0x08F000, length = 0x000FF0
    RESET : origin = 0x3FFFC0, length = 0x000002
    }


    SECTIONS
    {
    //
    // C28x Sections
    //
    .reset : > RESET, TYPE = DSECT /* not used, */
    codestart : > 0x080000
    .text : >> FLASH_BANK0_SEC0 | FLASH_BANK0_SEC2 | FLASH_BANK0_SEC3 | FLASH_BANK0_SEC4 | FLASH_BANK0_SEC5 | FLASH_BANK0_SEC6,
    ALIGN(8)
    .TI.ramfunc : LOAD > FLASH_BANK0_SEC1,
    RUN > RAMGS0,
    TABLE(copyTable_ramfunc),
    ALIGN(8)
    .binit : > FLASH_BANK0_SEC1,
    ALIGN(8)
    .ovly : > FLASH_BANK0_SEC1,
    ALIGN(8)
    .cinit : > FLASH_BANK0_SEC1,
    ALIGN(8)
    .stack : > RAMM1
    .init_array : > FLASH_BANK0_SEC1,
    ALIGN(8)
    .bss : > RAMLS5
    .const : > FLASH_BANK0_SEC4,
    ALIGN(8)
    .data : > RAMLS5
    .switch : > FLASH_BANK0_SEC1,
    ALIGN(8)
    .sysmem : > RAMLS5

    }

    #endif

    Thank you for your cooperation.

  • Hi Hiroki,

    There is a BOOT_RSVD location at address 0x00000002, length = 0x00000126.

    And FLASH_BANK0_SEC0 origin will be 0x080000 + 0x00000002, ie 0x080002 with length 0x000FFE.

    Please have a look at the existing flash linker cmd file (28002x_generic_flash_lnk.cmd) in the sdk at location C2000Ware\device_support\f28002x\common\cmd   for reference.

    Please try out with the cmd files in thesdk and let me know if it is resolving your issue.

    Thanks

    Aswin

  • Hi Aswin,

    I understand what you are saying. But now I am using the syscfg file to generate the lnkcmd file.
    In this case, when I try to use the default configuration of flash, the starting position of FLASH_BANK_SEC0 is 0x080000.
    Is it possible to change the configuration to the one you mentioned when using the syscfg file?
    Or would it be faster to adapt the sample file you gave us to our project?
    I would like to know how to do this.

    Thank you for your cooperation.

    Hiroki

  • Hi Hiroki, 

    Can you comment on the queries that i mentioned in the previous reply.

    • Are you facing the issue when you are loading the .out file using CCS and emulator as XDS100?
    • Were you able to run any existing example present in the C2000Ware SDK (Eg. Led blinky example) in FLASH config, do a POR and check if it is running after a POR?

    Thanks

    Aswin

  • Hi Aswin,

    I used the GPIO toggle project from the C2000ware sample.
    The “generic_flash_lnk” that existed as a default in CMD was set to Active and written, and the program was confirmed to work.
    However, when POR was performed, the program did not work.

    Thank you for your cooperation.

    Hiroki

  • Hi Hiroki,

    I was able to run the example in control card, but my GPIO that i chose to toggle was GPIO31 which can be viewed as an LED.

    Please check the boot mode setting in the device, the S4 switch should be both 1 1 for boot from flash.

    Thanks

    Aswin

  • Hi Aswin,

    I'm sorry.
    I didn't have enough information.
    I am not currently working on an evaluation board, but am trying to implement writing a project using JTAG to a processor mounted on one of my boards.
    So I am aware that there is no switch.

    Thank you for your cooperation.

    Hiroki

  • Hi Hiroki, 

    Please let me now you have followed the below steps to run the example in flash - 

    1) Set build config as set active -> CPU_FLASH

    2) Choose the generic flash in linker cmd and build and ran the example.

    3) You were able to see the flash locations getting updated.

    4) Did a POR and checked

    When the same project is written to the development board (via USB), this does not happen, and a power reset confirms that the project behaves as written.

    Let me loop a JTAG expert on this.

    Thanks

    Aswin

  • Hiroki,

    On this MCUs, there are default "boot pins". Based on whether these pins are high or low, the device will boot in a specific mode.

    It is possible to permanently program an MCU to always use a specific boot mode by writing to OTP.

    How are you configuring the boot mode for the MCU? You will need to make sure the MCU is using FLASH boot mode.

    Also, please check the following three items in your LINKER CMD Tool: 

    1. Make sure to select the correct CMD configuration as active

    2. Make sure to setup FLASH default

    3. Make sure that codestart location is correct. In some older versions, codestart would not be set correctly by the FLASH default button. 

    Best Regards,

    Ben Collier

  • Hello Benjamin,

    Sorry, I didn't understand what you mean by “writing to OTP” as I don't fully understand this MCU yet.
    However, I checked my MCU and found that GPIO24 and GPIO32 are BOOT PINS, so I set these two pins to high and my written project started after a power reset.
    Am I correct in understanding that if I pull up these two pins in advance, the project will be BOOTed with FLASH?

    Thank you for your cooperation.

    Hiroki

  • Hi,

    Am I correct in understanding that if I pull up these two pins in advance, the project will be BOOTed with FLASH?

    That's right. If you look through the boot section of the System Control section of the TRM, you will find an explanation for all of this.

    Writing to OTP means to write to out "One-time programmable" memory. It is used for permanent settings, since it can only be written once. 

    One of these permanent settings would be to have the MCU ignore the boot mode pins, and always boot in the same boot mode. You could read about this in the above mentioned boot mode. 

    Best Regards,

    Ben Collier 

  • Hi Benjamin,

    Yes, sir.
    Thank you very much.

    By the way, can you tell me how to write to the OTP?
    Currently, I am not having trouble with the number of pins, but I would like to know because it is possible that I may run out of pins in the future.

    I apologize for asking everything but thank you in advance.

    Hiroki

  • Hiroki,

    Here is a guide for programming OTP with our GUI tool: https://www.ti.com/lit/pdf/spracp8

    It is called DCSM tool since it's main focus is programming the security codes in our OTP, but you can also use it to program boot settings. Just search through the app note for "boot".

    Best Regards,

    Ben Collier