Flashing Firmware

The firmware for the PSLab can be downloaded from https://github.com/fossasia/pslab-firmware/releases

Each version of the PSLab requires a custom firmware for the respective board. The version of the board is contained in the filename.

Please refer to the chapter which matches your use-case.

PSLab v6

For the PSLab v6 two flavors of the firmware are available:

  • the regular firmware

  • with WiFi support

Both firmwares support different use-cases, but are flashed the same way.

Regular Firmware

This version of the firmware supports all features of the board, except WiFi access.

Firmware with WiFi Support

WiFi support requires an additional ESP01 chip. To utilize that chip some signal lines need to be repurposed. This is the reason why sensor support is missing in this version of the firmware.

For more details regarding the firmware for the ESP01 see https://github.com/fossasia/pslab-esp01-firmware/

Flashing the Firmware

Prerequisites

The following requirements need to be met to flash the firmware to the PSLab v6:

To install the firmware:

  1. Connect the PSLab v6 board to the computer

  2. Enter boot mode:

    1. press and hold the ‘BOOT’ button

    2. press and release the ‘RESET’ button

    3. release the ‘BOOT’ button when the RGB-LED changes to purple

  3. Run mcbootflash --port <portname> -b 460800 pslab-firmware.hex

  4. Reset or power cycle the board

The port name is usually similar to COM3 on Windows systems. You should be able to find it in the Windows Device Manager. The device is called ‘Silicon Labs CP210x USB to UART Bridge’.

On Linux systems the port name is similar to /dev/serial/by-id/usb-Silicon_Labs_CP2102N_USB_to_UART_Bridge_Controller_5ecc207eeba8eb11828e98374232452f-if00-port0. The UUID part of the name is different for every individual board.

PSLab v5

The easiest way to flash the PSLab v5 board requires:

To install the firmware:

  1. Edit flash.mdbscript to point to the correct path to the firmware file

  2. Disconnect the device from any power source

  3. Connect the programmer to the device’s ICSP header

  4. Power on the device via USB

  5. Run mdb.sh flash.mdbscript or mdb.bat flash.mdbscript (depending on your operating system)

  6. Disconnect the programmer and power cycle the board

On Linux systems mdb.sh can be found in /opt/microchip/mplabx/v6.25/mplab_platform/bin (the version number in the path may vary).

On Windows systems mdb.bat can be found in C:\Program Files\Microchip\MPLABX\v6.25\mplab_platform\bin (the version number in the path may vary).