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

RTT log output is delayed

I'm writing some DVT tests what I'd like to see the output from the test display in real time on a RTT log.  By real time I mean that if a log statement prints something, I'd like to see it appear in the log within a second or so.

What I'm seeing is that the output doesn't appear until after my program has completed.  I'm using deferred logging and am periodically processing the log in the loop that executing the test.

I'm using SDK 15.3.0 with SES 4.20 running on a nRF52840 DK.

I've created a small project that illustrates what I'm seeing with documentation on the actual output verses the expected:

https://gitlab.com/repoocaj/nordic_log_test

The project is setup for CI and the hex files that I'm testing with can be downloaded at:

https://gitlab.com/repoocaj/nordic_log_test/-/jobs/319163866/artifacts/download

I'm sure I'm missing something simple but just can't find it.  I'd appreciate any suggestions as to what I might be doing wrong.

Thanks,

Jeff

  • I loaded app-release.hex on one of my boards and it looks like it works correctly for me:

    https://imgur.com/a/PqUGrwA

    Incidentally, when I typically use the segger RTT viewer I like to use putty for a socket connection to it.  The output typically looks better and it seems to behave better for us that way.  I also bring that up to point out that when you're connected it to it that way the viewer itself changes behavior:

    https://imgur.com/a/Xvk7TVW

    Are you sure you don't have some other tool connecting to your RTT viewer and affecting it in some way?

     

  • Thanks for confirming that my code is working.

    I can't duplicate my original results, it's running as I expected to in the first place.

    The idea that something else might have been interfering is interesting.  The only thing that might have been also connected would have been the SEGGER Embedded Studio.  I've also been switching between nRF52832 and nRF52840 projects without exiting the IDE.  I'll also start the JLinkExe in a terminal window while the IDE is running (but not running or debugging on a board).  Perhaps I ran into an edge case in the IDE.

    I'll have to keep a watch out for it and see if I run into it again.

Related