diff --git a/app/main.c b/app/main.c index 4ff4a34..4d7d7d5 100644 --- a/app/main.c +++ b/app/main.c @@ -165,6 +165,15 @@ void user_main(void *param) u8 tmr_millis_id = tls_timer_create(&tmr_millis); tls_timer_start(tmr_millis_id); + //Let's start the RTC if not already running + if(!tls_is_rtc_running()) + { + shell_printf("Starting RTC"NEW_LINE); + struct tm curr_time; + time_date_to_tm(__TIME__" "__DATE__, &curr_time); + tls_set_rtc(&curr_time); + } + //We create a task for the nano_shell process u8 *nano_shell_task_stack = NULL, *nano_shell_server_task_stack = NULL;