Skip to content

Commit b18f690

Browse files
committed
Fix Greentea test code
Mark mbed-os-tests-mbed_hal-common_tickers/time_cpu_cycles not in-lined. Otherwise, time_cpu_cycles may be in-lined somewhere and takes different CPU cycles on invocation.
1 parent 7caec46 commit b18f690

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

TESTS/mbed_hal/common_tickers/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ unsigned int ticker_overflow_delta;
5252

5353
/* Auxiliary function to count ticker ticks elapsed during execution of N cycles of empty while loop.
5454
* Parameter <step> is used to disable compiler optimisation. */
55+
MBED_NOINLINE
5556
uint32_t count_ticks(uint32_t cycles, uint32_t step)
5657
{
5758
register uint32_t reg_cycles = cycles;

0 commit comments

Comments
 (0)