diff --git a/subsys/bluetooth/host/monitor.c b/subsys/bluetooth/host/monitor.c index a02f115c966a..10f18c3435d7 100644 --- a/subsys/bluetooth/host/monitor.c +++ b/subsys/bluetooth/host/monitor.c @@ -126,13 +126,12 @@ static void monitor_send(const void *data, size_t len) } if (!drop) { - if (!panic_mode) { - SEGGER_RTT_LOCK(); - } - cnt = SEGGER_RTT_WriteNoLock(CONFIG_BT_DEBUG_MONITOR_RTT_BUFFER, - rtt_buf, rtt_buf_offset); - if (!panic_mode) { - SEGGER_RTT_UNLOCK(); + if (panic_mode) { + cnt = SEGGER_RTT_WriteNoLock(CONFIG_BT_DEBUG_MONITOR_RTT_BUFFER, + rtt_buf, rtt_buf_offset); + } else { + cnt = SEGGER_RTT_Write(CONFIG_BT_DEBUG_MONITOR_RTT_BUFFER, + rtt_buf, rtt_buf_offset); } }