Hi,
I have an application that should receive control commands over UART. One of these commands is a 'start' command, and upon receiving that, the application will regurlarly transmit large amounts of data over the same UART.
I have solved this by creating separate input and output handles for the UART (hUart_IN and hUart_OUT) and having separate receive and transmit threads.
The receive thread calls GIO_submit() with IOM_READ command and is always blocking on that call unless data is received.
The transmit thread calls GIO_submit() with IOM_WRITE command whenever it has data to transmit.
It seems now, that this works fine as long as I transmit only short amounts of data. Control commands are received and processed correctly.
However, when I transmit large amounts and then send control commands to the system, it sometimes 'locks up'.
My questions now are:
- Is sharing of a UART resource for transmission and reception possible?
- Is this method (separate input and output handles, separate receive and transmit threads) the correct solution for that? If not: how should it be done?
The details of the system are:
- TMS302C6742
- DSP/BIOS 5.41.09.34
- CGT 7.04
- PSP 01.30.00.05