SystemView and variable CPU clock

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

  • SystemView and variable CPU clock

    Hi. Is it possible to use SystemView with variable system and CPU clocking?
    I use energy saving modes in my board, so sytem clock goes down when no big calculations needed.
    If I init SystemView with SystemCoreClock setted to 288MHz, then after switching to a lower clock 36MHz I got wrong measurements. And vice a versa.
    Using reinitialisation with different clock values resets measurements and I loose all previos data.
    I use no OS and Cortex-M7 CPU.

    So, what should I do and is it a right way to deal with my situation?
    Thanks.
  • Hi,

    Please excuse the delay in response.

    It is not possible to use SystemView with variable timestamp frequency,
    so you will need to provide a fixed frequency for the timestamp even when the CPU speed changes.

    In SEGGER_SYSVIEW_Conf.h SEGGER_SYSVIEW_GET_TIMESTAMP() is defined as simply returning the Cortex-M cycle counter.
    You can change this to call SEGGER_SYSVIEW_X_GetTimestamp() instead and implement this function in your application.

    You can for example use the SysTick timer as shown in SEGGER_SYSVIEW_Config_embOS_CM0.c and convert the tick count accordingly to the configured timestamp frequency and the current CPU frequency.

    Best regards Johannes