Can't enable logs (ESB example)

Hi, I need to trace some data using logs (via Putty) on ESB communications between two devices.
My problem is that the provide ESB example is supposed to log many things but it doesn't.
If you enable logs, then the app freezes.

I'm using SEGGER IDE

In the SDK (14.1 in my case), the "radio" example works perfectly
...nRF5_SDK_14.1\examples\peripheral\radio\transmitter\
It runs, transmits data, and all logs appear in the TTY

Now if you take the ESB example
...\nRF5_SDK_14.1\examples\proprietary_rf\esb_ptx\
nothing is logged.
It happens that the log is disabled. Once you enable it in the sdk_config.h file, first you have to add missing log files (n/f_log_default_backends.c), and then the app is freezing.
If you debug via SEGGER, as soon as you arrive on the first NRF_LOG_DEBUG, everything is frozen. If you don't debug but just run the app, the board doesn't work, the LEDs are supposed to blink, but it is also frozen.
So obviously, the ESB example doesn't like logging.

Any idea on how to make that provided ESB example work with logging?
Thanks for any help.

Parents
  • Hi Steve

    I remember having some issues with this back in the day, and I made my own version of the standard examples with UART logging enabled. Also, I modified the folder structure slightly to allow me to have one base folder for both the PTX and PRX examples. 

    I don't remember exactly what I changed anymore, but I have included the code below for your reference: 

    esb_template_ptx_prx.zip

    Please note that this example was made for v15.3.0 of the SDK, I couldn't find any code for earlier versions. 

    Best regards
    Torbjørn

  • Hi Torbjørn,

    Thanks for your help. I'm going to look at your source code.
    It looks like we both ended up with the same idea. I took peripherals/radio examples and stripped them of all non essential code and added all ESB features I needed and ended up with a working version that allows logs. Had to add some libraries too but it now works.

    What surprised me is that if I just enable logging from the esb example, it freezes everything. Probably a leftovers from Nordic copy/paste from other examples that conflict with UART or something else. It happens to everybody. Don't have time right now to compare my version with theirs as I have to finalize my product, but will certainly come back once released.

    Steve

  • Hi Steve

    I tried to diff sdk_config.h from my example and the originals, and one of the few differences I could find of importance was that NRF_LOG_DEFERRED was set in my example while not in the original. Why deferred logging would be required I am not sure though, UART logging should work fine without using the deferred setting. 

    I also have a lot of other work on my plate at the moment, but if you want to investigate this further later on feel free to open a new ticket on it and we can take a closer look. 

    Best regards
    Torbjørn

  • Sure, thanks for your help.
    Just like you, my plate is full now, working to implement FHSS communication thanks to your Daniel Veilleux colleague. But will sure reopen the ticket when I have time.

    Steve

  • Hi Steve

    Sounds like you're in good hands then, best of luck with your protocol Slight smile

    I will park the case for now. 

    Regards
    Torbjørn

Reply Children
No Data
Related