Sequencer never calling idle state
Hello,
I am currently working on a ble project on the stm32wb09ke nucleo board that uses the stm32 sequencer. My application is working as intended but I want to make it low power for optimal battery life. If i understand correctly the sequencer itself handles when to enter the Idle state if there is no current running task. From the HeartRate example I've copied the logic for the "UTIL_SEQ_Idle" function. The problem I'm having is that the "UTIL_SEQ_Idle" function is not included in "UTIL_SEQ_Run" as it is in the HeartRate example and is therefore never called. Why is this part not included/generated? Should I just copy whats in the example?
My UTIL_SEQ_Run:
if ((local_evtset & EvtWaited)== 0U)
{
UTIL_SEQ_PreIdle( );
UTIL_SEQ_ENTER_CRITICAL_SECTION_IDLE( );
local_taskset = TaskSet;
local_evtset = EvtSet;
local_taskmask = TaskMask;
UTIL_SEQ_EXIT_CRITICAL_SECTION_IDLE( );
UTIL_SEQ_PostIdle( );
}
HeartRate example:
if ((local_evtset & EvtWaited)== 0U)
{
UTIL_SEQ_PreIdle( );
UTIL_SEQ_ENTER_CRITICAL_SECTION_IDLE( );
local_taskset = TaskSet;
local_evtset = EvtSet;
local_taskmask = TaskMask;
if ((local_taskset & local_taskmask & SuperMask) == 0U)
{
if ((local_evtset & EvtWaited)== 0U)
{
UTIL_SEQ_Idle( );
}
}
UTIL_SEQ_EXIT_CRITICAL_SECTION_IDLE( );
UTIL_SEQ_PostIdle( );
}