I'm working on a project that uses uart to receives lots of data(~45KB), the data is initialized with SOT and ended with EOT.
So in order to read the data I wait for the starting SOT and then I increment a buffer pointer accordingly to the data comming through.(I don't receive all the data at once, the sender uses 512 Bytes chunks).
To increment my pointer buffer I check how many bytes are available using:
Code: Select all
uart_get_buffered_data_len(uart_num, &length);
Code: Select all
length = uart_read_bytes(uart_num, buffer+length2, length, 0);