2018-03-10 09:54 AM
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!
~
2018-03-11 07:25 AM
'
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.
2018-03-11 10:44 AM
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?
2018-03-11 11:46 AM
'
Am I missing something?'
pull the systick registers and make sure that systick is enabled.
2018-07-05 08:53 AM
Make sure that SysTick interrupt is enabled by adding the following line LL_SYSTICK_EnableIT(); in the function void SystemClock_Config()