Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Terminal crushes in SDK v14.2 while in SDK v14.1 it didn't hapen.

Hi,

We are developing the BLE project by using nRF52832 module.

This project we had started to develop on SDK v14.1 and it worked perfectly. But then we have migrated it to SDK v14.2 and here appeared the problem with terminal.

We print to terminal the program statuses by using the macro “NRF_LOG_RAW_INFO()”. According to the requirements in the previous, SDK v14.1 version we put the strings in it by using the “NRF_LOG_PUSH()” macro and after each “NRF_LOG_RAW_INFO()” macro we added “NRF_LOG_FLUSH()” macro to let the terminal finish the printing before sending the new part of information.

In SDK v14.1 this method worked perfectly, but in SDK v14.2 the terminal printing began to crash after n runs of the NRF_LOG_RAW_INFO() and NRF_LOG_PUSH() commands.

We tried to shrink the portions of information to let the printing less data, but the crushes didn't disappeared, but only moved to another places of the algorithm instead where was run the “NRF_LOG_PUSH()” macro.

But every time when the crush happens, according to Call Stack, it happens in internal function "bool nrf_log_frontend_dequeue(void)", on line 777 of "nrf_log_frontend.c" file where is executed the command "if (nrf_log_backend_is_enabled(p_backend) == true)".

And in reffering to function "__STATIC_INLINE bool nrf_log_backend_is_enabled(nrf_log_backend_t const * p_backend)" that is run from this 777-th line the crush hapens on the command "return p_backend->enabled;" in line 207 of file "nrf_log_backend_interface.h".

Than is executed the "HardFault_Handler:" in assembler on line 300 in file "gcc_startup_nrf52.S".

 

We also tried to change the NRF_LOG_BACKEND_UART_TEMP_BUFFER_SIZE (== 128) , NRF_LOG_MSGPOOL_ELEMENT_SIZE (== 20) and NRF_LOG_MSGPOOL_ELEMENT_COUNT (== 8) (The NRF_LOG_BACKEND_UART_TEMP_BUFFER_SIZE  was changed from 64 to 128 previousely in version SDK v14.1 to solve the previous problems), but anything didn't halp us in SDK v14.2.

 

What maybe the problem?

Related