Hello all,
I read (in a tutorial from T.I.) that the following live sets the system clock to 40MHz:
SysCtlClockSet(SYSCTL_SYSDIV_5|SYSCTL_USE_PLL|SYSCTL_OSC_MAIN|SYSCTL_XTAL_16MHZ);
Why is this? Shouldn't it be set at 16/5 = 3.2 MHz ??
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello all,
I read (in a tutorial from T.I.) that the following live sets the system clock to 40MHz:
SysCtlClockSet(SYSCTL_SYSDIV_5|SYSCTL_USE_PLL|SYSCTL_OSC_MAIN|SYSCTL_XTAL_16MHZ);
Why is this? Shouldn't it be set at 16/5 = 3.2 MHz ??
Hi Amit,
My firm doesn't use these parts often enough anymore for me to know - is not, "SYSCTL_SYSDIV_5" sufficiently vague - as to justify poster's question? I cannot recall if - when using just external xtal or xtal osc - that - "SYSCTL_SYSDIV_5" is (then) legal.
Appears that, "SYSCTL_SYSDIV_PLL_5" would prove superior in that "actual identification of the system clock source" is defined.
Yes you (for sure) and long-time users (even moi) "know & often employ the PLL" - thus we succeed thru past use familiarity. But not thru any real clarity conveyed by the source parameter's (ambiguous) wordage! And how can SYSCTL (possibly) trump PLL - w/in that parameter - that's not justifiable!
Insider info & user familiarity should not trump, "clarity of expression!"
Thanks Luis - poster's logic was without fault (that I could note) - I chose to, "point out the obvious."
Too often - experience & "insider knowledge" take the place of proper, well-thought & defined - explanation. That's not, "How things should be!"
My suggestion of a tighter (i.e. "some") linking of "What's being divided" appears a valid improvement. (and will be "noted" - perhaps "duly" yet I'd not "hold my breath" awaiting implementation.)