RH01T9k: SPI Peripheral Emulator
RH01T9k is a programmable SPI peripheral emulator that lets engineers test embedded firmware without a physical sensor or peripheral. A Python API configures repeatable register values, SPI responses, and transaction behavior while the real controller communicates over a physical SPI bus.
Built on the Tang Nano 9K FPGA, RH01T9k can replace an SPI sensor or peripheral during firmware testing, hardware-in-the-loop (HIL) testing, and automated hardware validation.
Why emulate an SPI peripheral?
Physical sensors do not always provide the repeatable states, edge cases, or invalid responses needed for firmware testing.
RH01T9k lets tests provide controlled SPI responses such as:
- incorrect device IDs
- synthetic sensor data
- repeatable register states
- boundary and error conditions
How it works
The MCU runs its normal firmware while RH01T9k replaces the target SPI peripheral.
Python configures the emulated peripheral. The MCU then communicates with RH01T9k using normal SPI transactions.
MOSI and MISO transactions can also be captured for debugging and automated test verification.
Current features
- SPI modes 0–3, tested up to 20 MHz
- Configurable SPI read/write command decoding
- Configurable address decoding
- 256-byte programmable register space
- Single and burst register access
- Configurable response delay
- Triggered SPI transaction capture
Planned features
- Fault and error injection
- Command-map mode for custom SPI protocols
- GPIO interrupt and sideband signal emulation