UART FIFO depth and how to change the size


#1

[size=150]UART FIFO depth[/size]

UART FIFO depth (FD) represents the amount of bytes that can be received over UART before an interrupt is generated internally to read the received data. If hardware flow control is enabled, this value influences the threshold at which RTS is toggled to invoke hardware flow control.

The size of Rx FIFO in AirPrime modules is 64 bytes. By default, FD is configured as 56 bytes. This means that the first interrupt is generated at 56 bytes, and flow control is invoked at 63 bytes (56+7). For all other values of FD, the flow control is invoked at FD+8 bytes, so FD = 32, flow control at 40 and so on.

[size=150]Importance of UART FD[/size]

When FD is configured to 56, RTS is toggled after the Rx FIFO has 63 bytes. In this case, the transmitter (DTE) can send only 1 extra byte before it reacts to the RTS state change by the module. In case the DTE does not respond in time and sends some extra bytes, there will be some loss of data due to buffer overrun. To avoid such scenarios, FD can be changed to a lower value, for example 32, which gives enough time to the DTE to respond to the RTS state change.

The UART FD can be changed using AT+WHCNF=6,x command, where x represents the index corresponding to the FD value. For more information, please refer to “AT Commands Guide.pdf” available in the developer zone (developer.sierrawireless.com).

UART FD can also be configured using Open UART service provided by Open AT Framework. To do so, one has to use IOC_UART_FD IO command through io_control () API. For more information, please refer to “ADL User Guide” available in the developer zone (developer.sierrawireless.com).

Note: The command parameter to change FD (+WHCNF=6,x) is available starting firmware version R7.45.