Porting dw1000 examples to stm32f103rbt6


I am trying to run the dw1000 examples on a stm32f103rbt6 instead of the stm32f105xx. Although this board has only USB and no USB-OTG. I am trying to compile this in keil, but i get errors.

Is there a way to disable USB completely in the example?
What for is USB-OTG used in this application?

And my overall question, is it possible to do this? And if so what do i need to do to fix this.

Kind regards,

Maybe someone has this already this porting done and sends you a project, otherwise I suggest you take a stm32f103rbt6 SPI example and port across the DW1000 driver. Also would be good to tell folk your toolchain.
Good luck!

Hello Kenneth :slight_smile:
Please help!

We ported coocox code (2p10) to stm32f103 (as a tag) however we feel something is missing. The tag is not found by the Trek anchor.

Pease share some tips to debug further.

Here are few observations;

  1. SPI transaction is seen only once after the reset.
  2. Don’t know whether the default code will straight away work in MCU 103 series
  3. We are using internal PLL set to 36MHz. Is this a problem?
  4. In tag code, Switch 1 we are hard coding with 0x71 (ch 2, 110k, id 000) is this correct way?
  5. TX LED in DWM1000 is not blinking.

What is the safest way to start with firmware…?


You may be aware but the Decawave code often changes the speed of the SPI. (The DW1000 needs configuring before you can use high speed). It might be that different clock rates in the 105 and 103 cause a problem when the SPI speed is changed. Just an idea but worth checking.


2.10 is firmware for the TREK evb1000. This would mean a lot of (unnecessary) code to port, which would add complexity to the porting.

Maybe start Porting one of the simple , less complex, examples instead, like 5a/5b or one of the other RX/TX examples.
You could then check also if your board is not causing errors.