make systick actually work every 1ms
This commit is contained in:
parent
7e6eb879f1
commit
84a3fea450
2 changed files with 5 additions and 3 deletions
|
@ -12,10 +12,12 @@ void SysTick_Handler(void)
|
|||
void Scheduler_conf(void (*it_callback) (void))
|
||||
{
|
||||
it_callback_SysTick = it_callback;
|
||||
LL_Init1msTick(1000);
|
||||
SysTick->CTRL &= ~(SysTick_CTRL_CLKSOURCE_Msk);
|
||||
SysTick->CTRL |= SysTick_CTRL_TICKINT_Msk;
|
||||
SysTick->LOAD = 9000;
|
||||
}
|
||||
|
||||
void Scheduler_start(void)
|
||||
{
|
||||
|
||||
SysTick->CTRL |= SysTick_CTRL_ENABLE_Msk;
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include "stm32f103xb.h"
|
||||
|
||||
/**
|
||||
* @brief Configure l'horloge interne comme ordonanceur
|
||||
* @brief Configure l'horloge interne comme ordonanceur toutes les 1ms
|
||||
* @note
|
||||
* @param (void)* it_callback : Tache de fond à executer
|
||||
* @retval None
|
||||
|
|
Loading…
Reference in a new issue