2010-08-16 09:51 AM
Disabling Systick to Enter Stop Mode
2011-05-17 05:02 AM
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); }2011-05-17 05:02 AM
Thanks very much for your help.