I’m trying to get the UART interface on the EC200U working for my application. Going through the API reference manual, I notice that TX uses a FIFO and RX uses DMA. There is no mention of how many bytes long each of these are.
For example, calling ql_uart_write
successively twice for two bytes each time may work just fine. I expect calling ql_uart_write
successively twice for 2MB each time is going to fail. For that matter, I expect calling ql_uart_write(X, Y, 1000000)
even once to fail. It’s a similar situation for RX also. I assume ql-kernel allocates some amount of RAM for RX DMA. I don’t know how much that is.
I’d like to know: what are the data_len
limits for both ql_uart_write
and ql_uart_read
?
Second question: when receiving data, is the callback function triggered as soon as the first byte comes in, or is it triggered after some timeout, or is it triggered after receiving a certain number of bytes?
The reason I ask the second question: when my ql_uart_register_cb
registered callback function is called, if I’m expecting a few bytes of data, is it recommened for me to sleep for a short amount of time before I call ql_uart_read
?