diff --git a/extras/sntp/sntp_fun.c b/extras/sntp/sntp_fun.c index 1c738cc..c480ae1 100644 --- a/extras/sntp/sntp_fun.c +++ b/extras/sntp/sntp_fun.c @@ -57,7 +57,9 @@ void sntp_initialize(const struct timezone *tz) { // To avoid div by 0 exceptions if requesting time before SNTP config cal = 1; tim_ref = TIMER_COUNT; - vSemaphoreCreateBinary(sntp_sem); + sntp_sem = xSemaphoreCreateMutex(); + if (sntp_sem == NULL) + printf("sntp: mutex creation failed\n"); sntp_init(); }