How do I initialize the xTickCount

I want to use a very accurate battery backed RTC to initialize the xTickCount at startup. Is there a SetTickCount() that takes a FF_SystemTime_t value? Once a day I might update the xTickCount.
Thanks

I wouldn’t try to make the system tick count be a precise time of day counter, as they generally aren’t designed to do that. Also everything times off counter, so a jump in time can cause issues. Better to keep a separate Time of Day counter that you update, with the systick and periodic reads of the RTC to handle things that need to happen at a precise point it clock time.

I can agree with your statement. I still need a function that converts a FF_SystemTime_t into a uint32_t that is seconds from 1-1-1970

No, by default the tick count starts at zero. There is a compile time option that enables the application writer to set the initial value but that is not something that would normally be done other than during testing.

The tick count is under the control of the RTOS. Manually adjusting it at run time could result in tasks becoming blocked indefinitely if the time was advanced past their unblock time.

My understanding (from a quick search) is that YOU, as the applications programmer need to provide a FreeRTOS_time function that provides (to the best of your ability) the current time. If reading the RTC is fast, just do it as you need it. If it is slow, read it at startup, and maybe occasionally there after to update, and save that time with the current tick count, and based on the now current tick count, compute the current clock time. Only you as the system program know what are the best resources available to know the time. FreeRTOS doesn’t.