cancel
Showing results for 
Search instead for 
Did you mean: 

Stm32F4 dma -> usart int is never called no output on usart

michaelmccartyeng
Associate II
Posted on January 09, 2013 at 13:40

The original post was too long to process during our migration. Please click on the attachment to read the original post.
6 REPLIES 6
michaelmccartyeng
Associate II
Posted on January 10, 2013 at 03:11

Is this a hard question ? Did I post in the wrong forum or does no one like me anymore ? 

If its a mal formed question or I'm being lazy please feel free to tell me. I was planning on trying different streams and seeing if I could trial and error it into working; however, I could use standard methods to transmit the data in a blocking way if this is not an easy thing to solve and may take a large amount of time. 

It was my impression you simply 

start clock, setup dma, enable its, enable dma and it would work. I've setup several dma transfers on the stm32f1.. without issue, even more difficult ones driven by external clocks etc. 

Anyway thanks for reading, if you have any suggestions please chime in. 

Posted on January 10, 2013 at 04:10

No it's just a forum with a general dearth of people answering questions, and those that do are often busy with their own work.

Ok, so USART2_TX surely you should be using DMA1 Channel4 Stream6? Honestly not sure where you plucked Channel0 Stream0 from. There is a table in RM0090 which associates the resources.

Yes, it also looks like the DMA direction is backward.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
michaelmccartyeng
Associate II
Posted on January 10, 2013 at 17:16

No it's just a forum with a general dearth of people answering questions, and those that do are often busy with their own work.

- Well if I might say it is very active and very helpful. I have responded to a few posts but I'm wary of giving information that may be counter productive because its wrong. It seems like you answer almost every question on these forums, thanks 1000 times over. I know I'll never be able to help you because you know all the answers. 

Ok, so USART2_TX surely you should be using DMA1 Channel4 Stream6? Honestly not sure where you plucked Channel0 Stream0 from. There is a table in RM0090 which associates the resources.

- I suspected there was something like this, but had no idea so I just picked the zeroth one. Thanks that was the much needed info I required ! 

Yes, it also looks like the DMA direction is backward.

ooops :( thats the thing when you dont know what the issue is you start changing stuff in the wrong location and you break it more ! 

No it's just a forum with a general dearth of people answering questions, and those that do are often busy with their own work.

Ok, so USART2_TX surely you should be using DMA1 Channel4 Stream6? Honestly not sure where you plucked Channel0 Stream0 from. There is a table in RM0090 which associates the resources.

Yes, it also looks like the DMA direction is backward.
ajbean
Associate
Posted on March 15, 2013 at 17:10

What actually determines which pin is used for TX, and which is used for RX? From the looks of the code, it's choosing GPIOA pins 2,3, but nothing explicitly sets pin2 as TX / pin3 as RX. Is there a reference in RM0090 I haven't found yet?

Thanks,

AJB

Posted on March 15, 2013 at 17:30

The pin is escaped through the AF pin muxing fabric by GPIO_PinAFConfig()

The pinning information is usually from the Data Manual (DM, aka Data Sheet) of the specific part being used, rather than the Reference Manual.

For example Google/Bing ''STM32F407VG''

http://www.st.com/web/catalog/mmc/FM141/SC1169/SS1577/LN11/PF252140

See page 58, Table 8 Alternate function mapping

http://www.st.com/st-web-ui/static/active/en/resource/technical/document/datasheet/DM00037051.pdf

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
ajbean
Associate
Posted on March 15, 2013 at 17:55

Ahh, perfect. Thanks for the help. All your comments throughout the forums have been quite helpful. With my attention span, it's hard to sift through hundreds of pages of documentation.