Skip to content

Commit 8f2a29f

Browse files
committed
drivers: modem: hl78xx: reduce startup_ms and increase init chat timeout
The previous delay could cause missed URCs because the pipe and chat layer were not yet attached when the modem started sending its first messages (+KSUP). The modem boot takes ~1.8s, while the driver only needs ~120ms to set up the interfaces, so reducing the delay ensures the receiver is ready before the modem outputs any URCs. Increase hl78xx_init_chat_script command limit from 10 to 100 to allow longer initialization sequences. Signed-off-by: Zafer SEN <[email protected]>
1 parent 5bdd2ff commit 8f2a29f

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

drivers/modem/hl78xx/Kconfig.hl78xx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -801,14 +801,17 @@ config MODEM_HL78XX_DEV_RESET_PULSE_DURATION_MS
801801

802802
config MODEM_HL78XX_DEV_STARTUP_TIME_MS
803803
int "Wait before assuming the device is ready."
804-
default 1000
804+
default 120
805805
help
806-
The expected time (in milliseconds) the modem needs to fully power on
807-
and become operational.
806+
The expected delay time (in milliseconds) the modem needs to fully power on
807+
and become operational.This delay before the driver opens the UART pipe
808+
and attaches the chat layer. The value must be long enough for the driver
809+
startup code to initialize, but short enough to ensure the pipe is ready
810+
before the modem sends its first URCs during boot.
808811

809812
config MODEM_HL78XX_DEV_SHUTDOWN_TIME_MS
810813
int "Wait before assuming the device is completely off."
811-
default 1000
814+
default 120
812815
help
813816
The amount of time (in milliseconds) the system should wait for the modem
814817
to fully shut down

drivers/modem/hl78xx/hl78xx_chat.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ MODEM_CHAT_SCRIPT_CMDS_DEFINE(hl78xx_init_chat_script_cmds,
148148
MODEM_CHAT_SCRIPT_CMD_RESP("AT+CEREG=5", hl78xx_ok_match));
149149

150150
MODEM_CHAT_SCRIPT_DEFINE(hl78xx_init_chat_script, hl78xx_init_chat_script_cmds,
151-
hl78xx_abort_matches, hl78xx_chat_callback_handler, 10);
151+
hl78xx_abort_matches, hl78xx_chat_callback_handler, 100);
152152

153153
/* Post-restart script (moved from hl78xx.c) */
154154
MODEM_CHAT_SCRIPT_CMDS_DEFINE(hl78xx_post_restart_chat_script_cmds,

0 commit comments

Comments
 (0)