cancel
Showing results for 
Search instead for 
Did you mean: 

Stm32f429 dma data width change on the fly

prothan
Associate II
Posted on June 29, 2015 at 09:13

Stm32f429 dma data width change on the fly

2 REPLIES 2
Posted on June 29, 2015 at 15:02

I'd expect you'd have to stop it, and then restart it with the new settings you want.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
prothan
Associate II
Posted on June 30, 2015 at 06:56

clive1,

Thanks, looks like my msg got cut off, but that is the answer I was looking for. Does this look good as far as reconfiguring the tx stream.

Thanks

void dmareconfig(uint32_t PeriphDataAlignment,uint32_t MemDataAlignment){      

    

      __HAL_DMA_DISABLE(SpiHandle.hdmatx);

      __HAL_SPI_DISABLE(&SpiHandle);

      

      static DMA_HandleTypeDef  hdma_tx =  SpiHandle.hdmatx;

      hdma_tx.Init.PeriphDataAlignment = PeriphDataAlignment;

      hdma_tx.Init.MemDataAlignment    = MemDataAlignment;

      

      __HAL_SPI_ENABLE(&SpiHandle);

      __HAL_DMA_ENABLE(SpiHandle.hdmatx);    

}