diff --git a/components/bt/common/ble_log/src/ble_log_rt.c b/components/bt/common/ble_log/src/ble_log_rt.c index c055dcd0fc..b2aabe6c80 100644 --- a/components/bt/common/ble_log/src/ble_log_rt.c +++ b/components/bt/common/ble_log/src/ble_log_rt.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2025-2026 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -185,8 +185,15 @@ BLE_LOG_IRAM_ATTR void ble_log_rt_queue_trans(ble_log_prph_trans_t **trans) if (BLE_LOG_IN_ISR()) { BaseType_t woken = pdFALSE; + /* Queue depth == total transport buffer count; queue-full is impossible + * for a valid transport, so the return value is not checked. */ xQueueSendFromISR(rt_queue_handle, trans, &woken); portYIELD_FROM_ISR(woken); + } else if (xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED) { + /* Non-blocking send to avoid configASSERT when scheduler is suspended + * (e.g., during light sleep transitions). Queue-full is impossible; + * see comment above. */ + xQueueSend(rt_queue_handle, trans, 0); } else { xQueueSend(rt_queue_handle, trans, portMAX_DELAY); }