Getting stuck in dwt_writetxdata()

Hi,

I have some problem after have transmitted and received around 40 000 messages, suddenly the DWM1000 driver get stuck when it enters dwt_writetxdata(), then dwt_writetodevice(), and finally spend it’s forever time in dwt_writetospi(). and never get back out from this constellation.
Anyone that have an idea what could be the issue with this?
Right now I am thinking that a watchdog is the only short term solution. But what could be the reasons for it to get stuck like this?

Any help, and thought’s is appreciated.
/ Johan

Well, dwt_writetospi() is specific to your MCU, and isn’t provided by decawave. So presumably, the issue is due to that function that you wrote?

What MCU host controller are you using, and what does dwt_writetospi() look like?

Which HW/SW are you using ?

If you are not handling interrupts properly and mutexes around SPI read and writes or using multi threaded code … this could be the reason …

Hi,

The hardware is DWM1000, and SW: dw1000_api_rev2p04. (Hunter: dwt_writetospi is a decawave function).
Yes, that sounds like a valid reason to it’s malfunction.
Don’t really understand how the decamutexon(), decamutexon(off) is supposed to be implemented… Have to study this closer.

Really thanks for the advice, make sense.