2025-08-29 1:31 PM
Dear forum,
I have a simple application using an STM32L4 and the analog COMP2 interrupt to blink a PWM LED. The device also uses USB virtual COM port capabilities for a simple terminal with a few commands. Everything works as expected.
Now, I want the device to enter a low power consumption state after some idle time. The device must wake up through the same COMP2 interrupt I'm using to blink the LED. A full system reset is acceptable too.
I'm successfully putting the device into stop mode, and it seems the wake-up interrupt is working as well. However, the problem is that after waking up, the device encounters a hard fault. I've tried everything, but the stack appears to be corrupted. Even NVIC_SystemReset() is not working.
I'm pasting the important parts of my code here. Any help or ideas would be welcome.
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : main.c
* @brief : Main program body
******************************************************************************
* @attention
*
* Copyright (c) 2025 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/
#include "main.h"
#include "usb_device.h"
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
#include <stdbool.h>
#include <stdint.h>
#include "console.h"
#include "stm32l4xx_hal_gpio.h"
/* USER CODE END Includes */
/* Private typedef -----------------------------------------------------------*/
/* USER CODE BEGIN PTD */
#define BASIC 110 //ms
#define PWM_MIN_VAL 30
#define PWM_MAX_VAL 300
#define SHOOT_TIME 50 //ms
#define AWAKE_TIME 10 //seconds
#define ADC_DMA_BUFFER_SIZE ((uint32_t) 32) /* Size of array aADCxConvertedData[] *
/* USER CODE END PTD */
/* Private define ------------------------------------------------------------*/
/* USER CODE BEGIN PD */
volatile bool shoot;
uint32_t base_time = 0;
uint8_t sleep_timer = AWAKE_TIME;
volatile uint16_t pwm_value;
volatile uint16_t shoot_time = SHOOT_TIME;
volatile bool in_stop_mode = false;
static uint32_t sleep_counter = 0;
/* USER CODE END PD */
/* Private macro -------------------------------------------------------------*/
/* USER CODE BEGIN PM */
/* USER CODE END PM */
/* Private variables ---------------------------------------------------------*/
COMP_HandleTypeDef hcomp2;
DAC_HandleTypeDef hdac1;
TIM_HandleTypeDef htim1;
/* USER CODE BEGIN PV */
/* USER CODE END PV */
/* Private function prototypes -----------------------------------------------*/
void SystemClock_Config(void);
static void MX_GPIO_Init(void);
static void MX_COMP2_Init(void);
static void MX_TIM1_Init(void);
static void MX_DAC1_Init(void);
/* USER CODE BEGIN PFP */
/* USER CODE END PFP */
/* Private user code ---------------------------------------------------------*/
/* USER CODE BEGIN 0 */
void HAL_COMP_TriggerCallback(COMP_HandleTypeDef *hcomp)
{
if (!shoot)
shoot = true;
}
void Enter_Stop_Mode(void)
{
// __HAL_PWR_CLEAR_FLAG(PWR_FLAG_WUF2);
// __HAL_COMP_COMP2_EXTI_CLEAR_FLAG();
HAL_SuspendTick();
HAL_PWREx_EnterSTOP2Mode(PWR_SLEEPENTRY_WFI);
//SystemClock_Config();
HAL_ResumeTick();
HAL_Delay(1000); // Permitir que el sistema se estabilice
NVIC_SystemReset();
}
/* USER CODE END 0 */
/**
* @brief The application entry point.
* @retval int
*/
int main(void)
{
/* USER CODE BEGIN 1 */
/* USER CODE END 1 */
/* MCU Configuration--------------------------------------------------------*/
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
/* USER CODE BEGIN Init */
/* USER CODE END Init */
/* Configure the system clock */
SystemClock_Config();
/* USER CODE BEGIN SysInit */
/* USER CODE END SysInit */
/* Initialize all configured peripherals */
MX_GPIO_Init();
MX_COMP2_Init();
MX_TIM1_Init();
MX_DAC1_Init();
MX_USB_DEVICE_Init();
/* USER CODE BEGIN 2 */
HAL_DAC_SetValue(&hdac1, DAC_CHANNEL_2, DAC_ALIGN_12B_R, 1500);
HAL_DAC_Start(&hdac1, DAC_CHANNEL_2);
HAL_DAC_SetValue(&hdac1, DAC_CHANNEL_1, DAC_ALIGN_12B_R, 100);
HAL_DAC_Start(&hdac1, DAC_CHANNEL_1);
//HAL_PWR_EnableWakeUpPin(PWR_WAKEUP_PIN2);
__HAL_PWR_CLEAR_FLAG(PWR_FLAG_WU);
HAL_COMP_Start_IT(&hcomp2);
HAL_TIM_PWM_Start(&htim1, TIM_CHANNEL_1);
__HAL_TIM_SET_COMPARE(&htim1,TIM_CHANNEL_1, PWM_MIN_VAL); //power off laser
/* USER CODE END 2 */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
if (USB_ShouldInitConsole())
{
HAL_Delay(100);
Console_Init();
}
Console_ProcessCommand();
#ifdef BASIC
if (shoot)
{
__HAL_TIM_SET_COMPARE(&htim1,TIM_CHANNEL_1, PWM_MAX_VAL); //power off laser
HAL_Delay(BASIC);
__HAL_TIM_SET_COMPARE(&htim1,TIM_CHANNEL_1, PWM_MIN_VAL); //power off laser
sleep_timer = AWAKE_TIME;
shoot=false;
HAL_Delay(BASIC/2);
HAL_COMP_Start_IT(&hcomp2);
}
#endif
sleep_counter++;
if (sleep_counter >= 200000)
{
sleep_counter = 0; // Reset contador
if (sleep_timer > 0)
{
sleep_timer--;
}
}
if (sleep_timer == 0)
{
__HAL_TIM_SET_COMPARE(&htim1, TIM_CHANNEL_1, 0); // Apagar laser
// Entrar en STOP Mode - al despertar se reiniciará automáticamente
Enter_Stop_Mode();
// Esta línea nunca se ejecutará debido al reset
sleep_timer = AWAKE_TIME;
}
base_time++;
}
/* USER CODE END 3 */
}
/**
* @brief System Clock Configuration
* @retval None
*/
void SystemClock_Config(void)
{
RCC_OscInitTypeDef RCC_OscInitStruct = {0};
RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
/** Configure the main internal regulator output voltage
*/
if (HAL_PWREx_ControlVoltageScaling(PWR_REGULATOR_VOLTAGE_SCALE1) != HAL_OK)
{
Error_Handler();
}
/** Initializes the RCC Oscillators according to the specified parameters
* in the RCC_OscInitTypeDef structure.
*/
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI|RCC_OSCILLATORTYPE_MSI;
RCC_OscInitStruct.HSIState = RCC_HSI_ON;
RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
RCC_OscInitStruct.MSIState = RCC_MSI_ON;
RCC_OscInitStruct.MSICalibrationValue = 0;
RCC_OscInitStruct.MSIClockRange = RCC_MSIRANGE_11;
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_NONE;
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
{
Error_Handler();
}
/** Initializes the CPU, AHB and APB buses clocks
*/
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
|RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_HSI;
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;
RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1;
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_0) != HAL_OK)
{
Error_Handler();
}
}
/**
* @brief COMP2 Initialization Function
* @PAram None
* @retval None
*/
static void MX_COMP2_Init(void)
{
/* USER CODE BEGIN COMP2_Init 0 */
/* USER CODE END COMP2_Init 0 */
/* USER CODE BEGIN COMP2_Init 1 */
/* USER CODE END COMP2_Init 1 */
hcomp2.Instance = COMP2;
hcomp2.Init.InvertingInput = COMP_INPUT_MINUS_DAC1_CH2;
hcomp2.Init.NonInvertingInput = COMP_INPUT_PLUS_IO1;
hcomp2.Init.OutputPol = COMP_OUTPUTPOL_NONINVERTED;
hcomp2.Init.Hysteresis = COMP_HYSTERESIS_HIGH;
hcomp2.Init.BlankingSrce = COMP_BLANKINGSRC_NONE;
hcomp2.Init.Mode = COMP_POWERMODE_HIGHSPEED;
hcomp2.Init.WindowMode = COMP_WINDOWMODE_DISABLE;
hcomp2.Init.TriggerMode = COMP_TRIGGERMODE_IT_RISING;
if (HAL_COMP_Init(&hcomp2) != HAL_OK)
{
Error_Handler();
}
/* USER CODE BEGIN COMP2_Init 2 */
__HAL_RCC_SYSCFG_CLK_ENABLE();
/* USER CODE END COMP2_Init 2 */
}
/**
* @brief DAC1 Initialization Function
* @PAram None
* @retval None
*/
static void MX_DAC1_Init(void)
{
/* USER CODE BEGIN DAC1_Init 0 */
/* USER CODE END DAC1_Init 0 */
DAC_ChannelConfTypeDef sConfig = {0};
/* USER CODE BEGIN DAC1_Init 1 */
/* USER CODE END DAC1_Init 1 */
/** DAC Initialization
*/
hdac1.Instance = DAC1;
if (HAL_DAC_Init(&hdac1) != HAL_OK)
{
Error_Handler();
}
/** DAC channel OUT1 config
*/
sConfig.DAC_SampleAndHold = DAC_SAMPLEANDHOLD_DISABLE;
sConfig.DAC_Trigger = DAC_TRIGGER_NONE;
sConfig.DAC_OutputBuffer = DAC_OUTPUTBUFFER_ENABLE;
sConfig.DAC_ConnectOnChipPeripheral = DAC_CHIPCONNECT_DISABLE;
sConfig.DAC_UserTrimming = DAC_TRIMMING_FACTORY;
if (HAL_DAC_ConfigChannel(&hdac1, &sConfig, DAC_CHANNEL_1) != HAL_OK)
{
Error_Handler();
}
/** DAC channel OUT2 config
*/
sConfig.DAC_ConnectOnChipPeripheral = DAC_CHIPCONNECT_ENABLE;
if (HAL_DAC_ConfigChannel(&hdac1, &sConfig, DAC_CHANNEL_2) != HAL_OK)
{
Error_Handler();
}
/* USER CODE BEGIN DAC1_Init 2 */
/* USER CODE END DAC1_Init 2 */
}
/**
* @brief TIM1 Initialization Function
* @PAram None
* @retval None
*/
static void MX_TIM1_Init(void)
{
/* USER CODE BEGIN TIM1_Init 0 */
/* USER CODE END TIM1_Init 0 */
TIM_MasterConfigTypeDef sMasterConfig = {0};
TIM_OC_InitTypeDef sConfigOC = {0};
TIM_BreakDeadTimeConfigTypeDef sBreakDeadTimeConfig = {0};
/* USER CODE BEGIN TIM1_Init 1 */
/* USER CODE END TIM1_Init 1 */
htim1.Instance = TIM1;
htim1.Init.Prescaler = 2;
htim1.Init.CounterMode = TIM_COUNTERMODE_UP;
htim1.Init.Period = 256;
htim1.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
htim1.Init.RepetitionCounter = 0;
htim1.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_ENABLE;
if (HAL_TIM_PWM_Init(&htim1) != HAL_OK)
{
Error_Handler();
}
sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET;
sMasterConfig.MasterOutputTrigger2 = TIM_TRGO2_RESET;
sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE;
if (HAL_TIMEx_MasterConfigSynchronization(&htim1, &sMasterConfig) != HAL_OK)
{
Error_Handler();
}
sConfigOC.OCMode = TIM_OCMODE_PWM1;
sConfigOC.Pulse = 0;
sConfigOC.OCPolarity = TIM_OCPOLARITY_HIGH;
sConfigOC.OCNPolarity = TIM_OCNPOLARITY_HIGH;
sConfigOC.OCFastMode = TIM_OCFAST_DISABLE;
sConfigOC.OCIdleState = TIM_OCIDLESTATE_RESET;
sConfigOC.OCNIdleState = TIM_OCNIDLESTATE_RESET;
if (HAL_TIM_PWM_ConfigChannel(&htim1, &sConfigOC, TIM_CHANNEL_1) != HAL_OK)
{
Error_Handler();
}
sBreakDeadTimeConfig.OffStateRunMode = TIM_OSSR_DISABLE;
sBreakDeadTimeConfig.OffStateIDLEMode = TIM_OSSI_DISABLE;
sBreakDeadTimeConfig.LockLevel = TIM_LOCKLEVEL_OFF;
sBreakDeadTimeConfig.DeadTime = 0;
sBreakDeadTimeConfig.BreakState = TIM_BREAK_DISABLE;
sBreakDeadTimeConfig.BreakPolarity = TIM_BREAKPOLARITY_HIGH;
sBreakDeadTimeConfig.BreakFilter = 0;
sBreakDeadTimeConfig.Break2State = TIM_BREAK2_DISABLE;
sBreakDeadTimeConfig.Break2Polarity = TIM_BREAK2POLARITY_HIGH;
sBreakDeadTimeConfig.Break2Filter = 0;
sBreakDeadTimeConfig.AutomaticOutput = TIM_AUTOMATICOUTPUT_DISABLE;
if (HAL_TIMEx_ConfigBreakDeadTime(&htim1, &sBreakDeadTimeConfig) != HAL_OK)
{
Error_Handler();
}
/* USER CODE BEGIN TIM1_Init 2 */
/* USER CODE END TIM1_Init 2 */
HAL_TIM_MspPostInit(&htim1);
}
/**
* @brief GPIO Initialization Function
* @PAram None
* @retval None
*/
static void MX_GPIO_Init(void)
{
GPIO_InitTypeDef GPIO_InitStruct = {0};
/* USER CODE BEGIN MX_GPIO_Init_1 */
/* USER CODE END MX_GPIO_Init_1 */
/* GPIO Ports Clock Enable */
__HAL_RCC_GPIOA_CLK_ENABLE();
__HAL_RCC_GPIOB_CLK_ENABLE();
/*Configure GPIO pins : PA1 PA3 */
GPIO_InitStruct.Pin = GPIO_PIN_1|GPIO_PIN_3;
GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
/*Configure GPIO pins : PA6 PA7 */
GPIO_InitStruct.Pin = GPIO_PIN_6|GPIO_PIN_7;
GPIO_InitStruct.Mode = GPIO_MODE_ANALOG_ADC_CONTROL;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
/*Configure GPIO pins : PA9 PA10 */
GPIO_InitStruct.Pin = GPIO_PIN_9|GPIO_PIN_10;
GPIO_InitStruct.Mode = GPIO_MODE_AF_OD;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
GPIO_InitStruct.Alternate = GPIO_AF4_I2C1;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
/*Configure GPIO pin : PB7 */
GPIO_InitStruct.Pin = GPIO_PIN_7;
GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
/* USER CODE BEGIN MX_GPIO_Init_2 */
/* USER CODE END MX_GPIO_Init_2 */
}
/* USER CODE BEGIN 4 */
/* USER CODE END 4 */
/**
* @brief This function is executed in case of error occurrence.
* @retval None
*/
void Error_Handler(void)
{
/* USER CODE BEGIN Error_Handler_Debug */
/* User can add his own implementation to report the HAL error return state */
__disable_irq();
while (1)
{
}
/* USER CODE END Error_Handler_Debug */
}
#ifdef USE_FULL_ASSERT
/**
* @brief Reports the name of the source file and the source line number
* where the assert_param error has occurred.
* @PAram file: pointer to the source file name
* @PAram line: assert_param error line source number
* @retval None
*/
void assert_failed(uint8_t *file, uint32_t line)
{
/* USER CODE BEGIN 6 */
/* User can add his own implementation to report the file name and line number,
ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */
/* USER CODE END 6 */
}
#endif /* USE_FULL_ASSERT */
2025-08-29 2:21 PM
Debug the hard fault. CubeIDE includes a fault analyzer. Or search these forums for debugging faults. There have been code samples posted or linked to a couple of times. Or read ST's PM0214 Cortex-M4 MCU and MCP Programming Manual section on fault handling and explore the fault registers yourself (https://www.st.com/content/ccc/resource/technical/document/programming_manual/6c/3a/cb/e7/e4/ea/44/9b/DM00046982.pdf/files/DM00046982.pdf/jcr:content/translations/en.DM00046982.pdf)
A few hints: The Cube-generated code will map ALL fault handlers to the same "while(1)" loop, which can mask which fault actually happened. That is where the CubeIDE fault analyzer helps, it will tell you which fault occurred, and also the memory location of the instruction that caused the fault. Or you will need to add unique code at each fault vector (see stm32l4xx_it.c).
2025-08-29 3:44 PM
Hi, thank you for the quick response. I've been debugging extensively, but the error is not consistent. I've also checked the forum examples. The only significant difference from the examples is the USB configuration. Could it be related to the USB clock configuration? I'm pasting my stack details below:
Thread #1 [main] 1 [core: 0] (Suspended : Signal : SIGTRAP:Trace/breakpoint trap)
HardFault_Handler() at stm32l4xx_it.c:92 0x8000db0
<signal handler called>() at 0xfffffff1
0x0
<signal handler called>() at 0xfffffff9
HAL_PWREx_EnterSTOP2Mode() at stm32l4xx_hal_pwr_ex.c:1,307 0x80039b2
Enter_Stop_Mode() at main.c:92 0x80006ae
main() at main.c:190 0x80007ba
2025-08-29 7:53 PM
> I've also checked the forum examples. The only significant difference from the examples is the USB configuration
Fault handler examples from the forums had USB code????? Or were these STOP mode examples (not what I suggested you search the forums for)?
Are you using CubeIDE? If so, did you look at the fault analyzer data? Once you hit the fault, if the fault analyzer is not visible (this is NOT the stack trace window), go to the "Window" menu, select "Show View" and then "Fault Analyzer". See the CubeIDE Users Manual"Fault Analyzer" section. It will show you the PC value of the instruction that caused the fault. Hint - this is NOT the 0x8000db0 you see in the stack trace. 0x8000db0 is the address of the HardFault_Handler function. Look in the disassembly view at that PC value from the fault analyzer so you and see what is going on there. Then look at the CPU Registers to see the register values.
The "0x0" value in the stack trace is suspicious, but I haven't done a lot with STOP mode, so I don't know if that is normal.
2025-09-02 1:27 AM
Hello @mscasso
Please refer to the article below to debug the hardfault.
How to debug a HardFault on an Arm® Cortex®-M STM3... - STMicroelectronics Community
2025-09-11 4:25 PM
Hi everyone—sorry for the delay following up and for the missing details in my previous post. Unfortunately I’m still stuck with the same fault. I’ve tried several different workarounds based on other threads, but none of them solved it. I even tried the most minimalist approach—resetting the system immediately after waking from STOP mode. I also tried multiple ways of clearing pending interrupts, yet I keep getting stuck. Sometimes the debugger disconnects right as the COMP interrupt fires; other times I catch HardFaults (screenshots attached).
MCU / stack
Device: STM32L4 (CubeMX + HAL)
Wake source: COMP2 (rising-edge interrupt)
In run mode I use: TIM1 PWM (laser), DAC1 CH1/CH2, USB FS (device), and a simple USB console
Low-power mode: STOP2
SystemClock_Config(): SYSCLK from HSI (MSI also on; PLL disabled)
Symptoms
After waking from STOP2 the CPU often traps in a FORCED HardFault.
MemManage shows MMFAR = 0xE0000EDF (System Control Space), which looks like a bad exception return / invalid PC.
I sometimes also see UsageFault / INVSTATE.
In other runs the debugger disconnects immediately when COMP fires, and the board never seems to start (no USB enumeration).
Minimal behavior
A timer puts the system into STOP2; wakeup is via the comparator. The comparator ISR does not call any HAL functions—it only sets a volatile flag.
What I’ve tried (none worked):
Immediate reset on wake
Return from STOP2 → call NVIC_SystemReset() right away.
Variants:
With PRIMASK=1 (global IRQs disabled) before STOP2
With BASEPRI masking everything except priority 0 (COMP at prio 0)
With both PRIMASK and BASEPRI
Result: debugger drops; sometimes I still catch INVSTATE before reset.
“Soft reboot” instead of NVIC reset
On wake: enable MSI, wait for MSIRDY, set SCB->VTOR to Flash (0x08000000), load MSP/PC from the vector table, and jump to Reset_Handler; pendings cleared and IRQs masked.
Result: slightly fewer crashes, but the FORCED HardFault still appears occasionally; debugger still disconnects in other tries.
Proper resume (no reset)
On return from STOP2: call SystemClock_Config() immediately, then HAL_ResumeTick(), then re-init TIM1, DAC, and USB, restart COMP IT, then re-enable IRQs. Added SCB->VTOR = 0x08000000 and DSB/ISB barriers.
Result: still faults; PC appears to land in 0xE000xxxx per MMFAR.
Quiescing/masking before STOP2
Disable USB FS IRQ and/or de-init PCD/USBD before STOP2; re-init after clocks are restored.
Disable COMP IRQ in NVIC before STOP2 (so wake is by event only); re-enable after resume.
Clear pendings: __HAL_COMP_COMP2_EXTI_CLEAR_FLAG(), NVIC_ClearPendingIRQ() for COMP/USB/SysTick/TIM1.
Bracket with HAL_SuspendTick()/HAL_ResumeTick().
Also set EXTI EMR bit for the COMP line so it can wake by event.
Result: same behavior (FORCED HardFault or debugger drop).
Priorities
Priority grouping: NVIC_PRIORITYGROUP_4
COMP_IRQn at priority 0; USB and TIM1_CC at 5; SysTick at 15.
Also tried leaving COMP disabled in NVIC during STOP (event-only wake) → still faults.
Power / boot sanity
BOOT0 is firmly strapped to GND (not floating).
Supply is stable; no BOR loops (also tested with USB unplugged).
2025-09-12 3:21 AM
Hello @mscasso
Did you try to increase the stack size please?
2025-09-12 3:53 AM
Hi @Saket_Om , thank you for your answer. I'm not clear about why I should increase the stack size. My application is quite small and it's running okay. The problem is only limited to the entering/exiting stage from stop mode.
Anyway, I tested it without results.
I think the code I published is compliant with the stop mode example published in the guides. I don't have a clue about what the issue could be.
Best regards, Mariano
2025-09-12 6:07 AM
Hello @mscasso
Could you please try without debugging in STOP mode (DBG_STOP bit is in state reset)?
2025-09-15 4:07 AM
Hello @mscasso
Any update on this thread please?