Notes on Communication in Serial Communication App
UART Data Input and Output
4KB buffers are allocated for UART input and output. When outputting two UART lines, 2KB is used for input and output buffers for each line.
In format mode and chat mode, it is rarely necessary to be aware of buffer sizes, but in header transparent mode and transparent mode when continuously inputting streams, or even in format mode when inputting many streams at once, it is necessary to be aware of the buffer size limits. On the output side, if a slow baud rate is set, the output of data received wirelessly may not keep up.
Data beyond the buffer limits is not protected at the boundary, causing data loss. Especially on the input side, consider referring to the flow control pins described below.
UART Flow Control
Input flow control is implemented to behave like the RTS pin. The pin used is PWM1
(DIO5
), targeting the main UART port. When input is not accepted, the state is High; when input is accepted, the state is Low. Output flow control is not supported. Receiving devices should ensure sufficient baud rate and processing speed.
- After power-on or reset, the pin is High. It becomes Low once UART is initialized.
- When the UART input buffer exceeds 7/8 full, the pin goes High; it goes Low when below that threshold.
- In transparent mode, the pin is High during packet transmission.
Countermeasures for Wireless Communication Errors
If data loss occurs on the receiving side, increase the number of wireless retransmissions.
Increasing the number of additional packets sent can improve the success rate of reception.
The number of retransmissions can be set in Interactive Mode (x: set RF Conf
).