2025ΒΆ

Custom GPS Synchronized PTP/NTP Timeserver on STM32

Work in progress

This page is under construction as I find time to migrate my notes.

[TODO: picture of the hardware]

This page details a GPS-referenced Stratum 1 network time server with support for Precision Time Protocol (PTP, IEEE 1588) and NTPv4 (RFC 5905). It is implemented on a STMicro NUCLEO-H563ZI.

Initially, this project was just to get bare-metal Ethernet working on the STM32H563ZI. Once I had that working, I figured I'd use it to do something useful.

tiny-riscv: A small RV32E CPU

tiny-riscv is (true to its uninspired name) an attempt to build the smallest RISC-V core possible while maintaing roughly one Instruction per Cycle. It achieves this by supporting the base RV32E instruction set with a simple two stage pipeline. The implementation targets the FreePDK45nm standard cell library.

core_diagram A very simplified diagram of the core pipeline