Use DMA with SPI acting as a (simple) shift register?
I've (sort of) found out a way to store GPIO states in memory with DMA (parallel data input from a 74HC595 shift register, because the STM32F103Cx doesn't have 4 SPI peripherals) and I want to output that same data via SPI in a similar manner, except in higher frequency bursts triggered by timer interrupts (the output is synced to the input.) I also have 2 of these inputs/outputs (16 pins for the parallel input, 2 SPI pins for the output) that would need to work at the same time.
It would be something like DMA request -> memory byte transfer to SPI shift register buffer -> transfer buffer into working shift register -> increment memory address -> shift out byte at slave clock frequency -> repeat process until desired amount of bytes are shifted out and transfer complete interrupt flag is set, interrupt code is executed.
The SPI data register is 16 bits wide, assuming from what the reference manual says, 8 bits for Tx and 8 bits for Rx. It doesn't indicate whether Tx is the 8 MSB's or LSB's. Whichever it is, that will be the target register for the memory-to-peripheral DMA transfer.
I presume that I configure what DMA does in main(), and it's autonomous except for interrupts.
Also, I need the GPIO input buffering to generate a half-transfer interrupt so the SPI output knows when to start working. ST's HAL functions are making no sense to me, so I want to stick with using the registers directly.
(I'm also confused at the lack of a "half-transfer interrupt" or a "transfer complete interrupt" checkbox for each of the DMA channels in the NVIC section in STM32CubeIDE, to generate code in stm32f1xx_it.c. Why isn't that a thing?)