Other Parts Discussed in Thread: SYSBIOS, , ENERGIA
Tool/software: TI-RTOS
Hello,
I have tried multiple methods to be able to read all 8 UARTs using TI-RTOS but I can't get more than 3-4 at a time reading without dropping data. I would appreciate any suggestions to handle reading from all 8 UARTs using TI-RTOS (must be TI-RTOS).
Each UART receives 20-64 bytes of data at 19200 baud every 1 to 4 seconds. My goal is to be able to store each UART's data in a buffer until a terminating character is received to signify the end of the data packet, then the buffer is copied and used elsewhere.
I have tried the following with many variations:
1) Initially modified enet_s2e example which uses freeRTOS to use 8 UARTs. It works but due to USB/socket requirements TI-RTOS must be used.
2) Modified TI-RTOS example "uartecho" for multiple UARTs
a) One task per UART to read without callbacks
a1) Send character over queue to be aggregated by a separate task
a1) Copy characters into char[] buffer to be aggregated by a separate task
b) One task per UART to read with callback task
b1) In callback send character over queue to be aggregated by a separate task
b2) In callback copy characters into char[] buffer to be aggregated by a separate task
b3) Timers to call read
b4) Semaphores and buffers to minimize the time in the callback
Basically I have tried many methods and variations of options and the number of bytes read at a time and none gets close to all 8 reading with no missed data. Does anyone know of any method in TI-RTOS that can handle all 8 UARTs without issues? As far as scheduling we need to be able to run a few additional low priority tasks on the side like USB and sockets as well.
Thank you!