200 likes | 434 Views
MPC 555: Queued Serial Module. MPC 555 QSM. QSPI: Queued Serial Peripheral Interface: full duplex serial, synchronous interface. 160B of queue RAM. SCI1 & 2 : serial communication interfaces. QSM Block Diagram. QSM Configuration Register. QSM Interrupts. QSM Configuration Register.
E N D
MPC 555 QSM QSPI: Queued Serial Peripheral Interface: full duplex serial, synchronous interface. 160B of queue RAM. SCI1 & 2: serial communication interfaces
QSPI • 2 wire half duplex or 3-wire full duplex. • Many baud rates, clocking, and interrupt options. • Transfer chunks (serial) 8-16 bits. • 160B RAM stores data (in and out), and commands/control words. • CPU can queue up to 32 serial transfers in one interaction. • A pointer points to the data to be transferred. Normally incremented after each transfer.
QSPI contd. • QSPI has its own 4 chip-select pins. • The queued transfer commands can be run in a loop in wrap-around mode. • A standard delay of 17 IMB cycles (0.8µs) between two transfer commands (chunks of serial transfer).
QSPI Programming 0000: 16 bits; 1000: 8 bits; 1001: 9 bits; ….; 1111: 15 bits
QSPI Programming • SPSR: QSPI Status register, a 8-bit subfield of SPCR3. • Many other sources of interrupt --- each with its own status and interrupt enable bit. • HALTA: Halt ack. • MODF: mode fault flag.
QSPI RAM Only CPU can write Right justified
RAM Commands Multiple peripheral CS can be asserted CONT: continue asserting CS after transfer completed.
QSPI Overall operation QSPI RAM each entry: 1 word of transmit data, 1 word of receive data, 1B of command CPU writes the command queue of QSPI CPU writes transmit data and enables QSPI. QSPI completes the transfer, sets the completion flag SPIF SPE bit in SPCR1 to enable the QSPI. When done QSPI disables itself. If HALT in SPCR3 on, then QSPI halts after each serial transfer and sets HALTA.
QSPI Interrupt sources • Three sources of interrupt (all on the same vector). • SPIF (finished). • MODF: Mode fault (inconsistent configuration). • HALTA: acknowledge HALT.