Skip to content

Flashing the MicroDriver

Avadesh Meduri edited this page Oct 17, 2022 · 2 revisions

The general instructions to flash the micro drivers are available here - https://open-dynamic-robot-initiative.github.io/udriver_firmware/build_instructions.html

This page contains instructions that are necessary in addition to the ones given in the above link to successfully flash the micro driver. Also, there are instructions In case of errors seen in the software.

Install MotorWare

  1. Install Motorware software using this link - https://www.ti.com/tool/MOTORWARE . Note that only a windows version of the package exists. We will install a windows emulator in the next step to run the .exe file.
  2. Install Wine (package to run windows .exe files) - sudo apt install wine64 (change 64 to 32 if you have a 32 bit machine).
  3. go to the directory when Motorware is downloaded and extract the file.
  4. Open a terminal and navigate to the extracted Motorware software.
  5. run the command wine motorware_1_01_00_18_setup.exe
  6. Follow the instructions in the GUI to install the software.

Install CCS Studio

  1. Download the linux version of CCS studio with this link - https://www.ti.com/tool/CCSTUDIO
  2. run sudo apt update and sudo apt install libc6-i386 libusb-0.1-4 libgconf-2-4 libncurses5 libpython2.7 libtinfo5
  3. While installing the software select the custom install option .
  4. Select - C2000 32-bit Real-Time MCU option and then click next
  5. Click Next in the debugger menu as the required option is already selected.
  6. Finish the rest of the installation procedure.

Flashing the Micro driver

  1. clone the repo - git clone --recursive https://github.com/open-dynamic-robot-initiative/udriver_firmware.git
  2. Copy the installed MotorWare files that was installed previously and paste it inside the firmware/firmware_spi/motorware directory. All the files such as docs, eclipse, mw_explorer, sw etc should be copied and pasted inside our repo.
  3. Copy the patch file firmware/firmware_spi/motorware_1_01_00_18.patch and paste it inside the firmware/firmware_spi/motorware directory. To get an idea of how the directory should look after you copied things - check the "Get Motorware" section in this link https://open-dynamic-robot-initiative.github.io/udriver_firmware/build_instructions.html
  4. Run patch -p1 < ../motorware_1_01_00_18.patch inside the firmware/firmware_spi/motorware directory. The location where you copied the patch file in the previous step. This will update the original install Motorware software with the custom changes.
  5. Ideally the patch file should run without throwing any errors. Incase of errors, its likely that the previous steps were not implemented properly.
  6. Now open CCS studio and select the place you would like to save your projects (can be the default)
  7. Click on projects -> import CCS projects.
  8. In the set-search directory browse and select the firmware_spi folder inside the cloned github repo. If done correctly you should see dual_motor_torque_ctrl_spi in the discovered projects.
  9. Now compile you code in the flash mode (look for the Axe symbol and select the flash option). There should be no errors during compilation. Otherwise the installation procedure was not correct.
  10. Now connect your microdriver to the PC with a USB stick - Click here for instructions. Also ensure that the Micro driver is connected to the power supply at the same time.
  11. Now click on the Debug icon (looks like a Spider). This will flash the code on the mircro driver. Refer to this link for more details - https://open-dynamic-robot-initiative.github.io/udriver_firmware/build_instructions.html

What to do in case of errors -

  1. if you see the error -Error connecting to the target: (Error -151 @ 0x0) One of the FTDI driver functions used during the connect returned bad status or an error. The cause may be one or more of: no XDS100 is plugged in, invalid XDS100 serial number, blank XDS100 EEPROM, missing FTDI drivers, faulty USB cable. Use the xds100serial command-line utility in the 'common/uscif' folder to verify the XDS100 can be located. (Emulation package 9.9.0.00040) , unable to connect to the source it means that the USB is not detected. (Currently investigating how to resolve this issue. )
Clone this wiki locally