Skip to main content
Version: 3.1.0

Robus configuration

Protocol configuration

Robus 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
ROBUS_NETWORK_BAUDRATEDefine the serial baudrate used by RobusBy default the baudrate is 1000000
NBR_RETRYDefine the maximum number of transmission attempt before excluding the node from the networkBy default Robus will perform 10 retry maximum
NBR_PORTThe number of physical port (or PTP) you have on your setupBy default Robus consider that you have 2 of them

Compatible MCUs

Robus 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 Robus cover:Hardware Abstraction Layers for MCU families,

Default Configurations

Robus is made to run on real-time microcontrollers and use the hardware peripherals to complete communication between nodes. In order to configure this low-level part, Robus provide, for many MCU families, a default configuration that can be followed to plug and play the Robus package with the chosen MCU family. The peripheral configuration is described in the robus_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

Robus'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 "ROBUS HAL LIBRARY DEFINITION" section of the node_config.h file, you can define pinout, USART settings, timers, and more, building upon the default configuration defined in robus_hal_config.h.

info

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

For example, you can redefine PTPA to fit with your design.

in robus_hal_config.h, this is defined as followed:

#ifndef PTPA_PIN
#define PTPA_PIN GPIO_PIN_8
#endif

in node_config.h this should be redefined as followed:

#define PTPA_PIN                    GPIO_PIN_11

There are many possible configurations that you can change, not all of them being necessary for your design:

FunctionDescriptionComments
PORT_CLOCK_ENABLEActivates clock for GPIODepends on port
RX_EN_PIN/TX_EN_PINChooses pinout to activate Rx/Tx commsNecessary for special comms
COM_TX_PIN/COM_RX_PINChooses pinout for Rx/Tx commsAdapts to the chosen serial bus
PTPX_PIN/PTPX_IRQ/PINOUT_IRQHANDLERChooses pinout, IRQ and callback for the PTP lineNecessary for topology detection