Firmware for the replacement front panel for the HP34970A acquisition unit
d193c24a078a — David Douard default tip a month ago
Add links to sr.ht repos and add an image in the README file
Make sure to send pending keys
Possibly fix the 'reset FP while running' case

heads

tip
browse log

clone

read-only
https://hg.sr.ht/~douardda/hp34970-firmware
read/write
ssh://hg@hg.sr.ht/~douardda/hp34970-firmware

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

HP34970A with new front panel

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

The kicad project for the PCB design is located here.

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

or

(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 mbed-client-cli/* frameworks/mbed-client-cli/*

see https://docs.platformio.org/en/latest/frameworks/mbed.html#ignoring-particular-components