Stand-By mode when RFWakeupCLK is LSE
Hi there,
if i try to set my stm32wb55cg into standby, it seems to only work if the RFWakeupCLK is HSE-DIV1024
void PeriphCommonClock_Config(void)
{
RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {0};
PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_SMPS|RCC_PERIPHCLK_RFWAKEUP;
PeriphClkInitStruct.RFWakeUpClockSelection = RCC_RFWKPCLKSOURCE_HSE_DIV1024;
PeriphClkInitStruct.SmpsClockSelection = RCC_SMPSCLKSOURCE_HSE;
PeriphClkInitStruct.SmpsDivSelection = RCC_SMPSCLKDIV_RANGE1;
if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK)
{
Error_Handler();
}
}If i set the RF-WakeupClock to LSE it gives me:
void PeriphCommonClock_Config(void)
{
RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {0};
PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_SMPS|RCC_PERIPHCLK_RFWAKEUP;
PeriphClkInitStruct.RFWakeUpClockSelection = RCC_RFWKPCLKSOURCE_LSE;
PeriphClkInitStruct.SmpsClockSelection = RCC_SMPSCLKSOURCE_HSE;
PeriphClkInitStruct.SmpsDivSelection = RCC_SMPSCLKDIV_RANGE1;
if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK)
{
Error_Handler();
}
}
So if i now try to enter Standby, it seems like the minimum it is now doing something else but no STANDBY :(
So whenever i finish my BLE-Activity the IC should enter standby and stay there for 10 minutes.
My Code to enter the low power mode:
static void Adv_Mgr(void) {
aci_gap_set_non_discoverable();
HAL_ADC_MspDeInit(&hadc1);
HAL_I2C_DeInit(&hi2c1);
HAL_IPCC_MspDeInit(&hipcc);
__HAL_RCC_GPIOC_CLK_DISABLE();
__HAL_RCC_GPIOH_CLK_DISABLE();
__HAL_RCC_GPIOB_CLK_DISABLE();
__HAL_RCC_GPIOA_CLK_DISABLE();
__HAL_RCC_GPIOE_CLK_DISABLE();
UTIL_LPM_SetStopMode(1 << CFG_LPM_APP_BLE, UTIL_LPM_ENABLE);
UTIL_LPM_SetOffMode(1 << CFG_LPM_APP_BLE, UTIL_LPM_ENABLE);
HAL_RTCEx_DeactivateWakeUpTimer(&hrtc);
if (HAL_RTCEx_SetWakeUpTimer_IT(&hrtc, 1000, RTC_WAKEUPCLOCK_CK_SPRE_16BITS) != HAL_OK) {
Error_Handler();
}
}So this is working when the RFWakeupClock is HSE-DIV1024 but not with LSE.
I currently have no real clue why, i tried already so many different things -> regenerating the setup again and again with CubeMX but no success.
As soon as i set the rfwakeup clk to lse it somehow immediatly gets out of standby.
As attachment i provide a power graph:

At around 4.7 sec you see the drop to standby (maybe), but then some wakeup happens and it goes up to RUN, and there it stays now forever.
