MicroPython

Although alpha:ONE comes with MicroPython preinstalled, users may want to update the firmware. Below all MicroPython firmwares for the corresponding hardware versions and revisions can be downloaded. Further is explained how to flash the firmware on the board.

MicroPython for alpha:one is a branch out of MicroPython v1.13 for pyboard v1.1, see micropython.org.

Firmware versions

Below are listed all MicroPython firmware versions for the corresponding alpha:ONE hardware.

alpha:ONE v1.0 Rev B:

Flashing firmware

Here is a short instruction on how to flash MicroPython from a Windows OS (Windows 10).
Some software tools are needed:

Zadig is used to install the USB driver needed to connect to microcontroller. dfu-util (DFU Device Firmware Update) is used to flash MicroPython on the microcontroller. PuTTY is used as a terminal for communication between host (your computer) and microcontroller.

Instruction to flash MicroPython on alpha:ONE’s microcontroller:

  1. Install the above mentioned software.

  2. Download the MicroPython firmware which corresponds to alpha:ONE’s hardware. Extract the compressed folder and copy the .dfu file (e.g. alphaone_v1.0_Rev_C_micropython_v1.0.dfu) in the dfu-util-0.9-win64 folder (e.g. dfu-util v0.9) - where dfu-util.exe is located.

  3. Connect alpha:ONE to host over USB and open Zadig and install the required USB driver.

  4. With the following steps alpha:ONE will be set in boot mode. Here are two ways of how to do that:

    1. Set in boot mode with hardware:

      1. Hold down the USR switch.

      2. While still holding down USR, press and release the Reset switch.

      3. The LEDs will then cycle green to orange to green+orange and back again.

      4. Keep holding down USR until only the orange LED is lit, and then let go of the USR switch.

      5. The orange LED should flash quickly 4 times, and then turn off.

      6. Now alpha:ONE is in boot mode.

    2. Set in boot mode with software:

      1. No jumper are needed, just connect alpha:ONE to host over USB.

      2. Open Device Manager (Windows), under Ports (COM & LPT) the COM port used by alpha:ONE can be find out.

      3. Open PuTTY select Serial and type in the COM port name under Serial Line (e.g. COM10), let Speed on 9600. Then hit Open to open REPL. In the first lines in REPL the MicroPython version should be stated.

      4. Set alpha:ONE in boot mode with:

        import pyb
        pyb.bootloader()
        
      5. PuTTY shows that REPL lost connection, alpha:ONE is now in boot mode.

  5. Open a terminal on host, such as Command Prompt, and navigate to the dfu-util folder, where dfu-util.exe is located. Make sure that the MicroPython firmware has been copied into folder (more easy).

  6. Check if alpha:ONE is available by typing dfu-util -l. Lines with FOUND DFU: … should appear.

  7. Flash the MicroPython firmware with dfu-util –alt 0 -D <firmware_name.dfu>, e.g. dfu-util –alt 0 -D alphaone_v1.0_Rev_C_micropython_v1.0.dfu

  8. Wait until the flashing is concluded. Reboot with a power cycle or pressing Reset. The firmware has been flashed successfully and alpha:ONE is ready to be programmed.

MicroPython license information

The MIT License (MIT)

© Copyright 2020, systematica GmbH

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.