cancel
Showing results for 
Search instead for 
Did you mean: 

GPDMA interrupts driven by ADF stop when entering stop 0 mode

Hello,

I have a relatively simple program where I am trying to go into stop 0 mode while my ADF uses GPDMA to fill a circular buffer with callbacks triggered at half and full (i.e., double buffering). The goal is to go to stop 0 mode between callbacks but although I can go into stop 0 mode, my system fails to wake up from it. The ADF is clocked from MSIK and I have verified via a scope that the clock output is active when in stop 0 mode. To go into low power mode, I call the following:

 

 

__HAL_RCC_ADF1_CLKAM_ENABLE(); // necessary to enable output clock to microphone
__HAL_RCC_MSIKSTOP_ENABLE(); // keep clock to ADF active
__HAL_RCC_PWR_CLK_ENABLE();

HAL_SuspendTick();

HAL_PWR_EnterSTOPMode(PWR_MAINREGULATOR_ON, PWR_STOPENTRY_WFI);

HAL_ResumeTick();
SystemClock_Config();

 

 

If I don't suspend the systick, the GPDMA interrupts appear to execute just fine but everything gets delayed because the system is constantly being woken up by systick. If anyone has any pointers, that would be much appreciated!

For added reference, my system works just fine when not trying to go into stop 0 mode and I haven't observed any issues with ADF or the data coming from it. Interrupts are being called as expected and both half and full callbacks are executed. 

0 REPLIES 0