Page 1 of 1

UART DMA receive or transmit only

Posted: Mon May 04, 2015 9:08 am
by vambwodonk
Hi,

My name is Arif,
I build a project and design PCB with STM32F407 using 4 Serial and 2 SPI. I forgot to open datasheet about DMA mapping,
I confusing about using SPI2 that DMA stream same location with UART3 and UART4. UART3 i used serial driver and not using DMA.
But, for UART4 i used uart driver for receive only, then i want to use STM32_DMA_STREAM_ID(1, 4) to SPI2_TX,
Any suggestions?

Thx, Arif

Re: UART DMA receive or transmit only

Posted: Mon May 04, 2015 9:09 am
by Giovanni
Hi,

You could use the "serial" driver instead of the UART driver, it does not use DMAs.

Giovanni

Re: UART DMA receive or transmit only

Posted: Mon May 04, 2015 9:14 am
by vambwodonk
Hi Giovanni,

You could use the "serial" driver instead of the UART driver, it does not use DMAs

but i need DMA for UART4 receive and SPI2,

Any another solution?

Arif,

Re: UART DMA receive or transmit only

Posted: Mon May 04, 2015 9:27 am
by Giovanni
Another solution is to not use UART and SPI at the same time, you can start/stop drivers, DMAs are allocated/freed in start/stop.

Giovanni

Re: UART DMA receive or transmit only

Posted: Mon May 04, 2015 9:37 am
by vambwodonk
Another solution is to not use UART and SPI at the same time, you can start/stop drivers, DMAs are allocated/freed in start/stop.


i'll try this first, thanks Giovanni.
Arif