A motor-control PWM that cannot shoot through its own half-bridges
The Zen Motor-Control PWM is a purpose-built controller for motor drive and power conversion — four complementary output pairs from a shared counter, each pair guarded by hardware dead-time so the high- and low-side switches of a half-bridge can never conduct at once. An asynchronous fault/brake input forces every output to a safe state within two cycles and latches there until software clears it. It is for integrators building inverters, synchronous converters, and safety-critical drives. Product / integrator view; every number is sourced from the product datasheet or marked TBC.
1. The PWM in one paragraph
A prescaled counter runs center-aligned (up/down — the motor-control default, symmetric with lower harmonics) or edge-aligned (up/wrap), shared across all channels. Each channel compares that counter against its own duty register to form a raw waveform, which feeds a per-channel dead-time inserter: on every edge, both sides of the pair are forced inactive for the dead band before the turning-on side asserts. The output stage then drives a complementary pair (pwm_h / pwm_l) per channel, gated by a safety layer that answers an async fault/brake input — one wire from a gate-driver desat or over-current comparator forces all outputs safe and freezes the counter, latched until software clears it.
- PWM datapath
- host / power stage
- safety gate
2. What it is, at a glance
| Element | Detail | Default | Status |
|---|---|---|---|
| Complementary pairs | per-channel pwm_h / pwm_l from a shared counter | 4 | exists |
| Counter alignment | center (up/down) or edge (up/wrap), per channel-wide control | center | exists |
| Period / duty width | 16-bit period; 16-bit per-channel compare | 16-bit | exists |
| Dead-time insertion | both sides forced off each edge, in counter ticks | 0–255 | exists |
| Async fault/brake | fault_i, sticky latch, or SW force-off → all outputs safe | — | exists |
| Fault response | outputs safe and counter frozen, latched until SW-clear | ≤ 2 cyc | exists |
| Output polarity | active-high or inverted, both pins together | active-high | exists |
| Prescaler | tick every PRESC+1 clocks, divide up to 65536 | 16-bit | exists |
| Interrupt | one line — period event + fault, each maskable | 1 | exists |
| Max PWM frequency at node | depends on characterized clock | TBC | TBC |
Sources: Zen PWM product datasheet — overview, features, functional, performance, register map.
3. How a client uses it
- Instantiate the core and tie each complementary pair to a half-bridge gate driver; wire the power stage's fault signal (desat, over-current, over-temp, or e-stop) into
fault_i. - Configure period, prescaler, and dead-time; pick center-aligned for a motor bridge or edge-aligned for a converter; set polarity to match the gate driver's disable level.
- Run and regulate — update each channel's duty from the control loop, typically once per period on the period interrupt; enable channels individually.
- React to faults — on
fault_ior a software brake, hardware forces every output safe within two cycles and holds there; software reads the latch, acts, and writes fault-clear to resume once the counter restarts clean.
4. Verification & provenance
- Shoot-through proven, not asserted: a test samples
pwm_h & pwm_levery clock over multiple periods, both alignments, all four channels — zero violations. The fault-safe test first proves the PWM was actively switching, so a pass cannot be hollow. - Coverage: 11 of 11 assertion-based tests pass — reset, register readback, edge- and center-aligned duty, dead-time width, shoot-through, fault-safe-state, software force-off, channel independence, period interrupt, and polarity. Independently re-run on a fresh copy.
- Synthesis discipline: clean synthesis with zero inferred latches. The native bus attaches via standard ARM APB4 or AXI4-Lite frontends.
Sources read
Sources: Zen PWM product datasheet — overview, features & compliance, applications, functional overview, performance, register map, verification & deliverables, ordering & licensing; as-built RTL.