stmhal: Use polling, not DMA, for 1 byte SPI transfers.
There is an issue sending 1 byte on the SPI bus using DMA, but it only occurs when the transmit is done for the first time after initialising the SPI and DMA peripherals. All other cases (sending 2 or more bytes, doing send_recv, doing recv first) work okay. We sidestep this issue by using polling (not DMA) for all 1 byte transfers. This is fine because a 1 byte transfer can't be interrupted and doesn't need the benefits of DMA (and using polling for this case is more efficient). Resolves #1456.
Showing
Please register or sign in to comment