Skip to main content
RSime.17
Associate
September 13, 2018
Question

STM32F405 LL_InitTick seems to block SysTick.

  • September 13, 2018
  • 2 replies
  • 788 views

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?

    This topic has been closed for replies.

    2 replies

    waclawek.jan
    Super User
    September 13, 2018

    > No SysTick IRQ after executing

    How do you know?

    JW

    RSime.17
    RSime.17Author
    Associate
    September 14, 2018

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

    }