cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F103RB says : USART1 RX versus DMA1_ch1, ready ? Fight !

arnaljl2
Associate II
Posted on February 08, 2013 at 00:09

Hello everyone.

A week ago, I fought with a STM32F103, trying to get it fill some random buffer with its DMA1_Channel1 controller from its USART1 Rx ''events''.

But neither the recipient memory would get filled, nor the DMA isr be reached.

Back then, I had no time to deal with such ''nifty functionality'' as 1200bauds USART to DMA transfers.

So I resorted to the USART1 Rx's interrupt, since 1200.bauds characters are a good laugh to a 72MHz core.

But now, a week later, I still wonder why my previous code didn't work. So I re-implemented it...without success.

Here's a Keil's �Vision snapshot of the incriminated peripherals, with the PC sitting on the very first iteration of the main loop. So everything has just been configured by the initialisation routine. Buses clocks, DMA, USART1...

My eyes are playing tricks on me... I can't see where the bug is sitting.

Anyone ?

0690X00000604QYQAY.png

#usart-dma-interrupt-hair-loss
3 REPLIES 3
Posted on February 08, 2013 at 01:55

I'm probably older and have more hair, but perhaps you should be using a different DMA channel.

 Per RM0008, USART1_RX, DMA1, Channel 5
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
arnaljl2
Associate II
Posted on February 08, 2013 at 02:39

I don't know if you're older, but YOU ARE CERTAINLY MORE KNOWLEGEABLE than me !

If fact I was just reading the peripheral reference manual,  RM0008 as you mentioned, and it's here , at page 272 : ''DMA1 request mapping'' fig.50

USART1 Rx is multiplexed on channel 5... 

Mea culpa !

And THANK YOU Clive1 !

Posted on February 08, 2013 at 03:41

In this field perhaps. You're welcome, you presented your problem quite clearly without source code.

What are you programing at 1200 baud? A CNC machine?
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..