Difference between revisions of "Flashing Xesc firmware"
m |
|||
(2 intermediate revisions by one other user not shown) | |||
Line 12: | Line 12: | ||
We cannot be held responsible for your actions.'' | 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'' | ''In this section, we will guide you through the first flashing and configuration of your STM32 based XESC'' | ||
Only linux have been tested for now, but other OS will come. | |||
=== Prerequisites === | === Prerequisites === | ||
For this how-to, you will need: | For this how-to, you will need: | ||
- A Computer with internet connection | - A Linux Computer with internet connection | ||
- The XESC you want to flash | - The XESC you want to flash | ||
- A micro USB cable | - A micro USB cable | ||
Line 24: | Line 26: | ||
=== Setting Up Your Machine === | === Setting Up Your Machine === | ||
We created a script to make sure everything on your machine is setup correctly. To use it: | |||
- Run a terminal on your computer | |||
- run <code>wget https://github.com/vamatis/Random/blob/main/xesc-computer-setup-script.sh </code> | |||
- then <code>chmod u+x xesc-computer-setup-script.sh</code> | |||
- and finally <code>sudo ./xesc-computer-setup-script.sh</code> | |||
The script will create a XESC-Setup folder with the following architecture: | |||
- XESC-Setup | |||
- bldc-bootloader | |||
- xesc_firmware | |||
- configs | |||
The bldc-bootloader folder contains the VESC bootloader for the STM32 | |||
The xesc_firmware contains the custom firmware for the XESC | |||
The config folder contains configurations for the drive and mower motors | |||
Once you have that done, you're ready to proceed! | |||
=== Connecting everything === | === Connecting everything === | ||
Line 35: | Line 57: | ||
Looking at the XESC from the top (USB on top) and with the usb port facing towards you, the pinout is as follows: | Looking at the XESC from the top (USB on top) and with the usb port facing towards you, the pinout is as follows: | ||
3V3 | 3V3 | ||
SWCLK | |||
GND | |||
SWDIO | SWDIO | ||
RESET | RESET | ||
Line 48: | Line 70: | ||
=== Connection to VESC TOOL and configuration === | === 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'' | ''In this section, we will guide you through the first flashing and configuration of your RP2040 based XESC'' | ||
Latest revision as of 09:22, 13 December 2022
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
Only linux have been tested for now, but other OS will come.
Prerequisites
For this how-to, you will need: - A Linux 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
We created a script to make sure everything on your machine is setup correctly. To use it:
- Run a terminal on your computer
- run wget https://github.com/vamatis/Random/blob/main/xesc-computer-setup-script.sh
- then chmod u+x xesc-computer-setup-script.sh
- and finally sudo ./xesc-computer-setup-script.sh
The script will create a XESC-Setup folder with the following architecture:
- XESC-Setup
- bldc-bootloader - xesc_firmware - configs
The bldc-bootloader folder contains the VESC bootloader for the STM32 The xesc_firmware contains the custom firmware for the XESC The config folder contains configurations for the drive and mower motors
Once you have that done, you're ready to proceed!
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 SWCLK GND SWDIO 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!