Need help with basic setup using STM32F413ZH and DWM3000EVB

I have received a Nucleo STM32F413ZH board which I have done some basic programming with, mainly around the push button input and LED. For my next project, I’d like to develop a basic working example using 1 tag and 1 anchor.

My goals are:

  • Program / define the anchor
  • Program / define the tag
  • Write a loop to constantly output the distance coordinates to my console
    • I’ll be using a windows PC with STM32CubeIDE, will I need to connect a second cable to the Nucleo board to receive this data or can I use the IDE for this output?

I plan to use:

  • Qty 2: STM32F413ZH
  • Qty 2: DWM3000EVB

Could someone assist with the necessary code examples for my equipment?

i dont do any development on these stuff but i know @wassfila uses DWM1001 which use an nrf52x uC. from what i know, the DWM3000 is backward compatible with the DWM1000 which means u should b able to use the same code on both. these chips use SPI interface with uC. I guess u just hav to figure out which of these pins going into the uC pins. That way u can map them from an nrf52x (of the DWM1001) and adapt the nrf52x examples to work with ur STM32 without the rf part. or u can try to figure out how these work.

1 Like

Hi @exus-mu ,

What you’re asking for should be available out of the box from the official examples provided by Decawave, I do not recommend other github repos before checking the official code.

Are you familiar with the Decawave documentation center ? Are you familiar with ST Cube IDE projects ?

https://www.decawave.com/product-documentation/

  • then go to “DWM3000 Module” and download the “DWS3000 API Software and API Guide”
  • in zip under sources you’ll fine the examples under the path
    sources\DW3000_API_C0_rev4p0\API\Src\examples\ there you have ex_05a_ds_twr_init and ex_05b_ds_twr_resp

Also to be sure which type of help is appropriate to you, may I ask if this is a student project or a commercial one ? In case of commercial, I’d recommend to start with tutorials about using Cube MX IDE from ST website, and in both cases reading the product documentation guides can help get started, at a second step the API help explain the available functions.

Thanks for responding as always. This is a non-commercial exercise for me. I have looked through the documentation center and the code examples. While it’s still above my head, I’m learning.

I am not familiar with ST Cube IDE projects. I downloaded the IDE and am trying to learn how to use it.

Correct me if I am on the wrong path, but if I were going to write the code from ds_twr_initiator.c to my device, I’d need to import that file into my project along with all of the includes.h files?

It also looks like a large number of variables are commented out so I assume I’ll need to set them prior to writing, one example is: #define RNG_DELAY_MS 1000

Given the hardware I am using, STM32F413ZH and DWM3000EVB, would I need to change any ports in the example? I know from another of your threads that the STM model I have is not directly supported for the EVB.

I think it is ok if your take your time to get familiar with the ST cube IDE, before you start porting uwb projects or adapting them to other targets.

From one side you should use ready projects for your target where you only modify the application code inside the “main” function, from another you should get familiar on how to create a project from scratch, a so called “hello world” and run it on your target. There are even videos that can help.
Then you can start larger scales projects that have many files.
In general, .h or .c is only a convention as .h are included by .c, the below principle is how the compiler works, then come the IDE on top as gui.
Little by little you’ll manage anything.