target icon

Purpose

This tutorial is basically a documentation about the two switches on the daughter board.

list icon

Prerequisites

  • The Pyboard and the training daughter board from HyperPanel Lab (pict01).
  • A installation of an Hyperpanel OS release on a Linux PC, including tools for flashing and debugging. You need at least two USB ports on the computer (one for flashing and running, one for terminal).
  • The Olimex ARM-USB-OCD interface & cables (pict02).
  • A USB/Mini-USB cable (pict03).

list icon

Software release

hypv9wr61 and higher.

align left icon

Description

On the daughter board, there are 2 switches to the left of the red LED. These two switches have different functions. The one on the left (switch 1) is used to define how to flash the Pyboard (from the Olimex interface or from the USB). The one on the right (switch 2) is used to define how the Pyboard is powered (from the JTAG interface or from the USB).

1.

Switch “1” – OFF – Flashing from JTAG.

This mode (pict04) is used for flashing the software with the JTAG.

– Connect the Pyboard to the JTAG and the JTAG to USB on computer (pict08)

>> hgdb
(gdb) romload stm32py myapp

2.

Switch “1” – ON – Flashing from USB.

This mode (pict05) is used for flashing the software from the USB.

– If not already installed, install “pip” and “pyusb” tools.

>> sudo apt-get install pip
>> pip install pyusb

– For converting the software to “dfu” format, enter following commands:

>> exe
>> python $hhome/os/linux/dfu.py -b 0x08000000:hypos.bin hypos.dfu

– With the Pyboard unplugged, set the switch “1” to ON.

– Plug the USB/Mini-USB cable from the Pyboard to USB on computer.

– For flashing the software, enter following commands:

>> exe
>> python $hhome/os/linux/pydfu.py -u hypos.dfu

3.

Switch “2” – OFF – Power from USB.

In this mode (pict06), the Pyboard is powered by the computer, thrue the
Mini-USB scart of the Pyboard (pict09).

4.

Switch “2” – ON – Power from JTAG.

In this mode (pict07), the Pyboard is powered by the computer, thrue the
Olimex and the JTAG connector (pict08).