STM32WB09 deepstop mode
Hello,
I am working with a STM32WB09KE mcu on a custom pcb. I am trying to write a softwareloop that measures something every x min and afterwards goes into deepstop mode. I was following some online documentation, but it seems like the wb09-series is not represented alot. Currently I have configured the RTC to generate an alarm at every 5 minutes (at 12:05:00, 12:10:00, etc exact). This interrupt is confirmed to be working.
Now I am writing a function to enter deepstop mode in the main loop based on some examples online. Currently I have this:
void Enter_DeepStopMode(void)
{
__HAL_PWR_CLEAR_FLAG(PWR_WU_FLAG_ALL);
HAL_SuspendTick();
__HAL_RCC_LSI_ENABLE();
HAL_PWREx_EnterSTOP2Mode(PWR_STOPENTRY_WFI);
HAL_ResumeTick();
SystemClock_Config();
} The problem is that the compiler (using STM32CubeIDE) does not find this function and argument 'HAL_PWREx_EnterSTOP2Mode(PWR_STOPENTRY_WFI);'
I'm not sure if the wb09 can use this function. I have looked through the examples in the wb09 firmware repository and there the following is used:
HAL_RTCEx_SetWakeUpTimer_IT(&hrtc, 0xFFFF, RTC_WAKEUPCLOCK_RTCCLK_DIV16);
sConfigDEEPSTOP.deepStopMode = PWR_DEEPSTOP_WITH_SLOW_CLOCK_ON;
/* Enter the Deepstop mode */
HAL_PWR_ConfigDEEPSTOP(&sConfigDEEPSTOP);
HAL_PWR_EnterDEEPSTOPMode(); Is this the correct way to enter deepstop mode and if so, will this work with my rtc alarm if i remove the 'HAL_RTCEx_setwakeuptimer line or do I need to configure something else if I want to use the alarm interrupt?
best regards
