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.

CCS/TMS320F28051: Problem with program loading "Device is held in reset"

Part Number: TMS320F28051

Tool/software: Code Composer Studio

Hi,
I am launching a PCB designed by me with a TMS320F28051 microcontroller. I have a problem loading the program, even though JTAG verification is ok. I soldered two boards and both have the same error. Could this be a problem with schematic or PCB design? I checked it with example and empty projects. Before programming the MCU, I was doing a power cycle to make the Reset high. After starting the debugger, the reset goes into a low state internally and this remains on the reset pin.

I use XDS100v2 and XDS110 programmers both show the same error:

C28xx: Failed CPU Reset: (Error -1137 @ 0x6) Device is held in reset. Take the device out of reset, and retry the operation. (Emulation package 6.0.628.3) 
C28xx: Trouble Reading Register PC: (Error -1137 @ 0x0) Device is held in reset. Take the device out of reset, and retry the operation. (Emulation package 6.0.628.3) 
C28xx: Trouble Reading Register ST1: (Error -1137 @ 0x6) Device is held in reset. Take the device out of reset, and retry the operation. (Emulation package 6.0.628.3) 
C28xx: GEL: Error while executing OnReset(1): Target failed to read register ST1
	 at (ST1&~(0x0100)) [f28051.gel:383]
	 at C28x_Mode() [f28051.gel:32]
	 at OnReset(1)
C28xx: Trouble Writing Memory Block at 0x986 on Page 1 of Length 0x1: (Error -1137 @ 0x987) Device is held in reset. Take the device out of reset, and retry the operation. (Emulation package 6.0.628.3) 
C28xx: Error occurred during flash operation: Target failed to write 0x00000986@Data
C28xx: Trouble Writing Memory Block at 0x886 on Page 1 of Length 0x2: (Error -1137 @ 0x888) Device is held in reset. Take the device out of reset, and retry the operation. (Emulation package 6.0.628.3) 
C28xx: Error occurred during flash operation: Target failed to write 0x00000886@Data
C28xx: Trouble Writing Memory Block at 0x888 on Page 1 of Length 0x2: (Error -1137 @ 0x88A) Device is held in reset. Take the device out of reset, and retry the operation. (Emulation package 6.0.628.3) 
C28xx: Error occurred during flash operation: Target failed to write 0x00000888@Data
C28xx: Trouble Writing Memory Block at 0x88a on Page 1 of Length 0x2: (Error -1137 @ 0x88C) Device is held in reset. Take the device out of reset, and retry the operation. (Emulation package 6.0.628.3) 
C28xx: Error occurred during flash operation: Target failed to write 0x0000088A@Data

Regards,

Kamil

  • Hi Kamil,

    I don't see anything obviously wrong with the schematic. I'm assuming you verified power, reset, and clock look good? Do you measure a voltage on VDD?

    Kamil Mozdzynski said:
    ven though JTAG verification is ok

    Do you mean you tested the JTAG connection using CCS or something similar? See screenshot below, taken using CCS 9 during setup of the target configuration file.

  • Hi Gus,

    Thank you for reply.

    I checked the jtag with "Test Connection" and it's fine.
    I soldered more boards and the problem persists. Only two copies work.

    Is it possible that the security key is getting blocked in some way?

    The solution to the problem is important to me because I have to make 10 prototypes and only one is working so far.

    Regards,

    Kamil

  • Kamil,

    Can you monitor the 3V3 rail as you connect CCS to the target? If possible use an oscilloscope to trigger on XRSn going low and at the same time measure the 3V3 rail. I wonder if the DSP is getting current starved causing it to go into reset. How are you powering your board?

    Does the error happen as soon as you connect CCS or does it happen only after you try to execute some code? If it's happening when executing code, maybe you can try to step through the code and identify which instruction/function is causing the error.

    Additional debug tips here:

    https://www.ti.com/lit/an/spracf0/spracf0.pdf

  • Gus,

    MCUs are new with blank flash.

    These are the waveforms after turning on the power: yellow - 3v3 power supply red - XRS. The error is definitely in the PCB design because on the tqfp80 adapter it works fine. After turning on the power, you can see that RESET does not want to go high.Supply supervisor without MCU is working fine.

  • Hi Kamil,

    Kamil Mozdzynski said:
    The error is definitely in the PCB design because on the tqfp80 adapter it works fine.

    tqfp80 adapter? What works fine?

    Kamil Mozdzynski said:
    After turning on the power, you can see that RESET does not want to go high.

    I see a small spike there where the XRSn pin seems to go high for a brief period of time. Is that consistently there?

    Kamil Mozdzynski said:
    Supply supervisor without MCU is working fine.

    I don't understand what you mean here. Are you disconnecting the XRSn pin from the supervisor somehow?

  • Hi Gus,

    I found the solution. 

    I checked the voltages at the output of the internal voltage stabilizer (VDD lines). It turned out that there were ripples of voltage. I doubled the 2u2F capacitors and it works. The photo shows the cause of the problem.

  • Good to hear! I'm glad you were able to solve the problem.