|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
Directories | |
| inc | |
| src | |
The write-path counterpart to the read-only MSC self-loops: it exercises the host-to-device bulk-OUT data phase (SCSI WRITE(10)). The two USB ports are cabled to each other and one firmware image runs both stacks.
USBFS on J11 is the device: a ThreadX + USBX Mass-Storage class exposing a single writable logical unit backed by a small RAM disk, whose media_write copies host data in and whose media_read serves it back. USBHS on J7 is the polled first-party host: it enumerates the device, WRITE(10)s a deterministic per-LBA pattern across the whole disk in bursts, then READ(10)s it back and byte-checks every sector against the same pattern.
Because the host writes the data and reads it back, the loop proves the device bulk-OUT WRITE data phase round-trips intact over USB on chip – the capability that gates writable OSPI, CDC and HID. s_dbg_mismatch holds the first differing sector, or an all-ones sentinel when every sector matched.
All four have to be right together; any one missing stalls or corrupts the transfer, and this app is what proves them on hardware.
FS device: P4_07 VBUS sense, P5_00 VBUSEN GPIO low, P8_14/P8_15 data (PSEL usb_fs). HS host: SW4-8 to Host via the U15 expander, PD07 high so U18 powers J7, P4_08 VBUS sense (PSEL usb_hs). Console on PD_02/PD_03, SCI8.
The device side advertises VID 0x1209, PID 0x0014. Bench use only.