diff --git a/examples/chef/nrfconnect/rpc.overlay b/examples/chef/nrfconnect/rpc.overlay index 858c311b616306..e3b08a0a2a5178 100644 --- a/examples/chef/nrfconnect/rpc.overlay +++ b/examples/chef/nrfconnect/rpc.overlay @@ -48,3 +48,7 @@ CONFIG_LOG_OUTPUT=y # Increase zephyr tty rx buffer CONFIG_CONSOLE_GETCHAR_BUFSIZE=128 + +# Increase BLE thread stack size +CONFIG_BT_RX_STACK_SIZE=2048 + diff --git a/examples/lighting-app/nrfconnect/rpc.overlay b/examples/lighting-app/nrfconnect/rpc.overlay index a97621181efc75..315349a69555e2 100644 --- a/examples/lighting-app/nrfconnect/rpc.overlay +++ b/examples/lighting-app/nrfconnect/rpc.overlay @@ -45,3 +45,7 @@ CONFIG_LOG_OUTPUT=y # Increase zephyr tty rx buffer CONFIG_CONSOLE_GETCHAR_BUFSIZE=128 + +# Increase BLE thread stack size +CONFIG_BT_RX_STACK_SIZE=2048 + diff --git a/examples/platform/nrfconnect/util/PigweedLogger.cpp b/examples/platform/nrfconnect/util/PigweedLogger.cpp index 851dd445ceff23..1fb02366596a5d 100644 --- a/examples/platform/nrfconnect/util/PigweedLogger.cpp +++ b/examples/platform/nrfconnect/util/PigweedLogger.cpp @@ -100,29 +100,24 @@ void init(const log_backend *) void processMessage(const struct log_backend * const backend, union log_msg_generic * msg) { + if (sIsPanicMode || k_is_in_isr()) + { + return; + } + int ret = k_sem_take(&sLoggerLock, K_FOREVER); assert(ret == 0); - if (!sIsPanicMode) - { - log_format_func_t outputFunc = log_format_func_t_get(LOG_OUTPUT_TEXT); + log_format_func_t outputFunc = log_format_func_t_get(LOG_OUTPUT_TEXT); - outputFunc(&pigweedLogOutput, &msg->log, log_backend_std_get_flags()); - } + outputFunc(&pigweedLogOutput, &msg->log, log_backend_std_get_flags()); k_sem_give(&sLoggerLock); } void panic(const log_backend *) { - int ret = k_sem_take(&sLoggerLock, K_FOREVER); - assert(ret == 0); - - log_backend_std_panic(&pigweedLogOutput); - flush(); sIsPanicMode = true; - - k_sem_give(&sLoggerLock); } const log_backend_api pigweedLogApi = {