0

Firmware

Almost all ML-R boards use microcontrollers. Their firmware is always upgradeable. However, an external programmer is needed, either original ST, like ST-LINK/V2, or a cheap compatible bought in Ebay or Aliexpress. The compatible costs less than $2, shipping charges included.

An exception is MRMS ESP32: Arduino, IMU, eFuse, BT, WiFi, CAN Bus (mrm-esp32), which doesn't use an ARM microcontroller. Its software is uploaded using USB connection so no special programmer is needed.

Hookup

All the ML-R board use SWD interface for programming and all have the same pinout of the connector used for programming. Sequence of pins in a 5-pin Dupont connector is: LogicVoltage, SWCLK, GND, SWDIO, RESET. LogicVoltage is usually 2.8 or 3.3 V. This information uses the programmer to read target board's logic voltage. For example, take a look at MRMS reflectance sensors 6x, CAN, analog, I2C (mrm-ref-can6) depicted left. There is a place for soldering 5-pin Dupont header top left, the holes labeled "RST", "SWDIO",.... That is the programming connector's place. In the picture there is also a standard JTAG connector, the same ST-LINK/V2 and ST-LINK/V3 use. It is bigger than the connector usually found in compatible programmers but it doesn't matter. Just locate the pins needed for SWD.

Take a 5-pin Duont 0.1" header. Connect Your programmer with Dupont wires to the appropriate pins of 5-pin connector, so that the pins match target board's signals. It is possible to solder the 5-pin connector to the board, but it is not advisable as the board gets unwieldy and the header will be used quite rarely. Connect the programer to Your computer using USB cable.

Download and choose firmwmare

Go to https://github.com/PribaNosati/MRMS-ARM, click on "Code" and "Download ZIP" to download firmware files for all ML-R boards. Unzip the downloaded file.

Now, we have to select appropriate file. File name consists of 3 parts and looks like this: [part 1][part 2][part 3].hex, for example mrm-ref-can_v1.0_ver7.hex.

  1. Note device's item key, for example "mrm-ref-can". This is part 1.
  2. Now about part 2. 2 possibilities exist.
    1. It can be completely empty like in "mrm-ref-can_ver3.hex". This is either universal version or, if the version below exists, crystal-less version.
    2. It can be "_v1.0", like in "mrm-ref-can_v1.0_ver3.hex". This is a crystal version. The crystal is depicted left. Only if you find an element that looks like that, You should use this version. In all other cases, use previous firmware.
  3. Part 3 is version number. Choose the biggest one.
  4. Locate appropriate .hex file and remember You choice.

Command "fir"

×

Typing "fir" (standing for "firmware") in ML-R console, You can list all the connected boards' firmware versions.

If Your version is the same as the downloaded, (part 3 in the previous paragraph) You already have the latest version installed. No further action is needed and the procedure is over.

Otherwise continue with the next paragraph.

Download and use programmer

×

  1. Download, install, and run ST's STM32CubeProgrammer software.
  2. Click on "Connect" (1). You should get confirmation messages in "Log" part.
  3. Click on icon (2) to go to chip-programming part.
  4. Use "Browse" (3) to locate .hex file selected in the previous paragraph.
  5. Insert the 5-pin Dupont header (with the wires connected to the programmer) into the board's matching 5 holes. Bend the header firmly so that electrical contact of all 5 pins is assured.
  6. Now, using Your other hand, click on "Start Programming" (4).