I am moving the code of anchor from that can range to tag normally STM32L0 MCU to DW1000 + stm32f4 platform(the sch of dw1000 is the same as stm32l0 platform). The SPI baudrate is 20 MHz for high speed and 2.5 MHz for low. The moved code can get devId and init inittestapplication successfully.
The timeout of dwt_setrxtimeout and dwt_setpreambledetecttimeout is init 0 in TA_INIT state. It enable receive by dwt_rxenable(DWT_START_RX_IMMEDIATE) in state TA_RXE_WAIT.
The problem is :
The anchor enter invalid interrupt very frequently(millisecond level) meanwhile there is no uwb_signal around the anchor, when it is waiting data from tag in TA_RX_WAIT_DATA state in function of instance_run. The value of system event status register @ address 0x0F is 0x04800103 or 00801303 in interrupt handler. These bits indicate:
bit 8 – RXPRD, Receiver Preamble Detected status,
bit 9 – RXSFDD, Receiver SFD Detected,
bit 23 – SLP2INIT, SLEEP to INIT,
bit 26 – RXSFDTO, Receive SFD timeout,
and so on
I am sure DW1000 output the interrupt signal exactly.
I feel puzzled that DW1000 output the interrupt signal when there is no uwb_signal around anchor and detect preamble signal. I think DW1000 can not output the interrupe signal at this time.
Does anyone know why?