I am using FreeRTOS on STM32L15RD processor–a STM32L152 variant, and using
the Rowley Crossworks for ARM as a toolchain. My problem is when a I set a timer
for what I think is 10000 milliseconds it doesn’t expire until approximately 17000
The timer is created as follows:
T_SAMPLE = xTimerCreate(“Sample T”, (10000/portTICK_RATE_MS), pdFALSE, &v, sample_handler);
The underlying definition of portTICK_RATE_MS in FreeRtosConfig.h is as follows:
#define configTICK_RATE_HZ ( (Tick_Type_T) 1000)
This is the timeout handler.
void sample_handler(TimerHandler_t timer_id)
msg.event = AGG_E_SAMPLE_TIMEOUT; msg.data_len = 0; msg.data = NULL; xQueueSendToFront(AGGREGATE_TASK, &msg, portMAX_DELAY); return;
The timer is started and handled in AGGREGATE_TASK and the only thing the task
is doing is waiting for a message as follows:
(i.e. No messages except the timeout message arrive.)
xQueueReceive(AGGREGATE_TASK, &msg, 0);
Do you have any idea what the problem is ?