I am looking at the OS_CPU_C.C code when the following paragraph puzzled over a long time always in Baidu's help to find the answer
/* Declare a few functions, here to note that the last three functions need to be commented out, why?
Os_cpu_systickhandler () is defined in OS_CPU_C.C, which is the interrupt handler for the Systick interrupt.
and STM32F10X_IT.C, which already has the definition of the interrupt function Systick_handler (), here Also
No, it's strange that the official transplant version will do so, and I'll explain later.
Os_cpu_systickinit () is defined in OS_CPU_C.C and is used to initialize the Systick timer, which
Depends on Os_cpu_systickclkfreq (), and this function we will implement, so comment out.
Os_cpu_systickclkfreq () is defined in Bsp.c (micrium\software\evalboards),
The BSP.C is not used in this transplant, we will implement it ourselves, so we can comment it out.
*/
Functions such as os_cpu_systickinit () are not used because they are upgraded after stm32f their firmware library
A more convenient function systick_config (uint32_t ticks) is provided in the CMSs core_cm3.h file.
Used to set Systick.
Add the following function to replace Os_cpu_systickinit () and its related functions in BSP.C
void Systick_init (void)
{
/* systemfrequency/1000 1ms interrupts the maximum value
* systemfrequency/100 10ms Interrupt Once
* SYSTEMFREQUENCY/10 100ms Interrupt once minimum value
*/
st3.0 with Systemfrequency and st3.5 with Systemcoreclock
Systick_config (SYSTEMCORECLOCK/OS_TICKS_PER_SEC);
}
Why in the Ucos to stm32f103 Transplant said OS_CPU_C.C three functions such as os_cpu_systickinit () need to comment out