How to use dw1000 API?

Good morning,

My question is a basic and probably simple one, but since it’s a first time I am using this kindof system I am a bit lost.

I want to use the dwm1000 connected to a STM32 microcontroller via SPI to get some rangings. Therefore I would like to use the dw1000 API functions. I redthe documentation and the examples code, but I am not sure it fits in every situation.

Let’s say I wanna use dwt_writetxdata(…) for example. Should I right it in the STM32 code ? If so how do I configure the spi bus (just to locate the chip for example) ?

Thank you in advance.