2017-05-22 05:13 AM
HI
I want Receive characters from USART. I don't know how much characters will be sent
and the data that will be sent is too much. in interrupt mode i will receive amount interrupts and it is not good(for example 1000 ~2000) and in DMA mode i can not know than when the last character has been sentand i polling mode in should check my buffer always.so
what should i do ???
thank you
#data-transfer #usart #usart-dma #large-data2017-05-22 11:41 AM
Idle interrupt!
It take care to gives you a signal when Rx line stops. Example: receiving 'hello', you will receive only one interrupt 10 bits after 'o'. So, the amount of 'time lost' depends on your baudrate.
If amount of bytes are 'too much', use idle interrupt + DMA half/full interrupt. Half is better (a kind of double buffering).
If you loose characters also this way... well... enable flow control
2017-05-22 01:00 PM
On what part, exactly?
There are ways to use HT and TC interrupts, or simply using the 16-bit wide feature of the USART->DR to flag and harvest data from the buffer. ie use the DMA to act as the inbound FIFO, and then have your worker thread/task pull all of the current data out, and marking the now vacant entries with 0xFFFF
2017-05-24 11:50 AM
THNAK YOU
this way is very good
2017-05-24 12:31 PM
Hi
khastar.mehdi
khastar.mehdi wrote:
THNAK YOU
this way is very good
https://community.st.com/0D50X00009bMM5DSAW
-Nesrine-