<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://leo.leung.xyz/wiki/index.php?action=history&amp;feed=atom&amp;title=OpenDPS</id>
	<title>OpenDPS - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://leo.leung.xyz/wiki/index.php?action=history&amp;feed=atom&amp;title=OpenDPS"/>
	<link rel="alternate" type="text/html" href="https://leo.leung.xyz/wiki/index.php?title=OpenDPS&amp;action=history"/>
	<updated>2026-11-13T14:43:21Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://leo.leung.xyz/wiki/index.php?title=OpenDPS&amp;diff=5921&amp;oldid=prev</id>
		<title>Leo: reorganized content and sections</title>
		<link rel="alternate" type="text/html" href="https://leo.leung.xyz/wiki/index.php?title=OpenDPS&amp;diff=5921&amp;oldid=prev"/>
		<updated>2021-06-10T03:59:13Z</updated>

		<summary type="html">&lt;p&gt;reorganized content and sections&lt;/p&gt;
&lt;a href=&quot;https://leo.leung.xyz/wiki/index.php?title=OpenDPS&amp;amp;diff=5921&amp;amp;oldid=5920&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>Leo</name></author>
	</entry>
	<entry>
		<id>https://leo.leung.xyz/wiki/index.php?title=OpenDPS&amp;diff=5920&amp;oldid=prev</id>
		<title>Leo: Wifi information</title>
		<link rel="alternate" type="text/html" href="https://leo.leung.xyz/wiki/index.php?title=OpenDPS&amp;diff=5920&amp;oldid=prev"/>
		<updated>2021-06-10T03:56:44Z</updated>

		<summary type="html">&lt;p&gt;Wifi information&lt;/p&gt;
&lt;a href=&quot;https://leo.leung.xyz/wiki/index.php?title=OpenDPS&amp;amp;diff=5920&amp;amp;oldid=5917&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>Leo</name></author>
	</entry>
	<entry>
		<id>https://leo.leung.xyz/wiki/index.php?title=OpenDPS&amp;diff=5917&amp;oldid=prev</id>
		<title>Leo at 05:45, 9 June 2021</title>
		<link rel="alternate" type="text/html" href="https://leo.leung.xyz/wiki/index.php?title=OpenDPS&amp;diff=5917&amp;oldid=prev"/>
		<updated>2021-06-09T05:45:36Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 05:45, 9 June 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[File:DP50V5A-DPS3005.jpg|thumb|DPS50V5A and a DPS3005|link=https://leo.leung.xyz/wiki/File:DP50V5A-DPS3005.jpg]] OpenDPS is an open source firmware that can run on the cheap DPS5005 (and similar) buck converters. The official project repo is at https://github.com/kanflo/opendps.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;==OpenDPS==&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;I have added additional features to OpenDPS including the colorful DPS-like display from the original firmware and can be found on my private repo under the &amp;lt;code&amp;gt;dps_mode&amp;lt;/code&amp;gt; branch at https://git.steamr.com/others/opendps/-/tree/dps_mode/opendps&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;The stock firmware can be overwritten with an open source firmware called OpenDPS. The official project repo is at https://github.com/kanflo/opendps. &lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;I have added additional features to OpenDPS including the colorful DPS-like display from the original firmware and can be found on my private repo under the &amp;lt;code&amp;gt;dps_mode&amp;lt;/code&amp;gt; branch at https://git.steamr.com/others/opendps/-/tree/dps_mode/opendps&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Some additional features that OpenDPS has include:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Some additional features that OpenDPS has include:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l231&quot;&gt;Line 231:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 229:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| lang = diff&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| lang = diff&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;==See Also==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* [[DPS5005]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{Navbox Tinkering}}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Tinkering]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wiki:diff:1.41:old-5914:rev-5917:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Leo</name></author>
	</entry>
	<entry>
		<id>https://leo.leung.xyz/wiki/index.php?title=OpenDPS&amp;diff=5914&amp;oldid=prev</id>
		<title>Leo: Migrated content from DPS5005</title>
		<link rel="alternate" type="text/html" href="https://leo.leung.xyz/wiki/index.php?title=OpenDPS&amp;diff=5914&amp;oldid=prev"/>
		<updated>2021-06-09T05:40:13Z</updated>

		<summary type="html">&lt;p&gt;Migrated content from &lt;a href=&quot;/wiki/DPS5005&quot; title=&quot;DPS5005&quot;&gt;DPS5005&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
==OpenDPS==&lt;br /&gt;
The stock firmware can be overwritten with an open source firmware called OpenDPS. The official project repo is at https://github.com/kanflo/opendps. &lt;br /&gt;
&lt;br /&gt;
I have added additional features to OpenDPS including the colorful DPS-like display from the original firmware and can be found on my private repo under the &amp;lt;code&amp;gt;dps_mode&amp;lt;/code&amp;gt; branch at https://git.steamr.com/others/opendps/-/tree/dps_mode/opendps&lt;br /&gt;
&lt;br /&gt;
Some additional features that OpenDPS has include:&lt;br /&gt;
&lt;br /&gt;
*Serial/Wi-Fi control&lt;br /&gt;
*A function generator (limited by hardware specs)&lt;br /&gt;
*A countdown timer&lt;br /&gt;
*A watt-hour meter (useful for checking how much power a battery took to charge)&lt;br /&gt;
&lt;br /&gt;
===Compiling and installing===&lt;br /&gt;
&lt;br /&gt;
====Software requirements====&lt;br /&gt;
You will need the following to get OpenDPS running on your power supply:&lt;br /&gt;
&lt;br /&gt;
*A STLink or STLink clone&lt;br /&gt;
*A computer with OpenOCD, ARM cross compiler (&amp;lt;code&amp;gt;gcc-arm-none-eabi&amp;lt;/code&amp;gt;), make, and git&lt;br /&gt;
&lt;br /&gt;
You may use the following Dockerfile to set up the build environment or follow the RUN step below to install the necessary dependencies.&lt;br /&gt;
&lt;br /&gt;
{{Highlight&lt;br /&gt;
| code = FROM ubuntu:20.04&lt;br /&gt;
&lt;br /&gt;
ARG ARM_TOOLCHAIN_URL=&amp;quot;https://developer.arm.com/-/media/Files/downloads/gnu-rm/10-2020q4/gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
RUN set -ex; \&lt;br /&gt;
        apt-get update; \&lt;br /&gt;
        apt-get install -y wget; \&lt;br /&gt;
        wget -O /tmp/gcc-arm-none-eabi.tar.bz2 &amp;quot;$ARM_TOOLCHAIN_URL&amp;quot;; \&lt;br /&gt;
        mkdir /opt/gcc-arm-none-eabi; \&lt;br /&gt;
        tar -xjvf /tmp/gcc-arm-none-eabi.tar.bz2 -C /opt/gcc-arm-none-eabi --strip-components 1; \&lt;br /&gt;
        rm /tmp/gcc-arm-none-eabi.tar.bz2; \&lt;br /&gt;
        rm -rf /var/lib/apt/lists/*&lt;br /&gt;
&lt;br /&gt;
# add the tools to the path&lt;br /&gt;
ENV PATH=&amp;quot;/opt/gcc-arm-none-eabi/bin:${PATH}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
RUN set -ex; \&lt;br /&gt;
        apt-get update; \&lt;br /&gt;
        apt-get install -y git openocd make python netcat&lt;br /&gt;
| lang = text&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Create the Docker image by placing the contents above into a &amp;lt;code&amp;gt;Dockerfile&amp;lt;/code&amp;gt;, then build the image by &amp;lt;code&amp;gt;running docker build -t gcc-arm-none-eabi .&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Run the image with access to your USB bus so that &amp;lt;code&amp;gt;openocd&amp;lt;/code&amp;gt; can talk to your STLink by running: &lt;br /&gt;
&lt;br /&gt;
{{Highlight&lt;br /&gt;
| code = $ docker run --rm -ti --privileged -v /dev/bus/usb:/dev/bus/usb -v `pwd`:/data gcc-arm-none-eabi bash&lt;br /&gt;
| lang = terminal&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
====Hardware====&lt;br /&gt;
[[File:STLink DPS Pinout.jpg|thumb|right|300px]]To begin, connect your STLink to the DPS as per the pinout in the picture on the right.  Connect the STLink to your computer and then apply power to the DPS power supply. OpenOCD should be able to detect the device.&lt;br /&gt;
{{highlight|lang=terminal|code=&lt;br /&gt;
pi@raspberrypi:~/opendps$ openocd -f interface/stlink-v2.cfg -f target/stm32f1x.cfg&lt;br /&gt;
Open On-Chip Debugger 0.10.0&lt;br /&gt;
Licensed under GNU GPL v2&lt;br /&gt;
For bug reports, read&lt;br /&gt;
        http://openocd.org/doc/doxygen/bugs.html&lt;br /&gt;
Info : auto-selecting first available session transport &amp;quot;hla_swd&amp;quot;. To override use &amp;#039;transport select &amp;lt;transport&amp;gt;&amp;#039;.&lt;br /&gt;
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD&lt;br /&gt;
adapter speed: 1000 kHz&lt;br /&gt;
adapter_nsrst_delay: 100&lt;br /&gt;
none separate&lt;br /&gt;
Info : Unable to match requested speed 1000 kHz, using 950 kHz&lt;br /&gt;
Info : Unable to match requested speed 1000 kHz, using 950 kHz&lt;br /&gt;
Info : clock speed 950 kHz&lt;br /&gt;
Info : STLINK v2 JTAG v17 API v2 SWIM v4 VID 0x0483 PID 0x3748&lt;br /&gt;
Info : using stlink api v2&lt;br /&gt;
Info : Target voltage: 3.236988&lt;br /&gt;
Info : stm32f1x.cpu: hardware has 6 breakpoints, 4 watchpoints&lt;br /&gt;
Info : accepting &amp;#039;telnet&amp;#039; connection on tcp/4444&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
In case your device is unique and has no support, use the bundled {{code|ocd-client.py}} script to generate a log file with all registers, hardware peripherals including ADC and DACs, timers, GPIOs, etc. If you are working on a supported device (that is, the {{code|dps-models.h}} file has mention of your model), you should be safe to skip this step. &lt;br /&gt;
&lt;br /&gt;
If your device isn&amp;#039;t listed in the &amp;lt;code&amp;gt;dps-models.h&amp;lt;/code&amp;gt; header file, it&amp;#039;s recommended that you create a few dumps of the device in different states (Off / On and set to different voltages) in order to make it easier to identify which GPIO pins and ADC/DACs are in use and for what purpose. The stock firmware may freeze when OpenOCD is used. The only work-around is to configure the device with the STLink disconnected and the re-connect the STLink when you are ready to create a dump. Dumps are created with {{code|ocd-client.py}} script like this:{{highlight|lang=terminal|code=&lt;br /&gt;
$ python ocd-client.py all &amp;gt; dump.txt&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
====Compiling====&lt;br /&gt;
To compile and flash OpenDPS on your device, clone the OpenDPS repository. I will be using my &amp;lt;code&amp;gt;dps_mode&amp;lt;/code&amp;gt; branch in the examples below, but you may substitute it with the official OpenDPS repository.&lt;br /&gt;
{{highlight|lang=terminal|code=&lt;br /&gt;
$ git clone --branch dps_mode https://github.com/kohrar/opendps.git&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
On the project root directory, compile OpenDPS:&lt;br /&gt;
{{highlight|lang=terminal|code=&lt;br /&gt;
## Compile OpenDPS and then flash it on the device:&lt;br /&gt;
$ make -C opendps flash -j 9 MODEL=DPS5005 INVERT_ENABLE=0 CC_ENABLE=0 CL_ENABLE=0 CV_ENABLE=0 POWER_COLORED=1 POWER_OFF_VISIBLE=1 THERMAL_LOCKOUT=0  FUNCGEN_ENABLE=0 SETTINGS_ENABLE=1 DPSMODE_ENABLE=1 WDOG=1 &lt;br /&gt;
&lt;br /&gt;
## Flash the boot loader:&lt;br /&gt;
$ make -C dpsboot flash &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Adjust the make flags as desired. I leave most features disabled as I prefer to only have the DPS screen and settings screen without the features.&lt;br /&gt;
&lt;br /&gt;
=====Troubleshooting compile issues=====&lt;br /&gt;
If you get an error similar to: &amp;lt;code&amp;gt;opendps/libopencm3/include/libopencm3/dispatch/nvic.h:8:11: fatal error: libopencm3/stm32/f1/nvic.h: No such file or directory&amp;lt;/code&amp;gt;, try running make without any arguments. This should pull in and build the libopencm3 dependency. This issue seems to be an issue with the Makefile on a clean build directory. &lt;br /&gt;
&lt;br /&gt;
If your firmware doesn&amp;#039;t appear to have the appropriate features as defined by the make flags, you may need to clear out all the objects and compiled binaries before building again. Just run: &amp;lt;code&amp;gt;rm opendps/*.o /data/opendps/opendps/opendps_DPS5005.*&amp;lt;/code&amp;gt;  . &lt;br /&gt;
&lt;br /&gt;
===Usage guide===&lt;br /&gt;
OpenDPS is organized by separating features into different screens. By default, the firmware will start in the DPS mode screen displaying the preset voltage, current, and power. When using OpenDPS, keep in mind the following key combinations:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Key Combination&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|On/Off button&lt;br /&gt;
|Turns on / off power&lt;br /&gt;
|-&lt;br /&gt;
|hold M1 and M2&lt;br /&gt;
|Calibration screen&lt;br /&gt;
|-&lt;br /&gt;
|SET + turn rotary&lt;br /&gt;
|Change screens left or right&lt;br /&gt;
|-&lt;br /&gt;
|Hold M1 or hold M2&lt;br /&gt;
|In DPS mode, this will recall M1 or M2&lt;br /&gt;
|-&lt;br /&gt;
|SET + M1 or SET + M2&lt;br /&gt;
|In DPS mode, this will set M1 or M2 to your current voltage/current values&lt;br /&gt;
|-&lt;br /&gt;
|Hold down rotary&lt;br /&gt;
|Locks or unlocks the UI from unintended changes&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====DPS Mode Screen====&lt;br /&gt;
The DPS Mode screen shows the voltage, current, and power output being supplied by the power supply and was designed to look and feel as close to the original DPS firmware as possible while retaining a cleaner user interface. Until this feature is merged in the official repo, you can get it by merging the pull request or use the [https://git.steamr.com/others/opendps/-/tree/d4 d4 branch on my repo]. This feature is enabled by default using the &amp;lt;code&amp;gt;DPSMODE_ENABLE&amp;lt;/code&amp;gt; flag. When building from this branch, the options I used were: &amp;lt;code&amp;gt;make -C opendps flash -j 9 MODEL=DPS5005 INVERT_ENABLE=0 CC_ENABLE=0 CL_ENABLE=0 CV_ENABLE=0 POWER_COLORED=1 POWER_OFF_VISIBLE=1 THERMAL_LOCKOUT=0 SETTINGS_ENABLE=1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:DSP5005 Interface.png|frame|center|DSP5005 Interface]] Buttons work as you would expect: {{code|V}} will allow editing of the maximum voltage. {{code|A}} will allow editing of the maximum current.&lt;br /&gt;
&lt;br /&gt;
The user interface can be locked by holding the {{code|Rotary}} down until a padlock symbol appears near the bottom of the screen.  Conversely, the interface can be unlocked by holding the {{code|Rotary}} down until the padlock symbol disappears.&lt;br /&gt;
&lt;br /&gt;
-----&lt;br /&gt;
&lt;br /&gt;
[[File:DSP5005 Third Item Interface.png|center|frame|DSP5005 Third Item Interface]] The third value on the screen can be changed using the {{code|Rotary Press}} + {{code|Rotary Turn}} combination. Values that are displayed in the third row can be edited using {{code|Rotary Press}}, or by navigating through the interface using {{code|SET}} + {{code|M1}} or {{code|SET}} + {{code|M2}}. The DPS Mode screen currently supports editing of:&lt;br /&gt;
&lt;br /&gt;
*Power Output / Power Limit&lt;br /&gt;
*Timer (time until power off, or time since power on)&lt;br /&gt;
*Brightness&lt;br /&gt;
*Watt-Hour Meter (measured in milliwatt-hours).&lt;br /&gt;
&lt;br /&gt;
------&lt;br /&gt;
&lt;br /&gt;
[[File:DSP5005 Power Interface.png|center|frame]] When the DPS unit is turned on, you will see either {{code|CC}} or {{code|CV}} signifying whether the device is in constant current or constant voltage mode. Depending on the power output limit that is set, a power output warning may be seen when power output exceeds 80% of the power limit. Exceeding the power limit will automatically turn the output off.&lt;br /&gt;
------&lt;br /&gt;
&lt;br /&gt;
[[File:DSP5005 Preset and Timer.png|center|frame]] The DPS screen supports up to two recall preset  settings. Each preset setting saves the voltage, current limit, power limit, and timer value. Recall a preset by holding {{code|M1}} or {{code|M2}}. Save a preset by holding {{code|SET}} + {{code|M1}} or {{code|SET}} + {{code|M2}}.&lt;br /&gt;
&lt;br /&gt;
If a timer is set prior to power on, a hourglass icon will flash signifying that a timer is set. When the timer elapses, power will automatically be shut off. If the timer is not set prior to power on, the timer will act as a clock and will show the duration since power on.&lt;br /&gt;
&lt;br /&gt;
===Calibration===&lt;br /&gt;
Voltage and current are controlled using a pair of DAC and ADCs. The two DACs control the output current and voltage while the two ADCs measure the current and voltage. Typically, you will need to calibrate these DACs and DACs in order to have accurate values.&lt;br /&gt;
&lt;br /&gt;
Calibration involves finding the slope (K) and offset constant (C) of the DAC/ADC curve. The curve is linear and can be found by finding two points. For DACs, we want to map the input value to the DAC (0 ~ 4096) to the actual output value (voltage or current limits). For ADCs, we want to map the ADC output (0 ~ 4096) to its actual value (voltage or current).&lt;br /&gt;
&lt;br /&gt;
Default values are defined in  {{code|dps-model.h}} but can be changed on the fly in the settings screen. To help calculating the appropriate K and C values, use the spreadsheet to calculate the DAC and ADC values.&lt;br /&gt;
&lt;br /&gt;
====DAC====&lt;br /&gt;
The DAC is the simplest to calibrate. Hit M1 and M2 buttons simultaneously to enter the calibration menu. From this menu, you can set the input DAC values for both voltage and current DACs. Alternatively, you can set the voltage DAC value by writing to register DHR12R1 at address 0x40007408 and the current DAC by writing to register DHR12R2 at address 0x40007414.&lt;br /&gt;
&lt;br /&gt;
We will map this voltage value to the actual voltage that is measured with a reference multimeter.&lt;br /&gt;
&lt;br /&gt;
For voltage:&lt;br /&gt;
&lt;br /&gt;
#Hit M1+M2 to enter calibration menu&lt;br /&gt;
#Assign {{code|Vout DAC}} a value of 50 (this is D1)&lt;br /&gt;
#Measure the voltage with a reference multimeter (V1)&lt;br /&gt;
#Assign {{code|Vout DAC}} a value of 500 (this is D2)&lt;br /&gt;
#Measure the voltage again. (V2).&lt;br /&gt;
#Calculate the K value: (D1 - D2) / (V1 - V2)&lt;br /&gt;
#Calculate the C value: D1 - (K * V1)&lt;br /&gt;
#Update values for K and C as V_DAC_K and V_DAC_C.&lt;br /&gt;
&lt;br /&gt;
The same principle applies for the current DAC but with slightly different values.&lt;br /&gt;
&lt;br /&gt;
#Hit M1+M2 to enter calibration menu&lt;br /&gt;
#Assign {{code|Iout DAC}} a value of 500 (this is D1)&lt;br /&gt;
#Connect a current sink (ideally 2+ amps). Measure the current as C1&lt;br /&gt;
#Assign {{code|Iout DAC}} a value of 1200 (this is D2)&lt;br /&gt;
#Measure the current as C2&lt;br /&gt;
#Calculate the K value: (D1 - D2) / (C1 - C2)&lt;br /&gt;
#Calculate the C value: D1 - (K * C1)&lt;br /&gt;
#Update values for K and C as A_DAC_K and A_DAC_C.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====ADC====&lt;br /&gt;
The ADC K/C values can be calibrated by calculating the original raw value based on the measured and actual voltage/current and then adjusting the existing K/C values to account for any drift. Use the spreadsheet to help with this calculation.&lt;br /&gt;
&lt;br /&gt;
#Plug in the existing K and C values to the spreadsheet&lt;br /&gt;
#First column takes a lower value.&lt;br /&gt;
##Turn the power on so that the DPS is supplying power&lt;br /&gt;
##Enter the a voltage reading as displayed&lt;br /&gt;
##Enter the actual voltage by measuring the DPS voltage output&lt;br /&gt;
#Repeat for the higher-end value&lt;br /&gt;
#Enter the new K and C values&lt;br /&gt;
&lt;br /&gt;
These steps apply to current as well.&lt;br /&gt;
&lt;br /&gt;
===Development===&lt;br /&gt;
[[File:DPSmode-Display.jpg|thumb|right|DPS Mode on OpenDPS running on a DP50V5A]]&lt;br /&gt;
OpenDPS is open source and is very easy to add new features.&lt;br /&gt;
&lt;br /&gt;
====Fonts====&lt;br /&gt;
The Makefile is capable of rendering different fonts to be used in the firmware. Copy your &amp;lt;code&amp;gt;.ttf&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;.otf&amp;lt;/code&amp;gt; font to the {{code|gfx}} directory and edit the {{code|Makefile}}. Alternatively, override the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; values and then run:&lt;br /&gt;
{{highlight|lang=terminal|code=&lt;br /&gt;
# make -C opendps fonts&lt;br /&gt;
# make -C opendps fonts METER_FONT_FILE=`pwd`/nf.ttf METER_FONT_SMALL_SIZE=16 METER_FONT_MEDIUM_SIZE=22 METER_FONT_LARGE_SIZE=30&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
====Graphics====&lt;br /&gt;
Convert a &amp;lt;code&amp;gt;.png&amp;lt;/code&amp;gt; with the script:&lt;br /&gt;
{{highlight|lang=terminal|code=&lt;br /&gt;
% python gen_lookup.py -i gfx/png/poweroff.png -o poweroff&lt;br /&gt;
Converting gfx/png/poweroff.png to gfx-poweroff.c/h&lt;br /&gt;
}}You may need to run this inside a container as the script depends on python2 and Pillow. On a Fedora 28 docker image, run:&lt;br /&gt;
{{Highlight&lt;br /&gt;
| code = # yum install redhat-rpm-config zlib-devel zlib gcc python-devel @development-tools&lt;br /&gt;
# pip install Pillow==2.2.1&lt;br /&gt;
| lang = terminal&lt;br /&gt;
}}&lt;br /&gt;
Additionally, you may encounter an error with PIL resulting in &amp;quot;&amp;lt;code&amp;gt;SystemError: unknown raw mode&amp;lt;/code&amp;gt;&amp;quot;. This requires the following change to work:&lt;br /&gt;
{{Highlight&lt;br /&gt;
| code = -    image_bytes = im.tobytes(&amp;quot;raw&amp;quot;, &amp;quot;RGB&amp;quot;) # Create a byte array in 24 bit RGB format from an image&lt;br /&gt;
+    image_bytes = im.convert(&amp;quot;RGBA&amp;quot;).tobytes(&amp;quot;raw&amp;quot;, &amp;quot;RGB&amp;quot;) # Create a byte array in 24 bit RGB format from an image&lt;br /&gt;
| lang = diff&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Leo</name></author>
	</entry>
</feed>