**** BEGIN LOGGING AT Sun May 31 02:59:57 2020 May 31 11:30:24 zmatt: looking at your subarctic 2.x pins sheet, which of the pwm outputs actually maps to timer4? May 31 11:32:00 ?? the one called "timer 4" May 31 11:32:09 P8.07 May 31 11:32:26 (mode 2) May 31 11:33:56 oh, but that's also the capture input? May 31 11:34:51 yes, you configure the direction of the pin with bit 14 of the timer's config register May 31 11:35:38 ok, there goes the idea of having a single timer for both functions... May 31 11:37:08 so, that'll need a bit more thinking then. May 31 11:37:15 I think I'm getting increasingly confused at what sort of complicated setup you're making, lol May 31 11:41:25 it'S not all that complex if you think about it... May 31 11:41:46 thinking is hard May 31 11:43:44 so what are you capturing? the pps from the gps, for the purpose of locking your clock to gps by adjusting the 10 MHz osc? May 31 11:44:02 for a precise timing signal, you want an edge right on top of the UTC second with as little jitter as you can make it. The GPS delivers such signal, but it's only accurate over alonger period (hundreds of seconds). the one-second accuracy is actually pretty poor. May 31 11:44:46 right, so you have the high-stability osc and control it to lock onto gps May 31 11:44:56 a good oscillator delivers that stability, but it's of course not accurate. So you lock it to the GPS with a very slow PLL May 31 11:46:55 now, you want to generate a precise 1PPS pulse, so you clock a timer with the locked oscillator and generate a pulse every 10 million cycles May 31 11:47:12 but, you need to select the correct edge May 31 11:47:45 "select the correct edge" ? May 31 11:47:51 so, you connect the Gps timestamp signal to the capture input May 31 11:48:39 yes, the 10MHz clock edges are all phase locked to the GPS, but on which edge do you output the pulse? May 31 11:49:16 ehm, wait May 31 11:50:20 I assumed what you meant was that you capture the GPS 1Hz to adjust your 10 MHz clock such that the 1 Hz derived from that phase-locks onto the GPS using a PLL (implemented in software) May 31 11:50:52 that's the basic idea, yes May 31 11:52:06 so what you mean "on which edge do you output the pulse?" ... it's every 10 million cycles of your 10 MHz counter and the initial phase is irrelevant since it'll get locked onto the GPS using the PLL May 31 11:52:22 you also want the phase angle to be 0 May 31 11:52:32 right.. which is what a PLL does May 31 11:52:41 being the "phase locked" in phase locked loop May 31 11:54:32 yes, now you understood why you need to capture the gps pulse with the timer, right? May 31 11:55:07 I still think using a purpose-designed chip for this would make more sense May 31 11:55:11 yes, your choice of words ("select the correct edge") just didn't make sense and confused me May 31 12:01:12 using two timers shouldn't be too much of a problem... though starting them with very tight synchronization may require slightly ugly code :P setting both timers to posted mode and setting the enable bit in both of them with back-to-back writes will probably synchronize them within a single 10 MHz cycle May 31 12:12:16 mru: the clock synchronizer you showed is more expensive than my whole BOM including the OCXO and PCB ;) May 31 12:14:43 mru: not including the GPS of course May 31 12:16:15 zmatt: you have 10 million anonymous edges every second, of course you need to find the "right" one ;) May 31 12:17:38 thinkfat_: ??? they're not anonymous since you're dividing it down by a factor of 10000000 and generate an 1 Hz clock/pulse from it May 31 12:19:25 unless you mean you want to try to initialize your pps with (approximately) the correct phase to reduce the initial lock time May 31 12:22:36 I thought I was clear on what you were doing and just assumed you used an odd choice of words, but you're now starting to make me think there's still some misunderstanding here May 31 12:22:48 no, there isn't May 31 12:27:00 it's just that "[13:44] right, so you have the high-stability osc and control it to lock onto gps" is a bit broad as a description. you can "lock" an oscillator to GPS and still know nothing about the time, since the phase lock can be on any of the 10 million clock edges. May 31 12:27:18 you'll just get a very stable clock out of this May 31 12:28:25 i.e. there is absolutely a misunderstanding here May 31 12:28:41 this sounds like you're locking onto a 10 MHz from the GPS rather than onto its 1 Hz pps May 31 12:30:18 no, I'm locking onto the time signal from the GPS. But I'm not dividing it down to 1Hz in hardware. If I did that, there'd be no need to artificially generate a 1Hz pulse ;) May 31 12:30:52 I mean, you're configuring a hardware timer to do that job for you May 31 12:31:49 yes, but I need a more precise phase discriminator than 100ns May 31 12:32:39 ehh, well then you can't use a dmtimer clocked at 10 MHz for that purpose May 31 12:32:46 indeed May 31 12:32:56 and I don't May 31 12:32:57 so... what's the capture input for again? May 31 12:33:41 I have a disciminator that has a range of 2µs. But that isn't quite enough, obviously May 31 12:34:06 the capture input is to provide the missing timespan May 31 12:34:12 ah okay, capture input for coarse adjustment, time to digital for fine-tuning May 31 12:34:19 exactly! May 31 12:41:07 that TI chip I mentioned was just the first example I found May 31 12:42:02 and it's not more expensive than a beagle May 31 12:46:08 yes, but I'd still need a beagle to have a NTP / PTP server May 31 12:46:22 or for visualization and diagnosis May 31 12:53:28 also, if I'm not mistaken, the clock sync chip will give me nothing but a precise clock. May 31 12:53:31 but no time May 31 13:09:34 so it makes totally sense to get as much out of the beagles functions as possible Jun 01 01:00:39 GenTooMan: If you are around, what would make it easy to play a loop on video for .gif files on my BBGW? Jun 01 01:03:06 I have a numpy, gizeh, and imageio w/ moviepy thing going on w/ the BBGW. I found some source and I want to test it. I used vlc but to no avail. Jun 01 01:49:50 I found gif-for-cli. Wish me luck! Jun 01 02:00:13 It works! **** ENDING LOGGING AT Mon Jun 01 02:59:57 2020