[SOLVED] RTT dropping data?

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] RTT dropping data?

    Has anyone seen issues with RTT writes dropping data?
    A test of just dumping values incrementing from 1...1024 in a loop shows that it skips large chunks of data.
    for (i = 0; i < I2S_BLOCK_SIZE; i++)
    SEGGER_RTT_printf(0, "%d,", i);
    I am viewing the output data with "J-Link RTT Viewer" on Windoze.
    This is using Embedded Studio 3.52a and the latest RTT viewer.
    The test device is an nRF52832. The Bluetooth radio is not active during the test.

    Are there any RTT related config parameters that I can tweak to optimize for a high speed data stream?
    If there are known limitations with RTT at high speed, can anyone suggest a better method to get data out of the device for analysis?


  • Hello Joe,

    From what you describe, it seems to me that using a different RTT Mode fixes the issue you are experiencing.
    In general, there are 3 different modes that RTT can be in, which change the way that buffered RTT data is handled:

    C Source Code

    1. //
    2. // Operating modes. Define behavior if buffer is full (not enough space for entire message)
    3. //
    4. SEGGER_RTT_MODE_NO_BLOCK_SKIP // Skip. Do not block, output nothing. (Default)
    5. SEGGER_RTT_MODE_NO_BLOCK_TRIM // Trim: Do not block, output as much as fits.
    6. SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL // Block: Wait until there is space in the buffer.

    Could you try and change the SEGGER_RTT_MODE_DEFAULT preprocessor define in your application to SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL? Like this:


    That way you should not experience any data loss.
    Best regards,