Hi
I’m creating a timer like this:
~~~
TimerHandle
t Timer;
Timer = xTimerCreate ( “Timer1second”, TIME
SECONDS(1), pdTRUE, (void*)0, CallbackTimer );
~~~
The callback function creates a message that is sent to the task that created the timer:
~~~
static void Callback
Timer ( TimerHandlet xTimer )
{
IPreceiver
Messaget Timer_Message;
Timer_Message.type = Timer_1second;
if ( xQueueSend ( xQueue_Callback, (void*) &Timer_Message, 0 ) != pdPASS )
/* In case there is no space in the Queue we wait for better days */
;
}
~~~
In the main task a switch case is used upon receiving the message:
~~~
if ( xQueueReceive ( xQueue
Callback, &CallbackMessage, portMAX
DELAY ) != pdTRUE )
SPPrintf
h ( “ERROR – taskIPreceiver[] – xQueueReceive failed” );
switch ( Callback_Message.type )
{
case Timer_1second:
{
~~~
At the moment the case statement is never hit! However it was working before… I’ve been changing some options in FreeRTOSConfig.h but I believe I put everything back to as it was, but…
Any ideas about this?
Would there be any option in FreeRTOSConfig.h that some how makes the timer not work?
In fact this may be the one:
~~~
/* Software timer definitions. */
//
Enable timer
// freertos_use_timers
ifndef configUSE_TIMERS
define configUSE_TIMERS 1
endif
~~~
But it is 1.
thanks