Using SPI on STM32H7 in mixed mode, normal and DMA.
I am working on a STM32H723 microcontroller and I am trying to use and SPI communication in mixed mode, i.e. normal and DMA.
The reason I need this is because I have a third party software stack for a device that is set up in a certain way, and it cyclically has to send small packets before sendind a big packet of user data. The application requires hard real-timeness so I want this exchange to be as fast and as little CPU blocking as possible. Considering these transfers must follow a certain order and that the stack I'm using is not organised as a state machine, I can only send the little packets in blocking mode, but then I'd like to send the big packet in DMA mode.
The problem I'm encountering is that after using once the SPI transfer in DMA mode, the blocking transfers don't work anymore. When debugging I see that the periphery becomes permanently busy when trying to perform a normal transfer after using it in DMA mode in the previous cycle.
I'd like to know whether it's possible to use an SPI periphery in this kind of mixed mode and if it is, what are the steps required to prepare the periphery for a normal transfer after performing a transfer in DMA mode.
Thanks,
Ion
