[ABANDONED] RTT timing

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

  • [ABANDONED] RTT timing

    Hi,
    In my application I have a Cortex-M4 that sample some voltages from ADCs at about 10kHz sampling rate with an interrupt routine.
    I use RTT inside the interrupt routine to send the samples to my PC, with also other informations.
    I'm able to save all the data with my PC at a data rate of about 250KB/s and it works very well.
    Now I would like to receive the samples one by one at 10kHz, but I can only receive block of data at a rate of about 70Hz (I don't know if this value depend on my RTT MCU configuration?).
    The idea is to do this in a loop:
    1. use RTT to receive the samples in the PC
    2. do some processing in the PC
    3. use RTT to send some processed data to the MCU
    4. the MCU will set some output using the processed data
    Do you have any suggestions?

    Thanks
  • RTT has no guaranteed timing.
    J-Link polls the RTT control block on the target for new data, as fast as possible and whenever there is data, it is read.
    The point is to get data out of the target as fast as possible, so buffers on the target can be kept small.

    Not sure what exactly you are asking for and what the point is of reading the samples one by one.
    It is just against the concept of RTT…
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • As the SDK is not free of charge / open, I recommend to use the official support channel for it. (See signature below my post)
    Otherwise, your posts may get hidden / deleted.


    BR
    Alex
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Hi Alex,
    I have another question.
    You wrote that "RTT has no guaranteed timing" and I know you are correct, but I'm just wondering how you did the measurement highlighted here:

    wiki.segger.com/RTT#Performance

    For example there you can read:

    " An average line of text can be output in one microsecond or less"

    Can you define what you mean with "output":
    - the mcu under debug
    - the jlink
    - the usb bus
    - the Windows driver
    - the J-Link RTT Viewer

    Thanks
  • The statement you quoted refers to the tome needed on the MCU side to get that line into the RTT buffer.
    This is “the important time” because it is basically the time that your application is blocked from doing its normal work.
    When the buffer is actually emptied / read by J-Link, is not really of interest, as long as the buffer does not run full, which would cause data loss or delaying the application work.


    BR
    Alex
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Hi Alex,
    Thank you for the clarification.
    I agree with you for "the important time", anyway now I'm interested in the whole time to receive the data to the PC application.
    I think I'm almost there, but when I try to send some data to the mcu I see it adds some delays that are too much for my needs.
    As last question: do you think Jtrace can provide some improvement regarding this last point? I see it use Usb3 instead of Usb2: did you made any RTT test with it to check if there are any difference regarding timing performance?
    Thanks
  • As the bottleneck is mainly the debug interface, USB3 probably gives a bit of better performance over USB2 in this discipline but if it is significant or even crucial, is something only you know.

    I do not have any USB2 vs. USB3 RTT comparisons at hand.

    I still don’t know what exactly you are trying to do (don’t get it fully from your initial post)
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.