2017-03-25 04:01 PM
Everybody,
I have a question in regard, FreeRTOS, Systick and Timer2 ?
How can I use Timer2 as Systick in FreeRTOS ?
And what is the relation between SDIO preemption priority global interrupt with FreeRTOS ?
Thanks and have a good weekend
#stm32f1xx #freertos #sdio #interrupt #preemption2017-03-25 08:22 PM
Are you using GCC? If so then all you need to do is
1) define a function with the following prototype to setup the timer you want to generate the tick interrupt
void
vPortSetupTimerInterrupt
(
void
);
2) Install the existing xPortSysTickHandler() function as the timer's interrupt service routine,
3) Set the priority of the timer's interrupt to the lowest possible.
In answer to your second question - and the priority bits for an interrupt that uses the FreeRTOS interrupt safe API should be set to be pre-emption priority bits, not sub-priority bits. See the following link for more information:
2017-03-26 11:23 PM
Probably this one is related :
HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority)
{
RCC_ClkInitTypeDef clkconfig;
uint32_t uwTimclock = 0;
uint32_t uwPrescalerValue = 0;�?�?�?�?�?
2017-03-27 02:56 AM
My toolchain is Keil MDK, is it GCC based ?
.
void
vPortSetupTimerInterrupt
(
void
);
Which file is it located ?
2017-03-27 09:49 AM
If you are using Keil then you need the additional step of ♯ defining configOVERRIDE_DEFAULT_TICK_CONFIGURATION to 1 in FreeRTOSConfig.h.