cancel
Showing results for 
Search instead for 
Did you mean: 

My debugger is lost after SystemApp_Init() initialization...

JoBackMonkey
Associate III

I am a newbie in ST boards/products.

I am using the NUCLEO-WL55JC board. I found an example to try. However, I can not work with it.

After I open the example, I choose "Debug As: STM32 App". It is uploading the code, and the debugger connects... I can go step by step until DBG_Init() function in SystemApp_Init() function. Then, DBG_Init() tries to change my debugger pins behaviors. Then, "Target is not responding, retrying..." message appears in the console.

What should I do?

2 REPLIES 2
Imen.D
ST Employee

Hello @JoBackMonkey​ and welcome to the Community =)

Which example did you looked to? Is it within the STM32CubeWL firmware package ?

Maybe you should check the GPIO pins settings through which you run the debugger. For that your can refer to the GPIO chapter in the RM0453.

0693W00000BZow4QAD.jpg 

You can also follow this application note that can help you on your project and the debug setting :

  • AN5556 Getting started with STM32WL5x MCUs using IAR Embedded Workbench® and MDK-ARM

-When your question is answered, please close this topic by choosing Select as Best. This will help other users find that answer faster-

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
YBOUV.1
Senior

Hi,

The projects are delivered to reach low current consumption in stopmode2 by default.

Therefore the project switches off the SW pins (PA13 and PA14). This is why you loose debugger connection

This is done in Core/Src/debug.c file.

Note: to enable the debugger, and you can set the definition of DEBUGGER_ON to in Core/Inc/sys_conf.h

moreover, it is advised to set LOW_POWER_DISABLE to 1 to disable stop mode while debugging

/**
  * @brief Enable Debugger mode
  * @note  1:ON it enables the debbugger plus 4 dgb pins, 0:OFF the debugger is OFF (lower consumption)
  */
#define DEBUGGER_ON       0
 
/**
  * @brief Disable Low Power mode
  * @note  0: LowPowerMode enabled. MCU enters stop2 mode, 1: LowPowerMode disabled. MCU enters sleep mode only
  */
#define LOW_POWER_DISABLE 0

Best regards