The tinySA ULTRA now enumerates as a composite device: the CDC serial
port plus a mass storage interface (Bulk-Only Transport, SCSI). The SD
card is only presented to the PC in USB DISK mode (STORAGE menu or shell
command 'usbdisk on|off'), which stops sweeping and screen updates so the
mass storage thread owns SPI1 and spi_buffer. Outside the mode the PC
sees an empty card reader, so the serial port never re-enumerates. The
mode ends on touch, jog button, eject from the PC, card removal or
'usbdisk off'.
- usb_msc.c/h: mass storage thread, BOT state machine, SCSI commands
- usbcfg.c: composite descriptors (IAD, bcdDevice 0x0201), bulk EP3,
requests hook, packet memory reuse on a repeated SET_CONFIGURATION and
data toggle reset on CLEAR_FEATURE (both specific to this ChibiOS fork)
- ui.c: USB DISK menu item and mode screen
- main.c: 'usbdisk' command; shell commands that could use SPI1 are
refused while the mode is active
F072 builds are unchanged. Tested on HW V0.5.4 with Windows 11: about
620 KB/s read and 370 KB/s write, data verified against FatFs reads.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
get a fixed string format for USB version string parsing
fix left border ver display for v1.2-3-g.., 1.2-34-g.. and 1.2-3456-g..
changes to make dfu (build *.dfu) and make flash (switch to dfu mode)
Signed-off-by: Martin <Ho-Ro@users.noreply.github.com>
use same name as PRODUCT from Makefile, either tinySA or tinySA4
report FW version as v1.3-nnn-gxxxxxxx in USB descriptor, see dmesg log:
[ +1,567891] usb 1-1: new full-speed USB device number 121 using uhci_hcd
[ +0,179094] usb 1-1: New USB device found, idVendor=0483, idProduct=5740, bcdDevice= 2.00
[ +0,000008] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ +0,000005] usb 1-1: Product: tinySA
[ +0,000005] usb 1-1: Manufacturer: tinysa.org
[ +0,000004] usb 1-1: SerialNumber: v1.3-498-gf04006f
[ +0,003544] cdc_acm 1-1:1.0: ttyACM0: USB ACM device
Signed-off-by: Martin <Ho-Ro@users.noreply.github.com>