[email protected] wrote: > Hello all, > > did anyone ever attempted (or succeeded too) in porting the ntpd pll > loop to obtain a synchronized time on a microcontroller with pps and > serial input (nmea or other it doesn't really matter)? Is anyone > aware of similar projects? > Thanks > > Frank
Well, we did something similar on a Motorola 68360 some 15 years ago. I don't have sources for that, but the idea was quite close to the windoze port of NTP. We used a periodic interrupt timer (PIT) which was actually controlled by a bi-phase counter register. The system had a master PPS signal and the clock deviation was used to adjust the counter/divider ratios. So effectively we had a simple PLL for the clock on an embedded controller; not NTP controlled, alas, but a working PLL nevertheless. I think the windoze port gives some good ideas how to deal with the problem, because it uses an API call to adjust the clock speed of the windoze system clock.(Have a look at 'ports/winnt/ntpd/nt_clockstuff.c') *How* to modify the clock speed on your embedded controller is something entirely different. I don't have any idea if this a useful hint for you, but IMHO the details will greatly depend on your hardware, while the general problem (using a PLL without an PLL-API enhanced kernel) was already solved, at least for windoze. (I'm aware that using NTPD on windoze is quite similar to trying to adjust a wrist watch with a two-pound hammer. Or, as it is the case, quite round the other way.) -- juergen 'pearly' perlinger "It's hard to make new errors!" _______________________________________________ questions mailing list [email protected] https://lists.ntp.org/mailman/listinfo/questions
