DW1000 Custom board receiving issue

Hi, I made my own board using DW1000 ic, with stm32f103. For interfacing with DW1000 I am using API rev 2.04 (slightly renamed functions). I got two boards, one is running ex_01a_simple_tx example program, second - running ex_02a_simple_rx code. DW1000 on receiving board has SYS_STATUS value 0x802B02, that means Receiver Data Frame Ready bit is set, but RXFCG and RXFCE are not. In user manual this situation is described as “LDE code has not been loaded
correctly and is not running correctly”. So, no good frames received yet.
That’s how my boards design looks like (4-layer, inner layers are hidden), antenna is taken from decawave board gerber.

If you are getting “LDE code has not been loaded correctly and is not running correctly” then rather than a receive problem I would suspect that you need to tell the DW1000 to load the LDE code.

Section 7.2.46.3 and a couple of other bits buried in the user manual cover this but the short version is that after power up or coming out of sleep and before enabling receive you must first set bit 15 of OTP_CTRL (register 0x2d:0x06) high and wait for it to go low again.

AndyA, thanks for your reply.

I’m setting bit 15 of OTP_CTRL by running _dwt_loaducodefromrom function

void _dwt_loaducodefromrom(void)
{
// Set up clocks
_dwt_enableclocks(FORCE_LDE);
// Kick off the LDE load
dwt_write16bitoffsetreg(OTP_IF_ID, OTP_CTRL, OTP_CTRL_LDELOAD); // Set load LDE kick bit
deca_sleep(1); // Allow time for code to upload (should take up to 120 us)
// Default clocks (ENABLE_ALL_SEQ)
_dwt_enableclocks(ENABLE_ALL_SEQ); // Enable clocks for sequencing
}

My init code is just like in examples ex_01a_simple_tx and ex_02a_simple_rx, except only i use dwt_initialise function with DWT_LOADUCODE.

Another interesting thing, that i got just the same value of SYS_STATUS - 0x802B02 - with my transmitting board turned off. So Receiver Preamble Detected and Receiver SFD Detected bits are set even without any frames send.