Skip to main content
Associate II
May 23, 2024
Solved

LPM Mode does not run the radio

  • May 23, 2024
  • 1 reply
  • 1739 views

I have succesfully implemented my own BLE advertisement (LEGACY) using the STM32WB55 MCU.

I have attached my code below.

In a nutshell I have created three timers and two tasks.

BettleBerry_0-1716444093530.png

When the Heartbeat timer expires it calls the Heartbeat function:

BettleBerry_1-1716444228475.png

This then sets a tasks:

BettleBerry_2-1716444287916.png

This then runs the Advertisement function

BettleBerry_3-1716444322703.png

Basically everything works as expected the timers fire in the defined times set, the LEDs blink as defined, the advertisements go of as expected as well.

However the ISSUE :(

When I set the CFG_LPM_SUPPORTED to 1 the problems come up

BettleBerry_4-1716444419375.png

Firstly the timers seems to be functional. However the LD2 (Green LED) which comes on when the radio activity event is called does not gets called. Because the LD2 never comes on. This is found here in the SVCCTL_UserEvtFlowStatus_t SVCCTL_App_Notification(void *p_Pckt) function:

BettleBerry_5-1716444589901.png

The only thing that sorts of solves my issues is by adding a delay in the

static void APPE_SysEvtReadyProcessing(void * pPayload).

BettleBerry_6-1716444798340.png

Please note if I change CFG_LPM_SUPPORTED back to 0 then everything works perfectly.

Best answer by BettleBerry

I applied one of the clocks in the Clock Configuration incorrectly. I applied the fixed and it now works as expected even in LOW POWER MODE.

1 reply

BettleBerryAuthorBest answer
Associate II
May 23, 2024

I applied one of the clocks in the Clock Configuration incorrectly. I applied the fixed and it now works as expected even in LOW POWER MODE.