AnsweredAssumed Answered

STM32CubeMX possible bug

Question asked by Eugene on Oct 30, 2016
Latest reply on Jan 20, 2017 by Sirma Siang
I use STM32CubeMX v 4.17.0 to configure CMSIS SPI Driver. I believe I do right DMA configuration:

spidma.PNG

But after code generation file MX_Device.h hasn't defines to enable DMA for SPI.  

/* DMA Configuration */
 
/* DMA SPI2_TX */
 
/* DMA SPI2_RX */

So, I have to modify it to enable DMA:

/* DMA Configuration */
 
/* DMA SPI2_TX */
#define MX_SPI2_TX_DMA_Instance                 DMA1_Stream4
 
/* DMA SPI2_RX */
#define MX_SPI2_RX_DMA_Instance                 DMA1_Stream3

Outcomes