From 962fc545784d0ef6f084a0c71d32a7914903f4eb Mon Sep 17 00:00:00 2001 From: Marcus Chang Date: Thu, 26 Apr 2018 09:33:43 -0700 Subject: [PATCH] Re-enable flash clock test for NRF52 but with higher tolerance The flash clock test is disabled for the NRF52 series. This change re-enables the test but with a higher tolerance to accommodate the high jitter on the current ticker implementation. --- TESTS/mbed_hal/flash/functional_tests/main.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/TESTS/mbed_hal/flash/functional_tests/main.cpp b/TESTS/mbed_hal/flash/functional_tests/main.cpp index 4b28510c68..8ca81ecb8b 100644 --- a/TESTS/mbed_hal/flash/functional_tests/main.cpp +++ b/TESTS/mbed_hal/flash/functional_tests/main.cpp @@ -28,7 +28,13 @@ using namespace utest::v1; #define TEST_CYCLES 10000000 + +#ifdef TARGET_NRF52 +/* The increased tolerance is to account for the imprecise timers on the NRF52. */ +#define ALLOWED_DRIFT_PPM (1000000/50000) //5.0% +#else #define ALLOWED_DRIFT_PPM (1000000/5000) //0.5% +#endif /* return values to be checked are documented at: @@ -279,9 +285,7 @@ Case cases[] = { Case("Flash - erase sector", flash_erase_sector_test), Case("Flash - program page", flash_program_page_test), Case("Flash - buffer alignment test", flash_buffer_alignment_test), -#ifndef MCU_NRF52 Case("Flash - clock and cache test", flash_clock_and_cache_test), -#endif }; utest::v1::status_t greentea_test_setup(const size_t number_of_cases) {