2023-12-15 05:54 AM
I'm currently testing the BLE_LLD examples provided by st. I have two Nucleo Boards one running BLE_LLD_Lowpower and one running the BLE_LLD_Pressbutton example. That example works fine and I can change whatever is transmitted.
If I use the same BLE_LLD_Lowpower example on one of my own PCBs with a STM32WB5MMG6 module I can only make the example work if I provide 3.3V. If I change the supply voltage to anything else than 3.3V it only transmits one package. But as soon as it enters the LL_PWR_MODE_STOP2 low power mode and wakes up from it, it seems to be stuck at some point. If I debug said example at 1.8V it keeps on running. (I think it won't go into sleep mode).
If I run both examples unchanged and run the Lowpower example at 1.8V I get the same results.
Is there an explanation for said behaviour? Any help appreciated
Solved! Go to Solution.
2023-12-16 12:28 PM
If I change the sendStart() to this, it works
static void sendStart(void)
{
APP_BLE_LLD_Init();
HW_TS_Create(CFG_TIM_PROC_ID_ISR, &SwitchOffGPIO_timer_Id, hw_ts_SingleShot, Appli_TS_Callback);
radioInit();
HW_TS_Start(SwitchOffGPIO_timer_Id, (uint32_t)LED_ON_TIMER);
UTIL_LPM_SetStopMode(1 << CFG_LPM_APP_BLE_LLD, UTIL_LPM_DISABLE ); // TO ENABLE
BLE_LLD_MakeActionPacketPending(&apSend[APACKET_1]);
}
2023-12-15 06:32 AM
Ok, further investigation shows, that its not stuck. The example transmits 3 ActionPackets and only if all 3 are sent successful, the MCU goes to sleep. Otherwise it seems stuck. (I'm logging the current consumption)
If I recall the BLE_LLD_Init() after the first sleep, I get atleast one more packet. Then it seems stuck again.
I will investigate further
2023-12-16 12:28 PM
If I change the sendStart() to this, it works
static void sendStart(void)
{
APP_BLE_LLD_Init();
HW_TS_Create(CFG_TIM_PROC_ID_ISR, &SwitchOffGPIO_timer_Id, hw_ts_SingleShot, Appli_TS_Callback);
radioInit();
HW_TS_Start(SwitchOffGPIO_timer_Id, (uint32_t)LED_ON_TIMER);
UTIL_LPM_SetStopMode(1 << CFG_LPM_APP_BLE_LLD, UTIL_LPM_DISABLE ); // TO ENABLE
BLE_LLD_MakeActionPacketPending(&apSend[APACKET_1]);
}