File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
TESTS/mbed_platform/wait_ns Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -31,13 +31,16 @@ using namespace utest::v1;
31
31
*/
32
32
33
33
/*
34
- * Define tolerance as follows:
35
- * Timer might be +/-5% out; wait_ns is permitted 20% slow, but not fast.
36
- * Therefore minimum measured time should be 95% of requested, maximum should
37
- * be 125%. Unity doesn't let us specify an asymmetric error though.
38
- */
34
+ * Define tolerance as follows:
35
+ * Timer might be +/-5% out; wait_ns is permitted 40% slow, but not fast.
36
+ * Therefore minimum measured time should be 95% of requested, maximum should
37
+ * be 145%. Unity doesn't let us specify an asymmetric error though.
38
+ *
39
+ * Would be nice to have tighter upper tolerance, but in practice we've seen
40
+ * a few devices unable to sustain theoretical throughput - flash wait states?
41
+ */
39
42
#define TOLERANCE_MIN 0 .95f
40
- #define TOLERANCE_MAX 1 .25f
43
+ #define TOLERANCE_MAX 1 .45f
41
44
#define MIDPOINT ((TOLERANCE_MIN+TOLERANCE_MAX)/2 )
42
45
#define DELTA (MIDPOINT-TOLERANCE_MIN)
43
46
You can’t perform that action at this time.
0 commit comments