Skip to main content

Module pps

Module pps 

Source
Expand description

The PPS link: one transaction per 25 ms slot, so a tick never skips a beat.

The module NACKs a transaction addressed right after another one ended, so no two transactions ever run back to back. SCHEDULE gives each 25 ms slot one purpose; per 100 ms tick:

SlotPurposeTransaction
0Slot::Commandwrite the setpoints (or ENABLE = 0, if a disable is due)
1Slot::Readread the bank 0x04..=0x1F
2Slot::Enablewrite ENABLE, only if the bank disagrees with the setpoint
3Slot::Readread the bank

So a command reaches the module within one tick, a reading is never older than 50 ms, and every write is verified by the next read. The spacing is enforced, not assumed: a stalled executor skips slots (next_slot_start) instead of running them back to back, and the board’s power read, which shares the bus, takes a slot of its own once a second (Slot::Aux). The output is only enabled once the bank shows the commanded setpoints: the module applies them whether or not it is enabled, so enabling first would run the old ones.

The loop never stops. A failing link is reported as an episode (first error, then once a second, then recovery); a module that never answered is probed once a second rather than at the slot rate.

Re-exports§

pub use crate::driver::pps::PpsError;
pub use crate::driver::pps::PpsRunningMode;
pub use crate::io::pps_plan::PPS_SLOT_MS;
pub use crate::io::pps_plan::PPS_TICK_MS;
pub use crate::io::pps_plan::PpsSetpoint;
pub use crate::io::pps_plan::SCHEDULE;
pub use crate::io::pps_plan::Slot;

Structs§

PpsReadings
One bank read, as the consumer sees it.
PpsResources

Functions§

pps_loop