UART DMA receive or transmit only

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

Post Reply
vambwodonk
Posts: 15
Joined: Tue Oct 14, 2014 5:36 am

UART DMA receive or transmit only

Post 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
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: UART DMA receive or transmit only

Post by Giovanni »

Hi,

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

Giovanni
vambwodonk
Posts: 15
Joined: Tue Oct 14, 2014 5:36 am

Re: UART DMA receive or transmit only

Post 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,
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: UART DMA receive or transmit only

Post 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
vambwodonk
Posts: 15
Joined: Tue Oct 14, 2014 5:36 am

Re: UART DMA receive or transmit only

Post 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
Post Reply