Skip to main content
gapryun
Associate II
July 15, 2014
Question

How to convert the systick to ns ?

  • July 15, 2014
  • 3 replies
  • 1581 views
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 
    This topic has been closed for replies.

    3 replies

    Tesla DeLorean
    Guru
    July 15, 2014
    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 VenmoUp vote any posts that you find helpful, it shows what's working..
    gapryun
    gapryunAuthor
    Associate II
    July 15, 2014
    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.

    Tesla DeLorean
    Guru
    July 15, 2014
    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 VenmoUp vote any posts that you find helpful, it shows what's working..