Custom Template BLE and LPM
I everyone ,
I'm working on a STM32WB35
I've build a small custom server app with just a simple batt level service it works and advertise perfectly if I don't enable LPM as soon as I enable LPM it don't advertise anymore
it looks as if CPU2 and RF are down too as default BLE app disable OFF lpm mode it goes only in STOP LPR mode
on my custom pcb I have no LSE so I rely on HSE when running and MSI or HSI when in stop or off


when comparing with BLE HeartSensor reference exemple I dont understand how it keeps advertising when in STOP mode
my main concern is on BLE HeartSensor exemple when going in stop mode it calls
static void EnterLowPower(void)
{
/**
* This function is called from CRITICAL SECTION
*/
while(LL_HSEM_1StepLock(HSEM, CFG_HW_RCC_SEMID));
if (! LL_HSEM_1StepLock(HSEM, CFG_HW_ENTRY_STOP_MODE_SEMID))
{
if(LL_PWR_IsActiveFlag_C2DS() || LL_PWR_IsActiveFlag_C2SB())
{
/* Release ENTRY_STOP_MODE semaphore */
LL_HSEM_ReleaseLock(HSEM, CFG_HW_ENTRY_STOP_MODE_SEMID, 0);
Switch_On_HSI();
__HAL_FLASH_SET_LATENCY(FLASH_LATENCY_0);
}
}
else
{
Switch_On_HSI();
__HAL_FLASH_SET_LATENCY(FLASH_LATENCY_0);
}
/* Release RCC semaphore */
LL_HSEM_ReleaseLock(HSEM, CFG_HW_RCC_SEMID, 0);
return;
}
but when switching to HSI sysclk should fall at 16Khz and CPU2 clock too

may be it explain why I can't get advertising when CM4 is STOP in my custom APP but it dont explain why it works on HEARTSensor exemple
thank's for any help or info or idea !!