Jump to content

I can´t undertand SysCtlClockGet() behaviour

Recommended Posts

     Hi there, I would really appreciate any  help here. Assuming ClockVal defined as


unsigned long Clockval=0

     After executing this 2 lines of code...    

ClockVal = SysCtlClockGet();

     What should be the correct value of Clockval? A friend of mine reported 40,000.000  meaning 40 Mhz using IAR, in my case running Keil I get 3,200000 or 3.2 Mhz, does abybody have a clue for this weird value??

Thanks a lot in advance





P.S.  1) We both use Stellaris LM4F120 LaunchPad Evaluation Kit


P.S.  2) It´s my first post so please bear with me if it´s not formaly correct.

Link to post
Share on other sites



Following will set the Stellaris Launchpad at 80Mhz


What this means is - You are instructing the PLL to run to 400Mhz using the 16Mhz as input to it. The PLL is then divided by 2 internally in hardware, and then 2.5

400/2/2.5 = 80

SysCtlClockGet() will give you 80000000Hz.

ClockVal = SysCtlClockGet();

400/2/5 = 40Mhz


Explained here too.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...