Increase heap to 288 on SNTP test; warnings on robustness
This commit is contained in:
parent
bb58626f47
commit
6bd61ae298
2 changed files with 18 additions and 5 deletions
|
|
@ -2,7 +2,8 @@
|
|||
* Test implementation of callback for LWIP SNTP
|
||||
*
|
||||
* Production code would likely decide how to handle
|
||||
* various magnitude changes, and be brisk about it
|
||||
* various magnitude changes, be robust to outliers,
|
||||
* and be brisk about it all
|
||||
*/
|
||||
|
||||
/*-
|
||||
|
|
@ -43,9 +44,20 @@
|
|||
|
||||
#include "sntp_impl.h"
|
||||
|
||||
|
||||
/**********************************************************
|
||||
* IMPORTANT: THIS IS A TEST HARNESS, NOT PRODUCTION CODE *
|
||||
**********************************************************
|
||||
*
|
||||
* Spikes in delay of over 200 ms have been observed in testing.
|
||||
* Such spikes would likely cause both a forward and a backward jump
|
||||
* in time using this simplistic approach. Increasing the threshold to,
|
||||
* for example, 250 ms would require 2000 * 250 ms = 500 sec ~ 10 min
|
||||
* for the time to slew back after a "bad set" or series of "bad" packets.
|
||||
*
|
||||
* PRODUCTION CODE SHOULD USE AN APPLICATION-APPROPRIATE CLOCK DISCIPLINE
|
||||
*/
|
||||
#ifndef SNTP_IMPL_STEP_THRESHOLD
|
||||
#define SNTP_IMPL_STEP_THRESHOLD 128000
|
||||
#define SNTP_IMPL_STEP_THRESHOLD 125000
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -129,7 +129,8 @@ user_init(void)
|
|||
* Run at a high enough priority so that the initial time-set doesn't get interrupted
|
||||
* Later calls and listen-only mode calls run in the high-priority "tcpip_thread" (LWIP)
|
||||
*
|
||||
* 256 heap seems sufficient, 196 didn't bomb, but not examined in detail
|
||||
* While 196 heap seemed sufficient for many tests, use of an NTP pool
|
||||
* with DNS caused heap errors/warnings on starting NTP at 256 heap
|
||||
*/
|
||||
xTaskCreate(sntp_task, "SNTP task", 256, NULL, 6, NULL);
|
||||
xTaskCreate(sntp_task, "SNTP task", 288, NULL, 6, NULL);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue