From 7cb62dd9b00f0eb28dcc3a12608f181eb668ca77 Mon Sep 17 00:00:00 2001 From: Baocheng Su Date: Tue, 17 Oct 2023 11:26:38 +0800 Subject: [PATCH] switchserial: Increase the CP2102N reset delay to 1s Per observation, CP2102N reset takes more than 30 ms to finish, increase the assertion to 1 second to improve the stability. Signed-off-by: Baocheng Su --- recipes-app/switchserialmode/files/src/serial/cp2102n.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-app/switchserialmode/files/src/serial/cp2102n.c b/recipes-app/switchserialmode/files/src/serial/cp2102n.c index 153dac1a0..b0cebe0d1 100644 --- a/recipes-app/switchserialmode/files/src/serial/cp2102n.c +++ b/recipes-app/switchserialmode/files/src/serial/cp2102n.c @@ -242,7 +242,7 @@ static void cp2102n_hardware_reset(void) */ if (ADVANCED_BOARD_PG1 != get_board_type()) { gpio_set("CP2102N-RESET", 0); - usleep(30 * 1000); + sleep(1); gpio_set("CP2102N-RESET", 1); sleep(1); }