Skip to content

Commit 96d9a00

Browse files
authored
Merge pull request #5841 from ARMmbed/release-candidate
Release candidate for mbed-os-5.7.3
2 parents eca67ca + fd07de4 commit 96d9a00

File tree

336 files changed

+15733
-14458
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

336 files changed

+15733
-14458
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ The [release notes](https://os.mbed.com/releases) detail the current release. Yo
2828

2929
## Getting started for developers
3030

31-
We have a [developer webiste](https://os.mbed.com) for asking questions, engaging with others, finding information on boards and components, using an online IDE and compiler, reading the documentation and learning about what's new and what's coming next in Mbed OS.
31+
We have a [developer website](https://os.mbed.com) for asking questions, engaging with others, finding information on boards and components, using an online IDE and compiler, reading the documentation and learning about what's new and what's coming next in Mbed OS.
3232

3333
## Getting started for contributors
3434

TESTS/mbed_drivers/lp_timer/main.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,17 @@ extern uint32_t SystemCoreClock;
5151
* For K64F DELTA = (80000 / 120000000) * 1000000 = 666[us]
5252
* For NUCLEO_F070RB DELTA = (80000 / 48000000) * 1000000 = 1666[us]
5353
* For NRF51_DK DELTA = (80000 / 16000000) * 1000000 = 5000[us]
54+
*
55+
* As low power timer cannot be too much accurate, this DELTA should not be more precise than 500us,
56+
* which corresponds to a maximum CPU clock around 130MHz
5457
*/
5558
#define US_PER_SEC 1000000
5659
#define US_PER_MSEC 1000
5760
#define TOLERANCE_FACTOR 80000.0f
5861
#define US_FACTOR 1000000.0f
62+
#define CLOCK_MAX 130000000
5963

60-
static const int delta_sys_clk_us = ((int) (TOLERANCE_FACTOR / (float) SystemCoreClock * US_FACTOR));
64+
static const int delta_sys_clk_us = (SystemCoreClock < CLOCK_MAX? ((int) (TOLERANCE_FACTOR / (float) SystemCoreClock * US_FACTOR)):((int) (TOLERANCE_FACTOR / (float) CLOCK_MAX * US_FACTOR)));
6165

6266
/* When test performs time measurement using Timer in sequence, then measurement error accumulates
6367
* in the successive attempts. */

0 commit comments

Comments
 (0)