cancel
Showing results for 
Search instead for 
Did you mean: 

Debug issue

NASI
Senior

Hello,

I am using ST-LINK/V2 (STM32 Nucleo-64) to debug a custom board, which the custom board use STM32F105VC MCU.

The HW connections are as follow:

SWD, Custom Board

  1. 3.3V, 3.3V
  2. SWCLK, PA14
  3. GND, GND
  4. SWDIO, PA13
  5. NRST, PB4 (NJTRST)
  6. SWO, Not use

Maybe E1 (NRST) should be select in stedet for NJTRST ?

Is it correct to connect BOOT0 to GND through a 100k ohm?

Please, take a look at "Debug Configuration", "NRST", "JNTRST" pictures.

Error:

STM32_AppReset(), failure reset target

Someone can explain to me, what am I doing wrong?

Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions

A supervisor is fine to have it if you want, but it needs to be an open-drain output to allow other things to reset the chip when necessary, like the debugger and things internal to the chip. Your IC has push-pull output.

I'm assuming you fixed the error and connect the NRST pin on the SWD connector to the NRST pin on the chip. You'll also need to remove the IC1 and R3. Have you done all three of those things? NRST should also have a 0.1uF capacitor on it, but I don't think that will cause this issue.

If so, and it still doesn't work, not sure what it could be. Perhaps another schematic error or a soldering error.

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

8 REPLIES 8

BOOT0 pulled low is good.

NRST should be the processor NRESET, not that of the JTAG.​

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
NASI
Senior

Thank you Tesla DeLorean,

I am using NRST now and I get following error:

Waiting for debugger connection...

Debugger connected

Target is not responding, retrying...

Target is not responding, retrying...

   -------------------------------------------------------------------

            STM32CubeProgrammer v2.8.0          

   -------------------------------------------------------------------

ST-LINK SN : xxxxxxxxxxxxxxxxxx

ST-LINK FW : V2J38M27

Board    : NUCLEO-F302R8

Voltage   : 3.26V

Error: No STM32 target found!

Encountered Error when opening C:\ST\STM32CubeIDE_1.4.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_2.0.0.202105311346\tools\bin\STM32_Programmer_CLI.exe

Error in STM32CubeProgrammer

Debugger connection lost.

Shutting down...

Do you have any idea?

Thank you.

TDK
Guru

What is IC1?

NRST should have a 0.1uF cap and be pulled up (or left floating). It can be driven by an open drain output but shouldn't be driven high.

Also note that the STM32 has an internal BOR and POR circuitry and an external power supervisor is not necessary.

If you feel a post has answered your question, please click "Accept as Solution".
NASI
Senior

IC1 "STM1815T" is low power reset circuit.

Don't use a push pull output to drive NRST. This prevents other things from resetting the processor.

If you feel a post has answered your question, please click "Accept as Solution".
NASI
Senior

Thank you TDK,

Maybe it is good to have the IC, if my input voltage is below 3.3V then it resets the MCU. But now, I have connected NRST pin directly to the ST-link/V2 NRST pin, and the debugger issue related to reset fail has been not appeared any more. Instead I get following error:

Error: No STM32 target found!

Encountered Error when opening C:\ST\STM32CubeIDE_1.4.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_2.0.0.202105311346\tools\bin\STM32_Programmer_CLI.exe

Error in STM32CubeProgrammer

Debugger connection lost.

Shutting down...

Do you think, the above issue still is related to reset pin?

Thank you.

A supervisor is fine to have it if you want, but it needs to be an open-drain output to allow other things to reset the chip when necessary, like the debugger and things internal to the chip. Your IC has push-pull output.

I'm assuming you fixed the error and connect the NRST pin on the SWD connector to the NRST pin on the chip. You'll also need to remove the IC1 and R3. Have you done all three of those things? NRST should also have a 0.1uF capacitor on it, but I don't think that will cause this issue.

If so, and it still doesn't work, not sure what it could be. Perhaps another schematic error or a soldering error.

If you feel a post has answered your question, please click "Accept as Solution".
NASI
Senior

Thank you for your help TDK,

I am able to debug the MCU after I removed IC1 and R3.