2015-03-06 06:15 AM
With a clock module connected to the OSCin (HSE) does the chip start up using that or does the internal osc start the MCU and a s/w setup change over to the external clock? Otherwise how does it know what frequency is being input?
#external-clock #clock #stm32f3032015-03-06 07:43 AM
STM32 chips always start using the HSI clock, which they know.
You have to manually start all external clocks, and you express their speed to the software/compiler via the HSE_VALUE define, and this way the software can figure out what baud rate divider, etc, to program into the registers by doing the math based on the numbers supplied. If you fail to do that, stuff gets broken. Some System Loader USB implementations will start external clocks, and benchmark them against the internal clock to pick one of a small subset of supported clock speeds/crystals.2015-03-06 07:46 AM
Thanks. It seems the HSI clock starts first from what I can make out. I want to use a 16.384MHz module to provide a super stable HSE clock. Any problems I am likely to encounter, given that the HSI starts with 8MHz?
2015-03-06 08:08 AM
Any problems I am likely to encounter, given that the HSI starts with 8MHz?
I don't know, what do you perceive as a threat? The normal model is to transition to a HSE/PLL based clock via SystemInit() prior to your main() seeing the light of day. +/-1ppm stability (not accuracy), figuring a TCXO, not sure 16.384 MHz is a standard offering, trying to do telecom? 16.368 MHz would have a lot higher run rates, and you could probably find a +/-0.5ppm Do you plan on running at the HSE speed? or using the PLL/VCO? I haven't checked the F3, but the others will take a XO input from 1-50 MHz (vs 4-26 MHz for just a crystal).2015-03-06 08:42 AM
I will be using THD3004-16.384MHz temp compensated. Accuracy 0.28ppm and stability 4ppm over 15 years. The major reason for this is that I am measuring a time-of-flight to a resolution of 1ppm, so any drift in the clock really hurts it.
I am assuming I can feed it in directly and do a divide by 2 to make it look like the HSI speed2015-03-06 08:53 AM
> I will be using THD3004-16.384MHz temp compensated. Accuracy 0.28ppm and stability 4ppm over 15 years.
> The major reason for this is that I am measuring a time-of-flight to a resolution of 1ppm, so any drift in the clock really hurts it. Doesn't that call for short-term stability, rather than absolute precision and long-term stability? Of course the latter can't hurt, and I am not really interested in your project, just commenting. Also, do you plan to use the PLL? If so, have you considered its jitter? JW2015-03-06 09:05 AM
I am assuming I can feed it in directly and do a divide by 2 to make it look like the HSI speed
But what in your model does doing that buy you? The faster clock would give you better granularity. Looks to be one of PLE's standard builds, figure it targets 2.048 MHz telco applications.2015-03-06 09:10 AM
Doesn't that call for short-term stability, rather than absolute precision and long-term stability?
The short term is probably tighter, but arguably unknown drift unless calibrated out at time of use. Presumably Gary is going to characterize the delivered part at final test.2015-03-09 01:04 AM
I have assumed that jitter will average out. The typical ToF is in the hundreds of uS and I sample and average that over 100x per second
2015-03-09 01:07 AM
What that 16.384 gets me is a cheap(ish) modules. Other frequencies are rather more expensive, especially lower frequency ones