cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F405 LL_InitTick seems to block SysTick.

RSime.17
Associate

in stm32f4xx_ll_utils.c

__STATIC_INLINE void LL_InitTick(uint32_t HCLKFrequency, uint32_t Ticks)

{

 /* Configure the SysTick to have interrupt in 1ms time base */

 SysTick->LOAD = (uint32_t)((HCLKFrequency / Ticks) - 1UL); /* set reload register */

 SysTick->VAL  = 0UL;                                      /* Load the SysTick Counter Value */

 SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk |

                  SysTick_CTRL_ENABLE_Msk;                  /* Enable the Systick Timer */

}

No SysTick IRQ after executing

�?re there any new improved versions of LL files?

2 REPLIES 2

> No SysTick IRQ after executing

How do you know?

JW

RSime.17
Associate

because if I use SysTick_Config from core_cm4.h instead LL_InitTick , then SysTick IRQ begin works. Therefore, there is a problem in the LL library.

__STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks)

{

 if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk)

 {

   return (1UL);                                                  /* Reload value impossible */

 }

 SysTick->LOAD = (uint32_t)(ticks - 1UL);                        /* set reload register */

 NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */

 SysTick->VAL  = 0UL;                                            /* Load the SysTick Counter Value */

 SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk |

                  SysTick_CTRL_TICKINT_Msk  |

                  SysTick_CTRL_ENABLE_Msk;                        /* Enable SysTick IRQ and SysTick Timer */

 return (0UL);                                                    /* Function successful */

}