cancel
Showing results for 
Search instead for 
Did you mean: 

Why is "Target is not responding" after main PLL is enabled?

LMeza.1813
Associate

I'm using an STM32F030R8T6 chip on a breadboard. Everything works fine with Atollic TrueSTUDIO, but I decided to download STM32CubeIDE and create a basic empty project.

In the Device Configuration Tool, all I did was enable "Debug Serial Wire" so that I can debug using ST-Link. No user code in the main loop yet. After hitting the debug icon, this is output and I get a break point on HAL_Init()

STMicroelectronics ST-LINK GDB server. Version 5.3.2

Copyright (c) 2019, STMicroelectronics. All rights reserved.

Starting server with the following options:

    Persistent Mode      : Disabled

    LogFile Name        : C:\Users\me\STM32CubeIDE\workspace_1.1.0\test\Debug\st-link_gdbserver_log.txt

    Logging Level       : 31

    Listen Port Number     : 61234

    Status Refresh Delay    : 15s

    Verbose Mode        : Enabled

    SWD Debug         : Enabled

Target connection mode: Attach

Hardware watchpoint supported by the target 

COM frequency = 4000 kHz

ST-LINK Firmware version : V2J34S7

Device ID: 0x440

PC: 0xfffffffe

ST-LINK device status: HALT_MODE

ST-LINK detects target voltage = 3.28 V

ST-LINK device status: HALT_MODE

ST-LINK device initialization OK

Waiting for debugger connection...

Waiting for connection on port 61234...

Accepted connection on port 61234...

Debugger connected

Enter STM32_AppReset() function 

NVIC_DFSR_REG = 0x0000000B

XPSR = 0xC1000003

 ------ Switching to STM32CubeProgrammer ----- 

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

            STM32CubeProgrammer v2.2.0          

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

Log output file:  C:\Users\me\AppData\Local\Temp\STM32CubeProgrammer_a01452.log

ST-Link Server is running on port : 7184

ST-LINK SN : 48FF72066578555560290667

ST-LINK FW : V2J34S7

Voltage   : 3.28V

SWD freq  : 4000 KHz

Connect mode: Under Reset

Reset mode : Hardware reset

Device ID  : 0x440

Device name : STM32F05x/F030x8

Flash size : 64 KBytes

Device type : MCU

Device CPU : Cortex-M0

Memory Programming ...

Opening and parsing file: ST-LINK_GDB_server_a01452.srec

 File     : ST-LINK_GDB_server_a01452.srec

 Size     : 3932 Bytes

 Address    : 0x08000000 

Erasing memory corresponding to segment 0:

Erasing internal memory sectors [0 3]

Download in Progress:

�������������������������������������������������� 0%

�������������������������������������������������� 100%

File download complete

Time elapsed during download operation: 00:00:00.515

Verifying ...

Read progress:

�������������������������������������������������� 50%

�������������������������� 52%������������� 78%����������� 100%

Download verified successfully 

 ------ Switching context ----- 

Target connection mode: Default

Hardware watchpoint supported by the target 

COM frequency = 4000 kHz

ST-LINK Firmware version : V2J34S7

Device ID: 0x440

PC: 0x8000388

ST-LINK detects target voltage = 3.28 V

ST-LINK device status: HALT_MODE

ST-LINK device initialization OK

handle_vCont_c, continue thread

TraceCaptureStart and SWV event set to APP_FALSE (0)

NVIC_DFSR_REG = 0x0000000B 

I then proceed to step into the SystemClock_Config() funtion until it eventually reaches the __HAL_RCC_PLL_ENABLE() funtion. After that, I lose the debugger and the console starts printing this:

handle_vCont_c, Failed step thread

ST-LINK device status: RUN_MODE

ST-LINK device status: Failed to get status, Target not responding, retrying...

Target is not responding, retrying...

..

..

ST-LINK device status: Failed to get status, Target not responding, retrying...

Target is not responding, retrying...

ST-LINK device status: TMO (Max Retries)

Debugger connection lost.

Shutting down...

Seems like the build is working, and the image is being loaded to the target, but something goes foul and causes the target to stop responding. Any suggestions would be greatly appreciated. I can provide any further information you need, or I can perform other steps if you offer them.

Thanks in advance,

Leo

1 ACCEPTED SOLUTION

Accepted Solutions
Clive1 (HNL)
Senior II

Issue with Power or VDDA

Incorrect PLL values, or Flash wait states.

View solution in original post

2 REPLIES 2
Clive1 (HNL)
Senior II

Issue with Power or VDDA

Incorrect PLL values, or Flash wait states.

I didn't have VDDA/VSSA connected. After supplying VDDA/VSSA, everything is now working as expected. I suppose this wasn't a problem when I was using Atollic TrueSTUDIO it wasn't trying to enable PLL with initialization code.