cancel
Showing results for 
Search instead for 
Did you mean: 

Continuous data reading from USART

slachist
Associate II
Posted on May 13, 2013 at 00:53

Hello,

I have a USART data that comes from another device that runs continuously, I have to read all of this data and send it directly to a PC host through a USB.

The problem is that I don't want to loose any received data, all of the received data must be transmitted to the HOST.

I'm using a STM32F103, so I thought to use DMA in circular mode and then transmit the received buffer to the USB report.

As I understand there is no peripheral to peripheral transfer in DMA so I have to save the data in some place before sending it.

I didn't start working in the problem yet, I'm still searching for information so any suggestions would be very useful for me.

#stm32-usart-dma
1 REPLY 1
Posted on May 13, 2013 at 04:12

Using DMA or interrupts to fill a ring buffer would be a reasonable way to go.

I don't have a DMA RX example for the STM32F1 series. This is one that does TX.

https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/DispForm.aspx?ID=24530&RootFolder=/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/STM32%20USART2%20per%20DMA%20Problem

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..