From 78e1362ec0cde27597873ea1983deb596defe48b Mon Sep 17 00:00:00 2001 From: Przemyslaw Stekiel Date: Mon, 13 Nov 2017 11:03:29 +0100 Subject: [PATCH] Provide fix for Issue #5468. Issue: https://github.com/ARMmbed/mbed-os/issues/5468 Increased DELTA value for Timer and Low Power Timer tests. --- TESTS/mbed_drivers/lp_timer/main.cpp | 8 ++++---- TESTS/mbed_drivers/timer/main.cpp | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/TESTS/mbed_drivers/lp_timer/main.cpp b/TESTS/mbed_drivers/lp_timer/main.cpp index 9ec13a62a9..bf3f09639e 100644 --- a/TESTS/mbed_drivers/lp_timer/main.cpp +++ b/TESTS/mbed_drivers/lp_timer/main.cpp @@ -48,13 +48,13 @@ extern uint32_t SystemCoreClock; * DELTA = TOLERANCE_FACTOR / SystemCoreClock * US_FACTOR * * e.g. - * For K64F DELTA = (40000 / 120000000) * 1000000 = 333[us] - * For NUCLEO_F070RB DELTA = (40000 / 48000000) * 1000000 = 833[us] - * For NRF51_DK DELTA = (40000 / 16000000) * 1000000 = 2500[us] + * For K64F DELTA = (80000 / 120000000) * 1000000 = 666[us] + * For NUCLEO_F070RB DELTA = (80000 / 48000000) * 1000000 = 1666[us] + * For NRF51_DK DELTA = (80000 / 16000000) * 1000000 = 5000[us] */ #define US_PER_SEC 1000000 #define US_PER_MSEC 1000 -#define TOLERANCE_FACTOR 40000.0f +#define TOLERANCE_FACTOR 80000.0f #define US_FACTOR 1000000.0f static const int delta_sys_clk_us = ((int) (TOLERANCE_FACTOR / (float) SystemCoreClock * US_FACTOR)); diff --git a/TESTS/mbed_drivers/timer/main.cpp b/TESTS/mbed_drivers/timer/main.cpp index a7ec85ac74..dfc16fdf3f 100644 --- a/TESTS/mbed_drivers/timer/main.cpp +++ b/TESTS/mbed_drivers/timer/main.cpp @@ -39,13 +39,13 @@ extern uint32_t SystemCoreClock; * DELTA = TOLERANCE_FACTOR / SystemCoreClock * US_FACTOR * * e.g. - * For K64F DELTA = (15000 / 120000000) * 1000000 = 125[us] - * For NUCLEO_F070RB DELTA = (15000 / 48000000) * 1000000 = 312[us] - * For NRF51_DK DELTA = (15000 / 16000000) * 1000000 = 937[us] + * For K64F DELTA = (30000 / 120000000) * 1000000 = 250[us] + * For NUCLEO_F070RB DELTA = (30000 / 48000000) * 1000000 = 625[us] + * For NRF51_DK DELTA = (30000 / 16000000) * 1000000 = 1875[us] */ #define US_PER_SEC 1000000 #define US_PER_MSEC 1000 -#define TOLERANCE_FACTOR 15000.0f +#define TOLERANCE_FACTOR 30000.0f #define US_FACTOR 1000000.0f static const int delta_sys_clk_us = ((int) (TOLERANCE_FACTOR / (float)SystemCoreClock * US_FACTOR));