Skip to main content
HassenNefzii
Visitor II
October 22, 2020
Question

Is DMA peripheral to peripheral data transfer possible in the 32L476rg MCU ?

  • October 22, 2020
  • 1 reply
  • 991 views

Hello

I am currently working on a project that requires pushing data directly from a uart rx pin directly to an SPI device (an external SRAM) tx pin

One way to do it, is by using DMA , unfortunately most Stm32 MCUs do not offer a peripheral to peripheral dma mode.

but it is mentioned in the datasheet of the L476rg MCU that it offers a peripheral to peripheral dma mode however when attempting to set up DMA data transfer mode as peripheral to peripheral in CubeMX (whether for the SPI or the UART) it is not found

So is there a way to do it ? is it even possible ? and if not is there any other way ?

Please note that the spi device is an external SRAM so i am trying to minimize internal memory usage as possible.

This topic has been closed for replies.

1 reply

TDK
October 22, 2020

Seems like you would just set it up as a peripheral-to-memory transfer:

DIR = 0 defines typically a peripheral-to-memory transfer. More generally, if DIR = 0:

– The source attributes are defined by the DMA_PARx register, the PSIZE[1:0] field

and PINC bit of the DMA_CCRx register.

Regardless of their usual naming, these ‘peripheral’ register, field and bit are used

to define the source memory in memory-to-memory mode

– The destination attributes are defined by the DMA_MARx register, the

MSIZE[1:0] field and MINC bit of the DMA_CCRx register.

Regardless of their usual naming, these ‘memory’ register, field and bit are used to

define the destination peripheral in peripheral-to-peripheral mode.

"If you feel a post has answered your question, please click ""Accept as Solution""."