Skip to main content
prothan
Associate II
June 29, 2015
Question

Stm32f429 dma data width change on the fly

  • June 29, 2015
  • 2 replies
  • 634 views
Posted on June 29, 2015 at 09:13

Stm32f429 dma data width change on the fly

    This topic has been closed for replies.

    2 replies

    Tesla DeLorean
    Guru
    June 29, 2015
    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 VenmoUp vote any posts that you find helpful, it shows what's working..
    prothan
    prothanAuthor
    Associate II
    June 30, 2015
    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);    

    }