Skip to content

Commit 78e1362

Browse files
committed
Provide fix for Issue #5468.
Issue: #5468 Increased DELTA value for Timer and Low Power Timer tests.
1 parent d962f67 commit 78e1362

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

TESTS/mbed_drivers/lp_timer/main.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,13 @@ extern uint32_t SystemCoreClock;
4848
* DELTA = TOLERANCE_FACTOR / SystemCoreClock * US_FACTOR
4949
*
5050
* e.g.
51-
* For K64F DELTA = (40000 / 120000000) * 1000000 = 333[us]
52-
* For NUCLEO_F070RB DELTA = (40000 / 48000000) * 1000000 = 833[us]
53-
* For NRF51_DK DELTA = (40000 / 16000000) * 1000000 = 2500[us]
51+
* For K64F DELTA = (80000 / 120000000) * 1000000 = 666[us]
52+
* For NUCLEO_F070RB DELTA = (80000 / 48000000) * 1000000 = 1666[us]
53+
* For NRF51_DK DELTA = (80000 / 16000000) * 1000000 = 5000[us]
5454
*/
5555
#define US_PER_SEC 1000000
5656
#define US_PER_MSEC 1000
57-
#define TOLERANCE_FACTOR 40000.0f
57+
#define TOLERANCE_FACTOR 80000.0f
5858
#define US_FACTOR 1000000.0f
5959

6060
static const int delta_sys_clk_us = ((int) (TOLERANCE_FACTOR / (float) SystemCoreClock * US_FACTOR));

TESTS/mbed_drivers/timer/main.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ extern uint32_t SystemCoreClock;
3939
* DELTA = TOLERANCE_FACTOR / SystemCoreClock * US_FACTOR
4040
*
4141
* e.g.
42-
* For K64F DELTA = (15000 / 120000000) * 1000000 = 125[us]
43-
* For NUCLEO_F070RB DELTA = (15000 / 48000000) * 1000000 = 312[us]
44-
* For NRF51_DK DELTA = (15000 / 16000000) * 1000000 = 937[us]
42+
* For K64F DELTA = (30000 / 120000000) * 1000000 = 250[us]
43+
* For NUCLEO_F070RB DELTA = (30000 / 48000000) * 1000000 = 625[us]
44+
* For NRF51_DK DELTA = (30000 / 16000000) * 1000000 = 1875[us]
4545
*/
4646
#define US_PER_SEC 1000000
4747
#define US_PER_MSEC 1000
48-
#define TOLERANCE_FACTOR 15000.0f
48+
#define TOLERANCE_FACTOR 30000.0f
4949
#define US_FACTOR 1000000.0f
5050

5151
static const int delta_sys_clk_us = ((int) (TOLERANCE_FACTOR / (float)SystemCoreClock * US_FACTOR));

0 commit comments

Comments
 (0)