I have an issue sometimes where the dwm1000 receive, timeout or packet error interrupt doesn’t fire when I set the device to receive frames. In such a scenario I’m usually stuck in one place waiting for interrupt to fire because these interrupts have flags and counters which I use to check if I have a valid packet or not. I am using the interrupt examples given by decawave.
Could this issue be because of interrupt priority settings in the microcontroller for using other interrupt types? Or may there be another reason? Because this issue happens when normal operation is going on and then all of a sudden it stops receiving packets.
What RF config are you using (Datarate, Channel, PRF, Preamble etc…) and what example code?
You could monitor / poll register 0x19 to see if any states changing.
For details on this register see the debugging application note APS022 section 4.3 The System States on page 11. https://decawave.com/support/software
You could also leave the device in RX and see if it will receive frame/error and/or change the PAC size, see reg 0x27:08 in the User Manual, and see if receiver receives a frame or error?
I am using the following configuration for communication.
1, /* Channel number. /
DWT_PRF_64M, / Pulse repetition frequency. /
DWT_PLEN_1024, / Preamble length. Used in TX only. /
DWT_PAC32, / Preamble acquisition chunk size. Used in RX only. /
11, / TX preamble code. Used in TX only. /
11, / RX preamble code. Used in RX only. /
1, / 0 to use standard SFD, 1 to use non-standard SFD. /
DWT_BR_110K, / Data rate. /
DWT_PHRMODE_STD, / PHY header mode. /
(1025 + 64 - 32) / SFD timeout (preamble length + 1 + SFD length - PAC size). Used in RX only. */
Okay I will see register 0x19 for events. But I’m already using register 0x0F to debug for events and it shows that I have successfully received a packet, is this the same thing as register 0x19 or is slightly different?
Also using the dwt_readdiagnostics() function in this situation gives the preamble accumulator value and it shows 4095, usually this value is less than 1024 for the packets that are being used. One more thing, the value of the packet length is 1023 when I read register 0x10. My settings are for standard length of 127. I’m going to investigate a bit further and get back. Is there a way to reset the receiver apart from the dwt_rxreset() function? Because this is not having any effect.
Also shouldn’t the PAC size be within recommended range? For 1024 length preamble PAC is supposed to be 32.