Loading...
 

SW4STM32 and SW4Linux fully supports the STM32MP1 asymmetric multicore Cortex/A7+M4 MPUs

   With System Workbench for Linux, Embedded Linux on the STM32MP1 family of MPUs from ST was never as simple to build and maintain, even for newcomers in the Linux world. And, if you install System Workbench for Linux in System Workbench for STM32 you can seamlessly develop and debug asymmetric applications running partly on Linux, partly on the Cortex-M4.
You can get more information from the ac6-tools website and download (registration required) various documents highlighting:

System Workbench for STM32


SPI Rx DMA with variable length data

Well, I believe I found a way to implement this...
I changed changed by CS pin to act as an external interrupt that triggers on the rising edge. I call my SPI DMA setup function as usual. Then when I receive the callback for this interrupt (ie CS has gone high), I call HAL_DMA_Stop(). The buffer I provided the DMA when setting it up now has my data in it.
I’m surprised no one else has had to deal with this before and that I couldn’t find any forums talking about it. I’ve tested it out with various sized buffers and everything appears to be working how I want. If anyone reading this, knows of a “gotcha” that I haven’t found yet, please let me know.