Dobrica Pavlinušić's random unstructured stuff
DPS5005: Revision 11
OpenDPS
pinoutupgrade to opensource firmwarehttps://github.com/kanflo/opendps.git dpavlin@nuc:/nuc$ git clone --recursive https://github.com/kanflo/opendps.git dpavlin@nuc:/nuc$ cd opendps/ dpavlin@nuc:/nuc/opendps$ make -C libopencm3 dpavlin@nuc:/nuc/opendps$ make -C opendps st-linkconnecting rst pin to unpowered st-link stops dps5005 from booting https://johan.kanflo.com/upgrading-your-dps5005/ pi@pihdmi:~ $ sudo openocd -f interface/stlink-v2.cfg -f target/stm32f1x.cfg Open On-Chip Debugger 0.10.0+dev-01489-g06c7a53f1-dirty (2020-11-14-15:21) Licensed under GNU GPL v2 For bug reports, read http://openocd.org/doc/doxygen/bugs.html WARNING: interface/stlink-v2.cfg is deprecated, please switch to interface/stlink.cfg Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'. Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD Info : Listening on port 6666 for tcl connections Info : Listening on port 4444 for telnet connections Info : clock speed 1000 kHz Info : STLINK V2J28S7 (API v2) VID:PID 0483:3748 Info : Target voltage: 3.273018 Info : stm32f1x.cpu: hardware has 6 breakpoints, 4 watchpoints Info : starting gdb server for stm32f1x.cpu on 3333 Info : Listening on port 3333 for gdb connections from another terminal pi@pihdmi:/nuc/opendps $ ./ocd-client.py all | tee 5V-off.txt # exit openocd, turn output on pi@pihdmi:/nuc/opendps $ ./ocd-client.py all | tee 5V-on.txt client softwarepi@pihdmi:/nuc/opendps $ pip3 install -r requirements.txt Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting crc16==0.1.1 (from -r requirements.txt (line 1)) Downloading https://www.piwheels.org/simple/crc16/crc16-0.1.1-cp37-cp37m-linux_armv7l.whl Requirement already satisfied: pyserial==3.4 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 2)) (3.4) Installing collected packages: crc16 Successfully installed crc16-0.1.1 pi@pihdmi:/nuc/opendps $ cd dpsctl/ pi@pihdmi:/nuc/opendps/dpsctl $ python3 ./dpsctl.py --device /dev/ttyUSB2 --ping Error: timeout talking to device /dev/ttyUSB2. # swap rx/tx pins pi@pihdmi:/nuc/opendps/dpsctl $ python3 ./dpsctl.py --device /dev/ttyUSB2 --ping Got pong from device pi@pihdmi:/nuc/opendps/dpsctl $ python3 ./dpsctl.py --device /dev/ttyUSB2 --query Func : cv (on) voltage : 5000 current : 1000 V_in : 10.77 V V_out : 5.03 V I_out : 0.001 A pi@pihdmi:/nuc/opendps/dpsctl $ python3 ./dpsctl.py --device /dev/ttyUSB2 -o off pi@pihdmi:/nuc/opendps/dpsctl $ python3 ./dpsctl.py --device /dev/ttyUSB2 --query Func : cv (off) voltage : 5000 current : 1000 V_in : 10.78 V V_out : 1.73 V I_out : 0.001 A pi@pihdmi:/nuc/opendps/dpsctl $ python3 ./dpsctl.py --device /dev/ttyUSB2 --query Func : cv (off) voltage : 5000 current : 1000 V_in : 10.78 V V_out : 0.01 V I_out : 0.000 A serial upgradepi@pihdmi:/nuc/opendps/dpsctl $ python3 dpsctl.py --device /dev/ttyUSB2 -U ../opendps/opendps_DPS5005.bin Download progress: 2% Error: timeout talking to device /dev/ttyUSB2. SEL on power-on to stay in bootloader |