Tuesday, November 21st 2017, 3:00pm UTC+1

You are not logged in.

  • Login
  • Register

Reply

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.

Message information
Message
Settings
Automatically converts internet addresses into links by adding [url] and [/url] around them.
Smiley code in your message such as :) is automatically displayed as image.
You can use BBCode to format your message, if this option is enabled.
Security measure

Please enter the letters that are shown in the picture below (without spaces, and upper or lower case can be used).

The last 3 posts

Thursday, June 22nd 2017, 11:47am

by SEGGER - Johannes

Hi,

Regarding the 0 timestamps:

This can happen when the DWT unit is not enabled.
On Cortex-M3/4 the timestamp is generated from the DWT->CYCCNT, so the cycle counter needs to be enabled and to do this the DWT needs to be enabled as well.
This is usually done by the debugger, but can also be done by the application.

if ((CoreDebug->DEMCR & CoreDebug_DEMCR_TRCENA_Msk) == 0) {
CoreDebug->DEMCR |= 1 << CoreDebug_DEMCR_TRCENA_Pos; // Enable DWT in DEMCR if not done, yet.
}
DWT->CTRL |= 1 << DWT_CTRL_CYCCNTENA_Pos; // Enable CYCCNT in DWT_CTRL.

When there has been a debug session running or you connected with J-Link before, and read the data without a reset,
then the CYCCNT might have still been enabled and the application generated real timestamps.

If you do not want to use the CYCCNT, you can of course configure SystemView for any other timestamp source, i.e. the SysTick, too.

Regards
Johannes

Wednesday, June 21st 2017, 3:59pm

by SEGGER - Johannes

Hi,

Thanks for the positive feedback.

You are right, in the SystemView FreeRTOS interface task information is only added or updated, but not removed.
We will add this to the interface. find attached a preliminary version. Does this work for you?

Regarding timestamps, the only reason why timestamps could be 0 is, when the timestamp configuration is not part of the recording.
In the SystemView configuration make sure that SEGGER_SYSVIEW_SYNC_PERIOD_SHIFT fits with your SystemView buffer size.
Try increasing your buffer size or decreasing SEGGER_SYSVIEW_SYNC_PERIOD_SHIFT.
If this does not help, could you send a recording with corrupted timestamps?

Regards
Johannes
SEGGER - Johannes has attached the following files:

Friday, May 19th 2017, 1:43am

by bgerold

SystemView and freeRTOS

Hi,

We are attempting to use SystemView V2.5 with freeRTOS V9 CM3 port. The current plan is to use both real time record mode, and postmortem mode.

This is the first I have ever worked with this tool and I am very impressed thus far, but after some initial testing I have a few questions.

It looks like when running in postmortem mode the SystemView library maintains an array containing task information and status. However, it appears that the list is not being updated whenever a task is deleted. I am then seeing that this eventually leads to a hard fault when _cbSendTaskList calls uxTaskGetStackHighWaterMark with an invalid task handle. Is this the case, or have I missed something? Our application frequently deletes tasks and it looks like the library could be easily modified to handle this, but I wanted to make sure that I'm headed down the right road before putting in the effort.

Also, when I import postmortem data, I usually have all zeros for the timestamps. Occasionally all of the timestamps show up so I am assuming that something is being corrupted, but I'm not sure where to start looking.

Thanks,
B. Gerold