Saturday, August 19th 2017, 10:22pm UTC+2

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to SEGGER Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

Zmiter

Beginner

Date of registration: Apr 19th 2017

Posts: 4

1

Saturday, April 22nd 2017, 2:37pm

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.

SEGGER - Johannes

Super Moderator

Date of registration: Aug 31st 2012

Posts: 352

2

Wednesday, June 21st 2017, 4:36pm

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