SysTick_Handler

Hi, I am just adding the FreeRTOS to our existing project. I have noticed that there are two places the SysTick_Handler is used, one in libchip provided by Atmel and another in FreeRTOS port.c file. In the FreeRTOSConfig.h file, it is define as the following. ~~~ /* Redefine functions names to match the standard peripheral library */ #define xPortSysTickHandler SysTick_Handler ~~~ Please guide me , what is the best approach to handle this? Function SysTick_Handler() defined in the following two files: “C:MyProjectAtmel Providedlibchipsourcetimetick.c” “C:MyProjectThird PartyRTOSfreertosportableiararm_cm7r0p1port.c” Thank you.

SysTick_Handler

I’m afraid I don’t know what libchip is doing with the interrupt, so I don’t know if the interrupt is required or not. Normally FreeRTOS would have exclusive use of the SysTick handler as it is intended for use by an RTOS implementation. If the implementation in libchip is not declared ‘weak’, and therefore replacable by the FreeRTOS implementation, and it is essential that you use the implementation in libchip (I don’t know what your application is or what resources it needs) then you can share the interrupt by making use of the tick hook function. To do that, install the FreeRTOS version of the systick handler, then call the libchip handler function from vApplicationTickHook(). See https://www.freertos.org/a00016.html