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.
Function | Description | Comments |
---|---|---|
ROBUS_NETWORK_BAUDRATE | Define the serial baudrate used by Robus | By default the baudrate is 1000000 |
NBR_RETRY | Define the maximum number of transmission attempt before excluding the node from the network | By default Robus will perform 10 retry maximum |
NBR_PORT | The number of physical port (or PTP) you have on your setup | By 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.
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:
- Pinout
- Communication
- Timer
Function | Description | Comments |
---|---|---|
PORT_CLOCK_ENABLE | Activates clock for GPIO | Depends on port |
RX_EN_PIN/TX_EN_PIN | Chooses pinout to activate Rx/Tx comms | Necessary for special comms |
COM_TX_PIN/COM_RX_PIN | Chooses pinout for Rx/Tx comms | Adapts to the chosen serial bus |
PTPX_PIN/PTPX_IRQ/PINOUT_IRQHANDLER | Chooses pinout, IRQ and callback for the PTP line | Necessary for topology detection |
Function | Description | Comments |
---|---|---|
ROBUS_COM_CLOCK_ENABLE | Activates clock for serial | Depends on serial bus |
ROBUS_COM/ROBUS_COM_IRQ/ROBUS_COM_IRQHANDLER | Chooses serial bus, IRQ and callback | Adapts to the serial bus chosen |
ROBUS_DMA_CLOCK_ENABLE | Activates clock for DMA | Necessary for for Tx |
ROBUS_DMA/ROBUS_DMA_CHANNEL/ROBUS_DMA_REQUEST | Chooses DMA Channel and peripheral | Message Tx on serial port |
Function | Description | Comments |
---|---|---|
ROBUS_TIMER_CLOCK_ENABLE | Activates clock for Timeout | Necessary for Timeout |
ROBUS_TIMER/ROBUS_TIMER_IRQ/ROBUS_TIMER_IRQHANDLER | Chooses Timer, IRQ and callback | Necessary for Timeout |