Control Agilent 6621A power supply over GPIB interface via AR488 serial adapter.
Info view
- button short press - both channels on/off
- button long press - file selector UI
- rotary encoder - adjust by 0.1 (V/I)
- rotary encoder (while pressed) - adjust by 1 (V/I)
- rotary encoder short press - flip between channels
- rotary encoder long press - flip between I/V adjustment
File view
- encoder scroll, press to run
- button cancel, back to info screen
BOOT
file (root directory) is loaded on startup- root directory is listed in the file selector screen (64 entries max, each 32 char max)
Example boot file.
Repurposed Reprap controller board.
See STM32 Cube project file and/or init code / types.rs.
Forked snapshot of AR488 GPIB IEEE-488 serial adapter.
Connector: FTDI USB serial adapter.
Example picocom
session
picocom --baud 115200 --imap lfcrlf --echo /dev/ttyUSB0
Default address / print command results
++addr 5
++auto 1
Send some commands
id?
HP6621A
sts? 1
1
err?
6
test?
0
vset 1 1.2; vset 2 2.3
Interface: 4wire (Gnd, Vcc, Rx, Tx), 115200, no flow control.
Signal levels: TTL 3.3V (works with 5V FTDI cable too).
Testing MCU serial - to - UART via USB serial
picocom --baud 115200 --imap lfcrlf --echo /dev/ttyUSB0
picocom --baud 115200 --imap crcrlf --echo /dev/ttyACM0
Use openocd
without GDB.
LTO (link time optimizaions) breaks GDB because linker generates an ELF that still refers to (now missing) inlined sections. OTOH without LTO binary doesn't fit into the flash.
Connect to the running openocd
:
nc localhost 4444
Use built-in program
script to erase/load new binary:
program target/thumbv7m-none-eabi/debug/controller
Enable debug output from the chip:
arm semihosting enable
Reset chip
reset