EC200U UART data limits

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?

1 Like

Hi
Happy to answer your questions. For your first question, the serial port buffer is only 512 bytes, when using Ql_UART_Read to read 1024 bytes at a time, reading 512 bytes will return. The second problem, the callback is triggered when the first byte is received.

1 Like

hi , I have a question ! you said that serial port buffer is only 512 bytes, if I change QL_UART_RX_BUFF_SIZE or QL_UART_TX_BUFF_SIZE in blew code dose serial port buffer change ??

this part is in uart_demo.c