cancel
Showing results for 
Search instead for 
Did you mean: 

sleep on exit (LL_LPM_EnableSleepOnExit)

Ed Watson
Associate
Posted on May 15, 2018 at 23:32

Is there a good example or apnote on the proper use of sleep on exit from an IRQ?

Do I need the Data Synchronization Barrier instruction? (to ensure sleep)

here is some pseudo code, this does appear to work fine.  I can see the main loop run once on exit without the '

LL_LPM_EnableSleepOnExit()' and the intended result (no main loop cycle) with it enabled.

I'm not using the HAL in this application, just the LL interface.

void EXTI4_IRQHandler(void)

{

   /* Manage Flags */

   if(LL_EXTI_IsActiveFlag_0_31(LL_EXTI_LINE_4) != RESET)

   {

      /* Clear EXTI flag */

      LL_EXTI_ClearFlag_0_31(LL_EXTI_LINE_4);

      Inputpin_Callback();

}

LL_LPM_EnableSleepOnExit();

__DSB();

}
0 REPLIES 0