2026-02-17 5:12 AM - last edited on 2026-02-17 7:12 AM by TDK
I am using STM32Cube IDE version 1.4.1 where I'm debugging 1st the CM4 Core which is getting debugged and then I tried to debug CM0+ core which is not going into debug mode and showing the error :
Target unknown error 32
Error in initializing ST-LINK device.
Reason: Unknown. Please check power and cabling to target.
I tried this too
Launching the configurations
Launch the Cortex®‑M4 configuration to download both the Cortex®‑M0+ and Cortex®‑M4 images.
Resume the Cortex®‑M4 core until the C2BOOT bit is set in power control register 4 (PWR_CR4) to enable
the Cortex®‑M0+.
Launch the Cortex®‑M0+ configuration using the arrow next to the debug icon. The Cortex®‑M0+ is in the
running mode and the user can halt it after the debugger is started.
The core CM4 got into debugged mode but then the Core CM0+ is showing :
Debugger Connected
Waiting for debugger connection...
Debugger Connected
Waiting for debugger connection....
Debugger Connected
Waiting for debugger connection...
Why is it so?
Where is the problem.
2026-02-17 6:05 AM - edited 2026-02-17 6:07 AM
Hello @Somya
Try to use a new version of STM32CubeIDE, AFAIK the STM32WL series is supported since version 1.5.0 of STM32CubeIDE
KR, Souhaib
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2026-02-18 2:16 AM - edited 2026-02-18 2:22 AM
TRIED VERSION 1.19.0 AND 1.14.1
BUT STILL IT DID NOT WORK.
IS THERE ANY LINE WHICH NEEDS TO BE COMMENTED BELOW :
HAL_DBGMCU_DisableDBGSleepMode();
HAL_DBGMCU_DisableDBGStopMode();
HAL_DBGMCU_DisableDBGStandbyMode();
OR
AS THE CM4 GOES INTO DEBUG MODE. WHILE DEBUGGING CM4 , IS THERE ANY LINE WHICH NEEDS TO BE COMMENTED OR BREAKPOINTS NEEDS TO BE SET AS AFTER GOING INTO THIS FUNCRION
MBMUXIF_Init()
WHICH STATES :
static void MBMUXIF_Init(void)
{
/* USER CODE BEGIN MBMUXIF_Init_1 */
/* USER CODE END MBMUXIF_Init_1 */
FEAT_INFO_List_t *p_cm0plus_supported_features_list;
int8_t init_status;
APP_LOG(TS_ON, VLEVEL_H, "\r\nCM4: System Initialization started \r\n");
init_status = MBMUXIF_SystemInit();
if (init_status < 0)
{
Error_Handler();
}
/* start CM0PLUS */
/* Note: when debugging in order to connect with the debugger CPU2 shall be start using workspace CM4 starts CM0PLUS */
/* On the other hand is up to the developer make sure the CM0PLUS debugger is run after CM4 debugger */
HAL_PWREx_ReleaseCore(PWR_CORE_CPU2);
/* CM4 has started and it has reset the mailbox and initialized the MbMux; */
/* once CM0PLUS is also initialized it send a SYS notification */
MBMUXIF_SetCpusSynchroFlag(CPUS_BOOT_SYNC_ALLOW_CPU2_TO_START);
APP_LOG(TS_ON, VLEVEL_H, "CM4: System Initialization done: Wait for CM0PLUS \r\n");
MBMUXIF_WaitCm0MbmuxIsInitialized();
APP_LOG(TS_ON, VLEVEL_H, "CM0PLUS: System Initialization started \r\n");
p_cm0plus_supported_features_list = MBMUXIF_SystemSendCm0plusInfoListReq();
MBMUX_SetCm0plusFeatureListPtr(p_cm0plus_supported_features_list);
APP_LOG(TS_ON, VLEVEL_H, "System Initialization CM4-CM0PLUS completed \r\n");
init_status = MBMUXIF_SystemPrio_Add(FEAT_INFO_SYSTEM_NOTIF_PRIO_A_ID);
if (init_status < 0)
{
Error_Handler();
}
MBMUXIF_SetCpusSynchroFlag(CPUS_BOOT_SYNC_RTC_REGISTERED);
APP_LOG(TS_ON, VLEVEL_H, "System_Priority_A Registration for RTC Alarm handling completed \r\n");
init_status = MBMUXIF_TraceInit();
if (init_status < 0)
{
Error_Handler();
}
APP_LOG(TS_ON, VLEVEL_H, "Trace registration CM4-CM0PLUS completed \r\n");
init_status = MBMUXIF_LoraInit();
if (init_status < 0)
{
Error_Handler();
}
APP_LOG(TS_ON, VLEVEL_H, "Lora registration CM4-CM0PLUS completed \r\n");
/* USER CODE BEGIN MBMUXIF_Init_Last */
/* USER CODE END MBMUXIF_Init_Last */
}
IS THERE ANY LINE WHICH NEEDS TO BE COMMENTED HERE.
AS THE CORE DOES NOT GETS DEBUGGED AFTER THIS.
I HAVE SET BREAKPOINT HERE : p_cm0plus_supported_features_list = MBMUXIF_SystemSendCm0plusInfoListReq();
WHERE IS THE ISSUE?
2026-02-18 2:20 AM
TRIED STM32CUBEIDE VERSION 1.14.1 AND 1.19.0 TOO.
2026-02-24 5:34 AM
Hello @Somya
Could you try with these steps :
- Check or change the USB cable
- Try "connect under reset" in Debug Configuration/Debugger
Otherwise please attach your Debug configuration in order to investigate the issue.
BR, Souhaib
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.