cancel
Showing results for 
Search instead for 
Did you mean: 

How to convert the systick to ns ?

gapryun
Associate II
Posted on July 15, 2014 at 16:18

Dear

I have read Ch14.1 Systicks the definition guide of Cortex M3 2nd. But I still confuse it. 

If I take the Systicks Reload = 65536, the corresponding time is 65536 * 168 MHz * 1e9 ?

Am I correct?  

Thanks 
3 REPLIES 3
Posted on July 15, 2014 at 16:32

Take the reciprocal of the source clock and multiply out the ticks, then multiply by 1e9 for units in nanoseconds.

For 168 MHz, and SysTick at 21 MHz, each tick is roughly 47.62ns
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
gapryun
Associate II
Posted on July 15, 2014 at 17:49

Sorry, clivel, My smartphone have strange problem so it did not submit my question.  For now, I have updated. And thank you for your nice reply.

Posted on July 15, 2014 at 18:00

Ok some basic math issues here

nano seconds per tick = (1 / 168,000,000) * 1,000,000,000

  or 1000 / 168

1 Billion nano seconds in a second

168 Thousand ticks per second

Divide 168 Thousand into 1 Billion to know number of nano seconds per tick

If being clocked at HCLK/8 then use the 21 MHz number, or whatever it is for given clock configuration.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..