Strange bevavior in configing evb1000 with external MCU


I am porting simple tx example code to stm32l476 and connected the SPI of the stm32l476 eval board
to J6 of an evb1000 after I switched S2, following evk1000 user’s manual (section 4.4). The spi read and write are OK.
I am able to read deca0130 and write to register 01, 03 etc. I made sure the spi read/write are consistent
and reliable.

Then I tried some dwt api’s (initializing dw1000):

result = dwt_initialise(DWT_LOADUCODE);

Somehow, after running these commands (I think it was dwt_initialise), the evb1000 starts to behave abnormal –
reading register 0x0 returns “random” numbers (a different hex number each time), instead of “deca0130”.
Removing these dwt spi’s in my code, reloading the code and restarting evb1000 do not help – the evb1000 stays in this state.

I got the same behavior on two of evb1000 boards. I thought it was straightforward once you have spi working … I was able to make my respbarry pi and another mini-cpu to work with an evb1000 following the same practice.

I wonder if it is possible to “mess up” the “code” on dw1000. If so, how to recover from it. Also what could go wrong to get into this state. I am stuck now… Please advise. It was urgent. Thanks so much in advance.


What is the SPI rate when you are calling dwt_sofreset and dwt_initialise?

You cannot “break” DW IC, you should be able to get it to default state by completely discharging, and then re-powering.

OK. It turned out the SPI speed is too high (> 4Mbps) when I call dwt_initialize. After I reduce the spi speed, the chip behaves normal now. Thanks.