2025-06-20 9:56 AM
In the Cube AI documentation (stneuralart_api_and_stack.html) there is this code block
/* Wait for next event */
if (ll_aton_rt_ret == LL_ATON_RT_WFE)
{ /*** subject to change to fit also user code requirements ***/
LL_ATON_OSAL_WFE();
}
to wait for an event while an epoch is running. I looked into what WFE means and it turns out that it puts the CPU in a low power state and crucially gates all the clocks. The effect of this is that the 4 timers I have running generating PWMs all start getting delayed. I can see on the scope the period increasing up to 4-5x.
Is there another way to wait for the epoch to finish without going into a low power state? I am not currently using an RTOS but will switch to one later.