DPS5005

From Leo's Notes
Last edited on 9 June 2021, at 05:42.
DPS50V5A and a DPS3005

The DPS5005, and related DPS3005, DPS5015, DP50V5A, are smart buck regulators and can be used as a budget 'bench' power supply modules. These units are powered by a STM32F100 microprocessor and includes a 1.44" TFT color LCD display.

The more recent versions of DP50V5A and the DPS5005 are virtually identical except for the difference in firmware. The DP50V5A has an inferior firmware which makes the interface laggy along with a slight difference in how the M1/M2 buttons are mapped. Despite these differences, OpenDPS can be installed and the button mappings can be made to work in the same manner.

Custom firmware[edit | edit source]

You can load a customized open source firmware called OpenDPS. All you need is a STLink and some fine wire to connect to the JTAG on the back of the unit and a computer that can run OpenOCD.

STM32 flash information[edit | edit source]

The STM32F100 has a 64KB/(128KB?) flash. The original firmware is protected and cannot be read. You can disable readout protection by unlocking the STM32 microcontroller but this will wipe all existing data.

$ telnet localhost 4444
> flash list
{name stm32f1x base 134217728 size 131072 bus_width 0 chip_width 0}
> flash banks
#0 : stm32f1x.flash (stm32f1x) at 0x08000000, size 0x00020000, buswidth 0, chipwidth 0

> halt
target halted due to debug-request, current mode: Handler HardFault
xPSR: 0x61000003 pc: 0x080001d2 msp: 0x200007a8

> stm32f1x options_read 0
Option Byte: 0x3fffffe
Readout Protection On
Software Watchdog
Stop: No reset generated
Standby: No reset generated
User Option0: 0xff
User Option1: 0xff

Readout Protection is set to On, which can be changed by changing the Read Protection (RDP) level. There are 3 levels:

  • 0: No read protection.
  • 1: Read protection enabled.
  • 2: Debug/chip read protection disabled. Will disable JTAG, which is bad for our case.

By changing the RDP value from 1 to 0, you will erase the flash.

> stm32f1x unlock 0
Device Security Bit Set
target halted due to breakpoint, current mode: Handler HardFault
xPSR: 0x61000003 pc: 0x2000003a msp: 0x2000076c
stm32x unlocked.
INFO: a reset or power cycle is required for the new settings to take effect.

> stm32f1x options_read 0
Option Byte: 0x3fffffc
Readout Protection Off
Software Watchdog
Stop: No reset generated
Standby: No reset generated
User Option0: 0xff
User Option1: 0xff

Notes[edit | edit source]

On a DPS5005, these are the values I see:

> flash list
{name stm32f1x base 134217728 size 0 bus_width 0 chip_width 0}{name stm32f1x base 134217728 size 0 bus_width 0 chip_width 0}
> stm32f1x options_read 0
device id = 0x10016420
STM32 flash size failed, probe inaccurate - assuming 128k flash
flash size = 128kbytes
Option Byte: 0x3fffffe
Readout Protection On
Software Watchdog
Stop: No reset generated
Standby: No reset generated
User Option0: 0xff
User Option1: 0xff

See Also[edit | edit source]