Can I use usart2 DMA for RX and TX at the same time ?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-03-17 3:01 PM
Posted on March 17, 2014 at 23:01
Previously I was using usart2 dma TX and had an int and isr that would handle the RX data.
Can I have the dma enabled for both tx and rx for usart 2 ? It seems weird them both pointing at the same DR ? I've figured out the streams to use and about to start test/modifying, just wanted to check that what I'm doing is possible. Thanks
This discussion is locked. Please start a new topic to ask your question.
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-03-17 3:28 PM
Posted on March 17, 2014 at 23:28
The USART->DR points at different internal registers, peripherals generally don't behave like memory cells.
Some other TX/RX examples
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Up vote any posts that you find helpful, it shows what's working..
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-03-17 7:50 PM
Posted on March 18, 2014 at 03:50
Thanks Clive, great examples. I've replaced my interrupt based circular buffer with a dma circular buffer. I still use the interrupt but just to calculate the size, I have a wrapper that has helper functions and such to deal with the dmabuffer, perform crc and find other buffers within that buffer.
