Prototype of my next project - a PTP clock with a 1,000,000fps, 1us display, with a true displayed accuracy of better than 500ns with respect to PTP time. No, I don't know why this is useful. Maybe some high speed photography setup with a need for absolute timestamping (though I imagine this is something already offered by high speed camera setups).
I think I've got most of the hard timing stuff sorted out now, and the synchronization with PTP and display updating is working. It needs some polish, custom PCB, a case, POE, etc. but the concept is pretty much proven. Next step is to design that PCB to get away from Nucleo dev board while I continue working on the firmware.
Learned a bunch about DMA to get the us display working. The last two digits have their own SPI bus because there's barely time to transmit the 16 bits at max clock within 1us. To make this work practically, I generate a 100-entry table of display updates, and just DMA circularly through it with transfers triggered by a PTP synchronized timer. Synchronized timers also generate the display latch signals which actually update the display. Getting it all to work was tricky, it uses 3 cascaded timer peripherals, 2 DMAs and 3 different ISRs to handle the time sync and display updates.
Actually validating the time offset of the _displayed_ value will be interesting. I'm thinking a fast photodiode on one or the digits or something. No idea what the actual time delay of an LED is (though it should be well less than 100ns I think).
PS I'm not sure what's going on with the minutes display, but ignore that, it's some assembly issue or a bad chip. Whatever it is isn't too pertinent to the timing etc. problems I've been solving.
#timenuts