This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Thingy52 Costume Firmware - Logging Module Issue - Lagging BLE Notificatio

Hello Dev-Community,

I have modified the Thingy Firmware for a custom made board which has also the MPU9250 with TWI connected. Everything works fine, if i use RTT Viewer. But when i don't show the log, the ble service notification doesn't send any notification anymore. I believe it is, because the LOG Buffer is overflowing or something.

Some Information:
Uses SDK 13.0.0 with that Logging Module

SEGGER Studio IDE 4.01

Maybe someone experienced the same and can give me a good work around. 

Thanks for the Help,

Dominik Pflumm

Parents
  • I think when you do not open the RTT viewer, the buffer of the logs are overflowing causing a stack corruption. Please check in your sdk_config.h file to configure the logs buffer properly. 

    Make sure that you set this NRF_LOG_ALLOW_OVERFLOW to 1. So that the oldest log buffer can be overwritten. Even though it is set to 0, it should not spill out of the logs buffer, but i am suspecting that there might be a bug there (guessing)

    Increase NRF_LOG_BUFSIZE.

    Also do not have too many logs to print, split your logs into different categories (// <1=> Error ,// <2=> Warning,
    // <3=> Info,// <4=> Debug ) And only set NRF_LOG_DEFAULT_LEVEL that you want to print. 

  • Thank you for the response. Since Thingy is running with SDK 13. There is no NRF_LOG_ALLOW_OVERFLOW. And also i disabled the logging module (and tried everything else) and still the same thing happends. As soon as i connect my RTT Viewer to the NRF52 the TMS Service works perfectly. But when i let it run by itself, its not sending anything or rarely something.

    What happenes when i connect RTT Viewer? Maybe it has something to do with the Segger RTT files? 

    I would appreciate again your help.

    Thanks,
    Dominik Pflumm

  • DominikP93 said:
    As soon as i connect my RTT Viewer to the NRF52 the TMS Service works perfectly

     This seems like a bug somewhere. Can you try something, can you please comment out the sleep functions in the code (sd_app_evt_wait) throughout your code and see if there is any difference. This is to rule out something I saw on one chip and want to rule out certain possibilities.

    If commenting out sd_app_evt_wait still has the same behavior and your code does not work without debugger connected, then I need to reproduce it here at my desk. It could either be a timing issue in your code.

Reply
  • DominikP93 said:
    As soon as i connect my RTT Viewer to the NRF52 the TMS Service works perfectly

     This seems like a bug somewhere. Can you try something, can you please comment out the sleep functions in the code (sd_app_evt_wait) throughout your code and see if there is any difference. This is to rule out something I saw on one chip and want to rule out certain possibilities.

    If commenting out sd_app_evt_wait still has the same behavior and your code does not work without debugger connected, then I need to reproduce it here at my desk. It could either be a timing issue in your code.

Children
Related