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

When we transfair the big amound of data via RTT "port" the data is corrupted.

Hi, everyone,

We are developing the BLE project on nRF52832 chip by using RTT / UART logging. Previously we monitored the project via UART communication port. But than we had to use the UART port for other purpose and due to this reason we migrated the monitoring to the RTT Segger comunication method. But when we did it we saw that when we transmit a large amount of the data, the data is shawn corrupted. We tried to monitor the project by enabling UART or RTT logging separately and even together to troubleshoot the problem and then we discovered that when we enable UART only the data is translated correctly, when we enable UART and RTT together the data is transfared correctly too on both of them. And when we enable RTT only - only in this case the data that is sent via it is corrupted.

What maybe the problem? What must we check in the project?

Parents
  • Check SEGGER_RTT_Conf.h, SEGGER_RTT_MODE_DEFAULT definition.

    The default SEGGER_RTT_MODE_NO_BLOCK_SKIP will throw data away once the RTT buffers are full. You can try SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL, but that may cause your application to hang when the debugger is disconnected.

  • Thank you very much, 

    This helped me and works clearer although sometemes the corruptions can exist.

    But the debugger disconnection disturbs me:

    The application can hang only during the debugger disconnection or can hang also when it started to work without any debugger connected to it?

    Can I keep the this option "SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL" for relising or I must use it for debugging only and when I relise the program for everyday usage I must return this option back to "SEGGER_RTT_MODE_NO_BLOCK_SKIP"?

Reply
  • Thank you very much, 

    This helped me and works clearer although sometemes the corruptions can exist.

    But the debugger disconnection disturbs me:

    The application can hang only during the debugger disconnection or can hang also when it started to work without any debugger connected to it?

    Can I keep the this option "SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL" for relising or I must use it for debugging only and when I relise the program for everyday usage I must return this option back to "SEGGER_RTT_MODE_NO_BLOCK_SKIP"?

Children
Related