File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
TESTS/mbed_drivers/timeout Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -305,14 +305,19 @@ void test_deepsleep(void)
305
305
LowPowerTimer timer;
306
306
307
307
/*
308
- * Since deepsleep() may shut down the UART peripheral, we wait for 10ms
308
+ * Since deepsleep() may shut down the UART peripheral, we wait for 20ms
309
309
* to allow for hardware serial buffers to completely flush.
310
+ *
311
+ * Take NUMAKER_PFM_NUC472 as an example:
312
+ * Its UART peripheral has 16-byte Tx FIFO. With baud rate set to 9600, flush
313
+ * Tx FIFO would take: 16 * 8 * 1000 / 9600 = 13.3 (ms). So set wait time to
314
+ * 20ms here for safe.
310
315
311
316
* This should be replaced with a better function that checks if the
312
317
* hardware buffers are empty. However, such an API does not exist now,
313
318
* so we'll use the wait_ms() function for now.
314
319
*/
315
- wait_ms (10 );
320
+ wait_ms (20 );
316
321
317
322
timer.start ();
318
323
timeout.attach_callback (mbed::callback (sem_callback, &sem), delay_us);
You can’t perform that action at this time.
0 commit comments