File tree Expand file tree Collapse file tree 4 files changed +9
-9
lines changed
drivers/tests/TESTS/mbed_drivers/ticker
targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_MIMXRT105x Expand file tree Collapse file tree 4 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 18
18
#include " greentea-client/test_env.h"
19
19
#include " utest/utest.h"
20
20
#include " unity/unity.h"
21
- #include < cinttypes>
22
21
23
22
#if !DEVICE_USTICKER
24
23
#error [NOT_SUPPORTED] test not supported
@@ -185,9 +184,7 @@ void test_multi_ticker(void)
185
184
ticker[i].attach (callback (increment_multi_counter), MULTI_TICKER_TIME);
186
185
}
187
186
188
- printf (" before sleep: %" PRIu32 " \n " , us_ticker_read ());
189
187
ThisThread::sleep_for (MULTI_TICKER_TIME + extra_wait);
190
- printf (" after sleep: %" PRIu32 " \n " , us_ticker_read ());
191
188
192
189
TEST_ASSERT_EQUAL (TICKER_COUNT, multi_counter);
193
190
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright 2023 NXP
3
+ * All rights reserved.
4
+ *
5
+ * SPDX-License-Identifier: BSD-3-Clause
6
+ */
7
+
1
8
#ifndef _CLOCK_CONFIG_H_
2
9
#define _CLOCK_CONFIG_H_
3
10
Original file line number Diff line number Diff line change @@ -391,15 +391,14 @@ void vPortPOST_SLEEP_PROCESSING(clock_mode_t powermode)
391
391
// Override of MIMXRT SDK delay function.
392
392
// The default delay function used the full CPU clock frequency, so it produced massive overshoots
393
393
// (delaying 30x longer than intended) when the MCU is exiting sleep (and core clock is reduced to 24MHz).
394
- // This delay function uses the us ticker which always ticks at the same speed when the CPU clock is reduced.
394
+ // This delay function uses the us ticker which always ticks at the same speed even when the CPU clock is reduced.
395
395
void SDK_DelayAtLeastUs (uint32_t delay_us )
396
396
{
397
397
uint32_t initialTickerValue = us_ticker_read ();
398
398
uint32_t targetTickerValue = delay_us + initialTickerValue ;
399
399
400
400
// Wait for rollover if needed
401
- if (targetTickerValue < initialTickerValue )
402
- {
401
+ if (targetTickerValue < initialTickerValue ) {
403
402
while (us_ticker_read () > initialTickerValue ) {}
404
403
}
405
404
Original file line number Diff line number Diff line change 20
20
#include "fsl_pit.h"
21
21
#include "clock_config.h"
22
22
23
- #include "stdio.h"
24
- #include "inttypes.h"
25
-
26
23
const ticker_info_t * us_ticker_get_info ()
27
24
{
28
25
static const ticker_info_t info = {
You can’t perform that action at this time.
0 commit comments