Describes how to use ST7 microcontroller's 8-bit SPI to emulate a 16-bit SPI slave
The document describes a method for receiving 16-bit words via the ST7 SPI cell, which utilizes double buffering with two 8-bit registers (a read register and a shift register). The hardware manages the shifting of bits while software accesses the read register to retrieve previously received data before the next byte arrives.
The note details the timing analysis required for this emulation, calculating that the maximum achievable baud rate is 2 MBaud when the internal frequency (fcpy) is 8 MHz. It provides C code examples for interrupt routines and assembly disassembly, along with measurement results confirming that the software can read data fast enough to prevent bit loss at this speed.
The maximum baud rate that can be reached is 2 MBaud.
The time needed to release the data register is 4 microseconds at 2 MBaud.