Skip to main content


Specifies the size of the UART receive FIFO


Device (from impOSTM 32)




Name Type Description
newInputFifoSize Integer The new size of the receive FIFO in bytes


This method allows you to change the size of the input FIFO stack on the target UART serial bus. The default size is 80 bytes, but this can be changed to any size of 20 bytes or greater. The imp005 is an exception: its minimum FIFO size is 80 bytes.

There is no set maximum size, but in practice the FIFO’s size is limited by the amount of free memory available. A Squirrel error will be thrown if the requested size is bigger than the available memory.

The size of the receive FIFO must be set before the UART is configured using uart.configure() otherwise a Squirrel error will be thrown. If the UART has been configured, it must be disabled with uart.disable() before its size is reset.

Known Issues

On all imps, custom UART FIFO sizes, as set by uart.settxfifosize() and/or uart.setrxfifosize(), are not set back to their defaults when Squirrel is reloaded (eg. when using the ‘Build and Force Restart’ button in impCentral). The sizes are only reset to their defaults when the imp reboots in some way: either a cold boot (power-cycle) or a warm boot (eg. wake from server.sleepfor().

Expected Fix This issue is scheduled to be addressed in a future impOS release, under which any Squirrel reload will also cause UART FIFOs to be reset to their default sizes.

On the imp005, calling uart.disable() does reset the FIFO sizes back to the defaults. This behavior does not occur on any other imp.

Expected Fix This issue is scheduled to be addressed in a future impOS release, under which this effect will be removed from the imp005 to ensure consistent behavior across all imps (uart.disable() does not reset the FIFO sizes).