I am trying to use SysTick and make SysTick_Handler(), but not sure how to update the SysTick reload value. I cannot find any information about it in the RA manual. Can I get the SystemCoreClock value for RA4M1 MCU and use it as the SysTick reload?
Hello Marek,
Yes, you can use the SystemCoreClock value to initialize the SysTick timer. I used this function to set the 1ms interval:
SysTick_Config(SystemCoreClock / 1000);NVIC_SetPriority(SysTick_IRQn, 0);
SysTick_Config(SystemCoreClock / 1000);
NVIC_SetPriority(SysTick_IRQn, 0);
Kind regards,
Sergey
If this response, or one provided by another user, answers your question, please verify the answer. Thank you!
Renesas Engineering Community Moderatorhttps://community.renesas.com/https://academy.renesas.com/https://en-support.renesas.com/knowledgeBase/
It seems SystemCoreClockUpdate() must be called before SystemCoreClock can be used.
You can see this function is already called in the "SystemInit" function of the "..ra\fsp\src\bsp\cmsis\Device\RENESAS\Source\system.c" file, so you don't need to call it additionally.