sm1000_main: Re-calibrate SysTick timer
authorsjlongland <sjlongland@01035d8c-6547-0410-b346-abe4f91aad63>
Sat, 24 Oct 2015 23:13:07 +0000 (23:13 +0000)
committersjlongland <sjlongland@01035d8c-6547-0410-b346-abe4f91aad63>
Sat, 24 Oct 2015 23:13:07 +0000 (23:13 +0000)
commitdd9679ecc9777a094591b4779ce32e61dd36b0dd
tree079ca1c580ace167e1d2b62d74cf96235fa376c9
parent83b8c9e97c9b63b3bd9a60a487198f981e2b9b29
sm1000_main: Re-calibrate SysTick timer

Not sure why, but SysTick was being calibrated with a period equal to
the core frequency divided by 168000.

Apparently this was supposed to give millisecond ticks.  SystemCoreClock
gives the frequency of the core clock, and if you supply this value to
SysTick_Config, you get a 1 second tick timer.

Dividing this by 1000 seems to give much better timing results.  The
time-out timer almost works now.

git-svn-id: https://svn.code.sf.net/p/freetel/code@2470 01035d8c-6547-0410-b346-abe4f91aad63
codec2-dev/stm32/src/sm1000_main.c