cancel
Showing results for 
Search instead for 
Did you mean: 

Disabling Systick to Enter Stop Mode

georgebown
Associate II
Posted on August 16, 2010 at 18:51

Disabling Systick to Enter Stop Mode

2 REPLIES 2
swhite2
Associate III
Posted on May 17, 2011 at 14:02

I ran into the same (lack of a SysTick disable mechanism) so I wrote my own.

FYI this function stops the SysTick counter (SysTick_CTRL_ENABLE_Msk) and interrupts (SysTick_CTRL_TICKINT_Msk).You could just stop the interrupt if you want to leave the counter going.

//////////////////////////////////////////////////////////////////////////

//

//  FUNCTION NAME :

//      stm32_systick_disable

//

//

//  IMPLEMENTATION DESCRIPTION :

//      See the 'STM32F10xxx Cortex-M3 programming manual.pdf' for details.

//

//

//  IMPLICIT LOCAL INPUTS AND OUTPUTS :

//      None

//

//////////////////////////////////////////////////////////////////////////

void                                    stm32_systick_disable(void)

{

    SysTick->CTRL &= ~(SysTick_CTRL_ENABLE_Msk | SysTick_CTRL_TICKINT_Msk);

}

georgebown
Associate II
Posted on May 17, 2011 at 14:02

Thanks very much for your help.