FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [March 2017 Threads]
Hi ,
I am following below method to sync my external RTC with internal timer.
Incrementing epoch millliseconds from vTickISR.
But i want to sync my epoch milliseconds with external RTC just after my system startsup.
But vTickISR is called when FreeRTOS scheduler is started so i have to wait till scheduler is started.
Is there any function in FreeRTOS that can tell me that scheduler is started so that once scheduler is started
i can sync my epcohms with RTC and it keep on incrementing just after syncing.
LiBIncEpochTime()
{
g_ulEpochMs++;
}
pragma interrupt ( vTickISR( vect = VECT( configTICKVECTOR ), enable ) )
void vTickISR( void )
{
/ Increment the tick, and perform any processing the new tick value
necessitates. /
///increment epoch seconds
LIBIncEpochTime();
setipl( configMAXSYSCALLINTERRUPTPRIORITY );
{
if( xTaskIncrementTick() != pdFALSE )
{
taskYIELD();
}
}
setipl( configKERNELINTERRUPTPRIORITY );
}*
Regards,
Savindra
Look at line 552 (at the time of writing) in the following file.
https://sourceforge.net/p/freertos/code/HEAD/tree/trunk/FreeRTOS/Source/timers.c
If you set configUSEDAEMONTASKSTARTUPHOOK to 1 you must provide an
implementation of:
void vApplicationDaemonTaskStartupHook( void );
Assuming the timer task is the highest priority task in the system -
which is normally the case - then vApplicationDaemonTaskStartupHook()
will get called once when the first task starts executing.
Does that meet your needs?
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.