Flashing Xesc firmware

From Open Mower Wiki
Jump to navigation Jump to search

Introduction

This page will guide you through the steps needed to flash and configure the XESCs for use with the OpenMower Project

This mini-HOWTO is meant to guide you through the different steps.

THIS PAGE IS CONSIDERED A WORK IN PROGRESS AND WILL BE UPDATED REGULARLY

Disclaimer

This Wiki is provided as-is and free of charge. No guarantees of any kind are made that the information contained herein is exact or correct or does not violate any local regulations or cause any security risk. Any use you make of any information given here is at your own discretion and risk. Please note that motors can be dangerous, especially the mowing one. Always take the blade apart when building / testing around the bot, and make sure nothing contacts any of the moving parts. We cannot be held responsible for your actions.

STM32 Version

In this section, we will guide you through the first flashing and configuration of your STM32 based XESC

Prerequisites

For this how-to, you will need: - A Computer with internet connection - The XESC you want to flash - A micro USB cable - A ST programmer (STlink v2 or blue pill for exemple) - Some wires to connect the XESC and the STLINK

Setting Up Your Machine

Connecting everything

Depending on the Programmer you use, you will need to connect either 3 or 4 wires between the programmer and XESC. These wires are: - 3V3V (not mandatory, depends on the programmer used) - SWDIO -> the dataline - SWDCLK -> the clockline - GND

Looking at the XESC from the top (USB on top) and with the usb port facing towards you, the pinout is as follows: 3V3 SWDIO GND SWDCLK RESET

Note that we won't use the reset line.

Flashing the Bootloader

Flashing the Firmware

Connection to VESC TOOL and configuration

RP2040 Version

In this section, we will guide you through the first flashing and configuration of your RP2040 based XESC

Compared to the STM32 version, flashing the RP2040 XESC is pretty simple:

- Connect your XESC to your computer using the micro USB port XESC will then appear as a mass storage device. - Copy/Paste the firmware file to that new storage

On the RP2040 version, ROS automatically loads the necessary config for the OPENMOWER motors, so you don't need to do anything else.

Enjoy your flashed XESCs!