We need the uart for communication between processors.
The uart must be FULL DUPLEX and must be able to receive packets with an unknown length (in other words the dsp must be always in RX and get all the incoming bytes).
Pdk for OMAPL137 version 1.0.10 contains a driver for the uart.
The main problem is that the driver is thinked for serial terminal (who need this??). I tried almost all the configuration and none of them is working.
Best result is with the configuration:
uartParams.readMode = UART_MODE_CALLBACK;
uartParams.writeMode = UART_MODE_CALLBACK;
uartParams.readCallback = UART_callbackRead;
uartParams.writeCallback = UART_callbackWrite;
uartParams.readDataMode = UART_DATA_BINARY;
uartParams.writeDataMode = UART_DATA_BINARY;
uartParams.readReturnMode = UART_RETURN_FULL;
and making an UART_read(uarthandle, RecvBuffer,1) after the initialization and the callbak as
void UART_callbackRead(UART_Handle handle, void *buf, size_t count)
{
--- My Code here
UART_read(uarthandle, RecvBuffer,1);
}
In this configuration the uart works for a while, then stops to receive.
My packets are zero terminated, but i don't want to change (and recompile) the driver (to change the NEWLINE terminated). Also nowhere is written if the driver permits full-duplex communication (reading while writing).