about the UART listening for a while

2 posts / 0 new
Last post
liuluan002
Offline
Last seen:6 months 2 weeks ago
加入:2015-11-27 14:24
about the UART listening for a while

Hi Dialog,

I want to make an application with the following functions:

1. listening for 5 to 10 seconds waiting for the UART to receive some data. We need to put these data into an array. Also we need to repeated these data to sent through the UART after decoding them.

Do you have any idea how to make these work?

BR,
Niklas

Device:
MT_dialog
Offline
Last seen:3 months 4 days ago
工作人员
加入:2015-06-08 11:34
Hi liuluan002,

Hi liuluan002,

You can configure your UART and have a function that would copy the data from the UART to your array buffer under a condition of a specific flag that would indicate if data can be copied to your buffer, so you can set a timer and when that timer elapses you can set that flag and prevent the data being copied from UART to enter the buffer. Then you can process the data and use the result as an output for your UART.

Thanks MT_dialog