Thu, 07 Oct 2021 22:24:45 +0200

David Douard <>
Thu, 07 Oct 2021 22:24:45 +0200
changeset 69
parent 59

Possibly fix the 'reset FP while running' case

# Replacement front panel for the HP/Agilent 34970A - firmware

This repository contains the firmware for the replacement front panel for the
HP 34970A acuisition unit described

It is based on the [Mbed-os]( framework and uses the
[platformio]( development environment.

Make sure to have this later properly installed (I suggest you install it in a
Python 3 virtualenv).

The firmware has been developped using platformio version 5.0.3 and Mbed-os 6.2.

## Compilation

It should be a simple matter of calling:

(pio3) ~/p/p/hp34970disp$ pio run -e fp_dfu
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [==        ]  21.4% (used 14048 bytes from 65536 bytes)
Flash: [==        ]  22.9% (used 90040 bytes from 393216 bytes)
========================================== [SUCCESS] Took 28.13 seconds ==========================================

Environment    Status    Duration
-------------  --------  ------------
fp_dfu         SUCCESS   00:00:28.129
========================================== 1 succeeded in 00:00:28.129 ==========================================


Note: the `platformio.ini` provides 2 similar environments (`fp_dfu` and
`fp_stlink`) which are identical but the `upload_protocol`.

## Uploading the firmware

You can upload the firmware either via the (USB) DFU mode or the SWD/STLink
port on the PCB. Note that the USB socket on the PCB does not power the board,
so it must be already powered (which is typically when the board is connected
to the main CPU board of the HP 34970A).

In order to be able to upload the firware by DFU, the STM32 MCU on the front
panel must be booted in DFU mode, which can be done by pressing the DFU button,
then the RESET button while keeping the DFU pressed.

The STLink upload method does not need the board o be booted in DFU mode.

(pio3) ~/p/p/hp34970disp$ pio run -e fp_dfu -t upload


(pio3) ~/p/p/hp34970disp$ pio run -e fp_stlink -t upload

## Credits

THis firmware uses a modified version of the [UniGraphic]() library and the
[QEI]() library.

## Notes (deprecated)

Use mbed 6

For some reason I had to disable mbed-client-cli/ (multiple definition of `cmd' error at
link time).
Put a .mbedignore file in:

$ cd /home/david/.platformio/packages/framework-mbed@6.51504.200716/features
$ cat .mbedignore