APP_UART) so the UART port remains available for firmware updates immediately after flashing.
Port assignments
The firmware supports up to three UART ports, selected by theUART_PORT enum:
UART_PORT_COMM_HEADER (index 0) is the standard external-access port and the one to use when connecting a Raspberry Pi, Arduino, or other host controller.
Baud rate
The default baud rate is 115200 bps, defined inappconf_default.h:
app_uartcomm_configure at runtime:
permanent_enabled to true keeps the UART port active even when another application is selected.
The
APPCONF_PERMANENT_UART_ENABLED default is true, which means UART communication with VESC Tool remains available regardless of which application is active.Communication protocol
The VESC UART protocol uses length-prefixed packets with a CRC16 checksum. Each packet has the structure:
The packet framing is handled by the
packet module. The application thread calls commands_process_packet for each complete received packet.
Serial configuration
Fromapp_uartcomm.c, the UART is configured with standard 8N1 framing and LIN break detection:
Runtime API
Combining with other applications
If you need analog or PPM input and UART telemetry simultaneously, use the combined modes:APP_PPM_UART— PPM input with UART active.APP_ADC_UART— ADC input with UART active.
