2014-07-15 08:26 AM
Dear
I have read Ch16.2 Trace component DWT, the definition guide of Cortex M3 2nd. But I still confuse it. If I take the CYCCNT, the corresponding time is CYCCNT * 168 MHz * 1e9 ?Am I correct? Thanks2014-07-15 08:36 AM
You understand the basic relationship between frequency and period, right?
At 168 MHz each tick is about 5.95ns[DEAD LINK /public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/How%20to%20convert%20the%20systick%20to%20ns&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B&TopicsView=https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/AllItems.aspx¤tviews=5]https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=%2fpublic%2fSTe2ecommunities%2fmcu%2fLists%2fcortex_mx_stm32%2fHow%20to%20convert%20the%20systick%20to%20ns&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B&TopicsView=https%3A%2F%2Fmy.st.com%2Fpublic%2FSTe2ecommunities%2Fmcu%2FLists%2Fcortex_mx_stm32%2FAllItems.aspx¤tviews=52014-07-15 08:49 AM
2014-07-15 08:58 AM
This forum does not work well with smartphones or tablets
>> CYCCNT * 168 MHz * 1e9 You need to make an initial, and final measurement, and subtract them to understand how many ticks occurred in the measurement period. Then (DeltaTicks / 168000000.0) * 1e9 would give you nanoseconds