diff --git a/subsys/shell/shell.c b/subsys/shell/shell.c index 291a0fb3396..c113c83b424 100644 --- a/subsys/shell/shell.c +++ b/subsys/shell/shell.c @@ -1330,10 +1330,6 @@ void shell_thread(void *shell_handle, void *arg_log_backend, k_mutex_lock(&shell->ctx->wr_mtx, K_FOREVER); - if (shell->iface->api->update) { - shell->iface->api->update(shell->iface); - } - shell_signal_handle(shell, SHELL_SIGNAL_KILL, kill_handler); shell_signal_handle(shell, SHELL_SIGNAL_RXRDY, shell_process); if (IS_ENABLED(CONFIG_SHELL_LOG_BACKEND)) { @@ -1341,6 +1337,10 @@ void shell_thread(void *shell_handle, void *arg_log_backend, shell_log_process); } + if (shell->iface->api->update) { + shell->iface->api->update(shell->iface); + } + k_mutex_unlock(&shell->ctx->wr_mtx); } }