I am using STM32F4 and want to implement STOP mode, which puts the ARM into Wait For Interrupt (WFI) mode. I thought the place to do this was in the Idle hook… Using tickles mode, and the Idle hook calling HAL_PWR_EnterSTOPMode() was the right approach, but I don’t think the result is what I want - I am still debugging this.
However, FreeRTOS docs say,
This makes the idle hook function an ideal place to put the processor into a low power state - providing an automatic power saving whenever there is no processing to be performed.
It is paramount that the idle hook function does not call any API functions that could cause it to block.
Putting the ARM in WFI mode is not really a FreeRTOS “API” function, but the WFI is blocking…
Did I miss FreeRTOS example/documentation on where/how ARM WFI mode shouldbe implemented?