Expand description
SPI frames started by a hardware trigger, received into a ring of blocks.
For devices that signal each sample with a data-ready edge. Each trigger edge (an EXTI event,
a timer, …) starts one frame of TSIZE words, with an NSS pulse if the Spi drives NSS
(Spi::new_with_nss). A third DMA channel, gated by the trigger, restarts the SPI; the
SPI’s own channels fill the ring and send the same frame each time. No CPU time per frame.
With a CRC (Config::crc), failed frames are marked per block (Block::is_valid). This
needs InterruptHandler bound to the SPI’s interrupt.
Structs§
- Block
- One block of frames, borrowed from the ring.
- Config
- Stream configuration.
- Descriptors
- DMA descriptors and per-block state. Must outlive the stream, in memory the DMA reaches.
- Interrupt
Handler - SPI interrupt handler for
TriggeredFrames: marks CRC failures and counts overruns. - Triggered
Frames - A stream of triggered frames. Dropping it stops the stream and restores the
Spi.
Enums§
- Error
- Stream error.
Constants§
- MAX_
FRAMES_ PER_ BLOCK - Maximum frames per block (the bad-frame marks are 64 bits).
Traits§
- Interrupt
Instance - An SPI instance with an interrupt of its own.