Wiznet/RP2040-HAT-FREERTOS-C

SNTP fails after being repeatedly called.

Opened this issue · 0 comments

If I call the code insert below every 5 second for a couple of dozen times the SNTP function starts to constantly fail.
SNTP_init(SOCKET_SNTP, sntpSvrIp, tz, pEthernetBuf );

for (uint8_t i=0; i < 5; i++){
	res = SNTP_run(&d);
	if (d.yy >= 2022){
		break;
	}
	vTaskDelay(10);
}
if (d.yy < 2022){
	printf("SNTP Failed %d\n", res);
	printf("Failed: %d-%d-%d %d:%d:%d\n", d.yy, d.mo, d.dd, d.hh, d.mm, d.ss);
	return false;
}