cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F103C8 SysTick_Handler not called with LL_Driver

Singular Engineer
Associate
Posted on March 10, 2018 at 18:54

Started asimple blinky withSTM32F103C8 (bluepill board). Changes I made after the code generation by Cube are as follows

main.h

volatile static uint32_t TickerCounts = 0;�?

stm32f1xx_it.c

void SysTick_Handler(void)
{
 /* USER CODE BEGIN SysTick_IRQn 0 */
 TickerCounts++;
 /* USER CODE END SysTick_IRQn 0 */
 
 /* USER CODE BEGIN SysTick_IRQn 1 */
/* USER CODE END SysTick_IRQn 1 */
}�?�?�?�?�?�?�?�?�?

main.c

//Showing only the changes that were made
//LED1_Pin = PC13
int main(void)
{
 LL_SYSTICK_EnableIT();
 while (1)
 {
if(TickerCounts >= 1000)
{
LL_GPIO_TogglePin(LED1_GPIO_Port,LED1_Pin);
TickerCounts = 0;
}
 }
}�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?

The SysTick_Handler is not getting called. Am I forgetting something? Please help (source attached).

Note:

1) I am aware of the LL_GPIO Init bug for pins above 7 and I have made the necessary changes mentioned in another thread.

Attached is my project made with

- STM32Cube version 1.6.0

-TrueStudio 9.0

Thanks!

~

4 REPLIES 4
henry.dick
Senior II
Posted on March 11, 2018 at 15:25

'

The SysTick_Handler is not getting called.'

how do you know that?

the led may not be blinking for a variety of reasons but that fact alone isn't sufficient to suggest that the SysTick isn't being called.

Singular Engineer
Associate
Posted on March 11, 2018 at 18:44

how do you know that?

Using TrueSTUDIO's Live Expression/Live Watch to watch the variable values. It stays zero. Also looking into the instruction step window during debugging, the value remains 0. Am I missing something?

Posted on March 11, 2018 at 18:46

'

Am I missing something?'

pull the systick registers and make sure that systick is enabled.

Loay Yari
Associate
Posted on July 05, 2018 at 17:53

Make sure that SysTick interrupt is enabled by adding the following line LL_SYSTICK_EnableIT(); in the function void SystemClock_Config()