SPI transfer size using DMA peripheral flow control mode
I need to transfer data between two micro controllers - both short commands and large blocks of data.
The STM will receive and so will be the SPI slave. I intend to use DMA.
The SPI master will transmit either short or long packets and so need a way to receive variable lengths using DMA - I could not find an example & wanted a quick start.
My guess is that if I should use hdma_tx.Init.Mode=DMA_PFCTRL & hope that means that the slave transaction will complete once master completes brings CS high? Anyone tried this? Other than adding a length field to the packet, how may I get the number of bytes transferred?
Perhaps a easier route is to capture the SPI complete event?
In either case I wonder what the meaning of 'SIze' in the HAL_SPI_*** calls becomes.
