I am using EVK1105 with AVR Studio 5 as an IDE development for my AVR project. I use FreeRTOS in it. I have 3 USART ports on this board. One external module connects to my AVR32 board via USART-RS232 mode. It sends me continuous serial data to my board on USART0 with 19230 baudrates, 7-bit data, odd parity, a stopwatch and a normal channel. For this, I created a new task. After every 9 bytes of data, it sends '\ n' and '\ r'. Therefore, in my task, I continue to collect 9 data in the line buffer, and then transfer it to USART1. I use the polling method to collect data from USAR0, which accepts the port. But I am facing the problem of getting data. I donβt know if his synchronization problem is switching or something, or the scheduler is switching the task when collecting data.But I do not get the required data.
The following are the things that I already checked as troubleshooting 1. I connected my external module to my computer with a hyperterminal that gives me an excellent result. 2. The same thing is implemented as when using the USART0 reception, and all received data is transmitted to USART1 without FreeRTOS. His work is beautiful.
Please suggest some ideas what might be wrong. I use a queue for communication between Tx and Rx tasks to transfer a string buffer from USART0 to USART1. Is this a problem processing the queue? How to fix a queue problem?
I use a 50 ms delay in my infinite task loop in Rx Task. Could this create a problem? If I do not use any delays, the OS will fail. Please suggest some good practices for creating a new task in FreeRTOS so that I don't get any time issues.