cancel
Showing results for 
Search instead for 
Did you mean: 

Don't Execution SysTick_Handler(void) in LL library

sjiro
Associate

Sorry for weird English

I try use SysTick_Handler in LL library (with STM32L011F4U and CubeMX ), but never execute the Handler.

I also tried HAL library, then executed properly.

So I checked difference between HAL and LL , and I recognized initializing function in LL library ((stm32l0 xx_ll_utils.h as below) don't write [SysTick_CTRL_TICKINT_Msk] .

__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 */
}

So I modified as below then executed SysTick_Handler() properly.

__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_TICKINT_Msk | /* Enable the Systick Interrupt */
                   SysTick_CTRL_ENABLE_Msk;                   /* Enable the Systick Timer */
}

On CubeMX, enable Systick interrupt as default ( and can't disable)

Is this LL library's bug ?

if so , I want to fix this by ST.

Please tell me your opinion.

0 REPLIES 0