diff --git a/hal/tests/TESTS/mbed_hal/lp_ticker/main.cpp b/hal/tests/TESTS/mbed_hal/lp_ticker/main.cpp index 43f8e39..aa766c3 100644 --- a/hal/tests/TESTS/mbed_hal/lp_ticker/main.cpp +++ b/hal/tests/TESTS/mbed_hal/lp_ticker/main.cpp @@ -112,7 +112,7 @@ TEST_ASSERT(p_ticker_info->bits >= 12); #ifdef LP_TICKER_PERIOD_NUM - TEST_ASSERT_UINT32_WITHIN(1, 1000000 * LP_TICKER_PERIOD_DEN / LP_TICKER_PERIOD_NUM, p_ticker_info->frequency); + TEST_ASSERT_UINT32_WITHIN(1, (uint64_t)1000000 * LP_TICKER_PERIOD_DEN / LP_TICKER_PERIOD_NUM, p_ticker_info->frequency); TEST_ASSERT_EQUAL_UINT32(LP_TICKER_MASK, ((uint64_t)1 << p_ticker_info->bits) - 1); #endif diff --git a/hal/tests/TESTS/mbed_hal/us_ticker/main.cpp b/hal/tests/TESTS/mbed_hal/us_ticker/main.cpp index 976b38f..354e148 100644 --- a/hal/tests/TESTS/mbed_hal/us_ticker/main.cpp +++ b/hal/tests/TESTS/mbed_hal/us_ticker/main.cpp @@ -47,7 +47,7 @@ TEST_ASSERT(p_ticker_info->bits >= 16); #ifdef US_TICKER_PERIOD_NUM - TEST_ASSERT_UINT32_WITHIN(1, 1000000 * US_TICKER_PERIOD_DEN / US_TICKER_PERIOD_NUM, p_ticker_info->frequency); + TEST_ASSERT_UINT32_WITHIN(1, (uint64_t)1000000 * US_TICKER_PERIOD_DEN / US_TICKER_PERIOD_NUM, p_ticker_info->frequency); TEST_ASSERT_EQUAL_UINT32(US_TICKER_MASK, ((uint64_t)1 << p_ticker_info->bits) - 1); #endif }