SysTick_Config error

Hello, I am testing side channel attacks using ChipWhisper-Lite 32-Bit.

To measure the execution time of the function, I defined ENABLE_TICK_TIMING and added the following functions:
uint32_t HAL_SYSTICK_Config(uint32_t TicksNumb)
return SysTick_Config(TicksNumb);

The program is compiled without errors.

However, when the program run, an error occurs in the part that calls HAL_InitTick (TICK_INT_PRIORITY).

There seems to be a problem with SysTick_Config(TicksNumb):
__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_ENABLE_Msk; /
Enable SysTick IRQ and SysTick Timer /
return (0UL); /
Function successful */

How can I solve this problem? If you know how to solve it, please let me know how to solve it.


What error are you getting?