We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi,
I am trying to measure the time between two breakpoints by using Registers -> Internal -> Sec property. But when i change the core speed, these time values do not change. Does this property use core clock for measuring time or another source?
You are running the simulator?
There is a menu setting where you tell the core speed - this is separately from where your actual code sets up PLL etc to configure core speed.
But the simulator isn't cycle-perfect - it doesn't know all about wait states, cache misses etc.
When using the real hardware, you can use a hw timer that you start/stop to measure calendar time between two events.
I am using the real hardware.
It seems that there is no way for measuring cpu clock cycles except using hw timer.
By the way, thanks for the reply :)
What parts are you using? Most M3/M4 contain the DWT_CYCCNT, 32-bit counter running at core speed.
infocenter.arm.com/.../index.jsp
The crystal speed in the Target menu is of next to no value. When using the SWV/SWO trace you need to plug in the actual core frequency in the Debug->Trace pane.
Thanks a lot :)
This solves my problem. Because trace frequency was set to 10 Mhz, changing core frequency didn't affect sec variable. Now i set it to my core frequency and everything works perfect.