Skip to main content
Version: 3.1.0

Serial configuration

Protocol configuration

The Serial network allows you to configure some aspects of the protocol to adapt it to your needs. To modify these options, you have to define them in your product_config.h file. Learn more about product_config.h on the code organization page.

FunctionDescriptionComments
SERIAL_NETWORK_BAUDRATEDefine the serial baudrate used by the Luos Serial protocolBy default the baudrate is 1000000
SERIAL_RX_BUFFER_SIZEThe size of the RX bufferBy default this buffer have 512 bytes. However this value is very conservative and the serial rarely need more than 10 bytes.

Compatible MCUs

Serial can manage any type of microcontrollers as long as they have a HAL. If your microcontroller is not supported yet, please contact us:

Check the list of MCU families Serial cover:Hardware Abstraction Layers for MCU families,

Default Configurations

Serial can run on absolutely any kind of micocontroller or computer. This is the most maintream communication bus. The peripheral configuration is described in the serial_hal_config.h files, and can be redefined in the node_config.h file of your project to fit with your design.

Learn more about project organization

Serial's HAL configuration

To tailor the pinout and functionality according to your design requirements, you can either create or utilize the file node_config.h (refer to Luos examples). In the "SERIAL HAL LIBRARY DEFINITION" section of the node_config.h file of compatible examples, you can define pinout, USART settings, and optionally DMA, building upon the default configuration defined in serial_hal_config.h.

info

Each example provided by Luos has a node_config.h file and includes the file platformio.ini.

FunctionDescriptionComments
SERIAL_TX_CLK/SERIAL_RX_CLKActivates clock for GPIODepends on port
SERIAL_TX_PIN/SERIAL_RX_PINChooses pinout for Rx/Tx commsAdapts to the chosen serial bus
SERIAL_TX_PORT/SERIAL_RX_PORTChooses Rx/Tx pin portsDepends on selected pins
SERIAL_TX_AF/SERIAL_RX_AFChooses pins atlternate functions to activate Rx/Tx commsNecessary to enable the serial on these pins