Configuration of DWM1001C module using STM32F4

Dear all,
I have bought DWM1001 module and trying to configure them as anchors and tags using external STM32F4 board. I am unable to figure out how to proceed with it. I came across Android APK but that can be only used if I have MDEK1001 kit and many posts are there based on DWM1001 development board.
Please pour some ideas on how it can be configured or already did in a similar way. Thank you in advance

Hi Suman,

the DWM1001C modules come empty as far as I know. So you need to program it first (via SWD).

Then you can use the DRTLS Android Manager the same as for the MDEK1001 kit. You do not need the kit to be able to use PANS functionalities.


Thanks for the info @leapslabs
At present I am trying to flash the hex file by referring different blogs and posts and used the following options

  1. keil uvision ( installed drivers related to nrf52832_XXAA and then tried to flash DWM1001_PANS_R2.0.hex by setting “options for target” , but was successful to flash it)
  2. Tried converting ST-LINK V2 to J-LINK based on some link but was unsuccessful as is stuck at upgrading for long hours)
  3. tried using openOCD but was in vain.

Now I am really really frustrated because I dont have other options and the above mentioned options aren’t working.

Please help me in this regard.

I use OpenOCD-20191029-0.10.0 without problem, I share my configuration and the commands I use.

cmd on windows
cd C:\Users\FLX\Documents\smartsoft\decawave\OpenOCD-20191029-0.10.0\bin

openocd -f interface/stlink.cfg -f target/nrf52.cfg -c “gdb_flash_program enable” -c “gdb_breakpoint_override hard” -c “adapter_khz 480”

# STMicroelectronics ST-LINK/V1, ST-LINK/V2, ST-LINK/V2-1, STLINK-V3 in-circuit
# debugger/programmer

interface hla
hla_layout stlink
hla_device_desc "ST-LINK"
hla_vid_pid 0x0483 0x3744 0x0483 0x3748 0x0483 0x374b 0x0483 0x374d 0x0483 0x374e 0x0483 0x374f 0x0483 0x3752 0x0483 0x3753

# Optionally specify the serial number of ST-LINK/V2 usb device.  ST-LINK/V2
# devices seem to have serial numbers with unreadable characters.  ST-LINK/V2
# firmware version >= V2.J21.S4 recommended to avoid issues with adapter serial
# number reset issues.
# eg.
#hla_serial "\xaa\xbc\x6e\x06\x50\x75\xff\x55\x17\x42\x19\x3f"


# Nordic nRF52 series: ARM Cortex-M4 @ 64 MHz

source [find target/swj-dp.tcl]

if { [info exists CHIPNAME] } {
} else {
	set _CHIPNAME nrf52

# Work-area is a space in RAM used for flash programming
# By default use 16kB
if { [info exists WORKAREASIZE] } {
} else {
   set _WORKAREASIZE 0x4000

if { [info exists CPUTAPID] } {
} else {
	set _CPUTAPID 0x2ba01477

swj_newdap $_CHIPNAME cpu -expected-id $_CPUTAPID
dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu

target create $_TARGETNAME cortex_m -dap $_CHIPNAME.dap

adapter_khz 1000

$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0

if { ![using_hla] } {
	cortex_m reset_config sysresetreq

flash bank $_CHIPNAME.flash nrf5 0x00000000 0 1 1 $_TARGETNAME
flash bank $_CHIPNAME.uicr nrf5 0x10001000 0 1 1 $_TARGETNAME

commad for telnet

reset init
flash banks
flash erase_sector 0 0 last 
flash write_image E:/Decawave_DWM1001_VirtualBox_Image/DWM1001/Factory_Firmware_Image/DWM1001_PANS_R2.0.hex 0

best regards

1 Like

@Fdiaz Thanks allot. That was a great help indeed . I could atleast get started.

I followed your instructions but I am getting error while flashing data.
For your reference, I am attaching the image. Please do let me know what this error is all about .
Thank you in advance.
Telnet host:

it may be a stlink version theme, I have V2J32S7
When I start the opencdc I get the following:

Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : clock speed 4000 kHz
Info : STLINK V2J32S7 (API v2) VID:PID 0483:3748
Info : Target voltage: 3.235884
Info : nrf52.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : Listening on port 3333 for gdb connections

It is important to respect the order of the instructions as follows:
openocd -f interface/stlink.cfg -f target/nrf52.cfg -c “gdb_flash_program enable” -c “gdb_breakpoint_override hard” -c “adapter_khz 4000

reset init
flash erase_sector 0 0 last
flash write_image E:/Decawave_DWM1001_VirtualBox_Image/DWM1001/Factory_Firmware_Image/DWM1001_PANS_R2.0.hex

sometimes an unstable power source can cause erratic behavior, make sure you have 3.3v with at least 300mA


finally, it worked @Fdiaz and the issue was the unstable power supply.

Thank you so much.

Hello @sjain I’m working also with DWM1001C without dev board, do you have the diagram connection between dwm100c and STM32F4 ??

The code shared by @Fdiaz works…

Ok @sjain but how did you connect DWM100Cand STM32F4?
Do you have a pin diagram for connections?

Is it resolved?
Sorry for the delay.

@sjain Can you show me how to connect DWM1001C and STM32F4
And what do you use, Keil uvision?

thanks for your help

Hi Fdiaz,

I have a doubt regarding ur configuration, am trying to program/debug the DWM1001 without using the DEV board, and unavailability of J-link debugger, am shifting to ST-link

  1. Open OCD + STLink debugger directly connected to DWM1001
  2. Open OCD + STLink debugger +STM32(Which is interfaced with DWM1001)
    which of the above 2 configuration are you using ?

It would be of great help, if you could clear me this.