[SOLVED] Questions on SystemViewer

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

  • [SOLVED] Questions on SystemViewer

    Hello,
    i have just started testing the SystemViewer on EmbOS 4.14 on a STM32 (ARM Cortex M3) device.
    I have two main questions:
    - Which is the best debug compilation to use when SystemViewer is enabled?? _dp?? __dt?? i can still see some overflows (CPU clock 50MHz, JTAG 12,5MHz).
    I assume that using a lighter compilation could help with this. BTW, I usually use _dp.
    - How can "fast interrupts" be considered by the SystemViewer?? I have tried to include them by:
    SEGGER_SYSVIEW_SendSysDesc("I#xx=FASTINTERRUPT_IRQHandler"); But it doesn´t work.
    I noticed that including a SYSVIEW call like "SEGGER_SYSVIEW_OnUserStart(1);" the fast interrupt activity can be logged. But still the viewer considers it as part of Idle Task usage.

    Regards,
    Josema.
  • Hello Josema,

    Both configurations, dp and dt, include Systemview. dt additionally includes tracing, which is not required when using SystemViewer only.

    Overflow events occur when the SystemVIew RTT buffer is full.

    This can happen for following reasons:

    • J-Link is kept busy by a debugger and cannot read the data fast enough.
    • The target interface speed is too low to read the data fast enough.
    • The application generates too many events to fit into the buffer.

    To prevent this:

    • Minimize the interactions of the debugger with J-Link while the target is running. (i.e. disable live watches)
    • Select a higher interface speed in all instances connected to J-Link. (i.e. The debugger and SystemViewer)
    • Choose a larger buffer for SystemView. (1 - 4 kByte)
    • Run SystemViewer stand-alone without a debugger.
    Fast interrupts, which do not call OS_EnterInterrupt have to call SEGGER_SYSVIEW_RecordEnterISR() and SEGGER_SYSVIEW_RecordExitISR() in order to be recorded.
    Please be aware that SystemView causes some overhead to record events,
    and should not be used in high-frequency interrupts, like UART interrupts.
    Additionally, to prevent recording from being interrupted by another interrupt, you should define SEGGER_SYSVIEW_LOCK() / SEGGER_RTT_LOCK() to mask all interrupts which generate SystemView events. (Default is 128)

    Best regards
    Johannes
  • Hello Johannes,
    I was just using SystemViewer stand-alone to run the code, so I have increased both SEGGER_SYSVIEW_RTT_BUFFER_SIZE and JLINK speed to CPU_SPEED/2. This has made overflows disappear.

    Also tried SEGGER_SYSVIEW_RecordEnterISR() and SEGGER_SYSVIEW_RecordExitISR(), that was exactly what i needed.

    Many thanks,
    Josema.