DW1000 - No message receive while in sleep mode

Hello,

I’m new with DWM1000 and we are trying to undestand sleep mode. Our problem is in sleep mode it does not receive message (so no interrupt is actived).

This is my configuration

static dwt_config_t config = {
5, /* Channel number. /
DWT_PRF_64M, /
Pulse repetition frequency. /
DWT_PLEN_128, /
Preamble length. Used in TX only. /
DWT_PAC8, /
Preamble acquisition chunk size. Used in RX only. /
10, /
TX preamble code. Used in TX only. /
10, /
RX preamble code. Used in RX only. /
0, /
0 to use standard SFD, 1 to use non-standard SFD. /
DWT_BR_6M8,//DWT_BR_850K,//DWT_BR_6M8, /
Data rate. /
DWT_PHRMODE_STD, /
PHY header mode. /
(129 + 8 - 8) /
SFD timeout (preamble length + 1 + SFD length - PAC size). Used in RX only. */
};

reset_DW1000();
port_set_dw1000_slowrate();
dwt_initialise(DWT_LOADNONE);
dwt_configure(&config);
/* Calibrate and configure sleep count. This has to be done with DW1000 clocks set to crystal speed.

  • This will define the duration of the “long sleep” phase. */
    lp_osc_freq = (XTAL_FREQ_HZ / 2) / dwt_calibratesleepcnt();
    sleep_cnt = ((LONG_SLEEP_TIME_MS * lp_osc_freq) / 1000) >> 12;
    dwt_configuresleepcnt(sleep_cnt);
    port_set_dw1000_fastrate();
    // Configure sleep mode to allow low-power listening to operate properly.
    dwt_configuresleep(DWT_PRESRV_SLEEP | DWT_CONFIG | DWT_RX_EN, DWT_WAKE_SLPCNT | DWT_SLP_EN);
    // Set snooze time. This will define the duration of the “short sleep” phase.
    dwt_setsnoozetime(LPL_SHORT_SLEEP_SNOOZE_TIME);
    // Set preamble detect timeout. This will define the duration of the reception phases.
    dwt_setpreambledetecttimeout(LPL_RX_SNIFF_TIME);
    // Register RX call-back.
    dwt_setcallbacks(NULL, &rx_ok_cb, NULL, NULL);
    // Enable wanted interrupts (RX good frames only).
    dwt_setinterrupt(DWT_INT_RFCG, 1);
    // Enable low-power listening mode.
    dwt_setlowpowerlistening(1);
    // Go to sleep to trigger low-power listening mode.
    dwt_entersleep();

In not-sleep mode it works perfectly.

Thank you !
Andrea

Are you trying to configure the DW1000 into low-power-listening mode? You seem to have the configuration as per the simple example 08a. What are you using on the TX side? Example 08b?

Have you tried to see the on/off pattern on the scope - to verify that the RX is turning on/off correctly:
/* This is put here for testing, so that we can see the receiver ON/OFF pattern using an oscilloscope. */
dwt_setlnapamode(DWT_LNA_ENABLE | DWT_PA_ENABLE);

Hi,
Yes I’m trying to configure it in low-power-listening mode, you are correct, I took the code from 08a example.
On TX side I’ve another DW1000 which constantly send message. Consider in not in low power it works correctly.

Where can I find the gpio on DWM1001 for lnapa mode?

Thank you

The DWM1001 has test points for GPIOs 5&6 but they are under the can :frowning: !!! so not easily accessible. So you are using DWM1001 for this LPL example?

Yeah its a bit hard :D, we are using it, right. Have you any other example?

Thank you

Hi,I am now using DWM1001C module and Firmware_Image"DWM1001_PANS_R2.0.hex" it works well, so I want separate DWM1001C use NRF52832 and IC-DW1000, I want add PA and LNA,between the antenna and the DW1000
I found in “APS004_Increasing-the-Range-of-DW1000-Using-LNA_v1.6” and “APS009_Operating-the-DW1000-under-LAES-regulations_v1.4” ,when use PA and LNA,some GPIO and some Register must be use to control the DW1000
So how can I use DWM1001_PANS_R2.0-API to control it?
Thanks a lot

Peter Sun

Hi,
I meet the same problem with the LPL; tag sends the same message reoeatedly,but anchor can not enter the rx_ok_cb() function?

Here is my code
uint32 lp_osc_freq, sleep_cnt;

port_set_deca_isr(dwt_lowpowerlistenisr);
reset_DW1000(); /* Target specific drive of RSTn line into DW1000 low for a period. */
port_set_dw1000_slowrate();
if (dwt_initialise(DWT_LOADUCODE) == DWT_ERROR)
{
    HAL_UART_Transmit_IT(&huart6, err, 2);
    while (1)
    { };
}

port_set_dw1000_fastrate();

// dwt_setlnapamode(DWT_LNA_ENABLE | DWT_PA_ENABLE);
dwt_configure(&config);

port_set_dw1000_slowrate();
lp_osc_freq = (XTAL_FREQ_HZ / 2) / dwt_calibratesleepcnt();
sleep_cnt = ((LONG_SLEEP_TIME_MS * lp_osc_freq) / 1000) >> 12;
dwt_configuresleepcnt(sleep_cnt);
port_set_dw1000_fastrate();
port_set_deca_isr(dwt_lowpowerlistenisr);

/* Configure sleep mode to allow low-power listening to operate properly. */
dwt_configuresleep(DWT_PRESRV_SLEEP | DWT_CONFIG | DWT_RX_EN, DWT_WAKE_SLPCNT | DWT_SLP_EN);

/* Set snooze time. This will define the duration of the "short sleep" phase. */
dwt_setsnoozetime(LPL_SHORT_SLEEP_SNOOZE_TIME);

/* Set preamble detect timeout. This will define the duration of the reception phases. */
dwt_setpreambledetecttimeout(LPL_RX_SNIFF_TIME);
/* Register RX call-back. */
dwt_setcallbacks(NULL, &rx_ok_cb, NULL, NULL);

/* Enable wanted interrupts (RX good frames only). */
dwt_setinterrupt(DWT_INT_RFCG, 1);

 __HAL_GPIO_EXTI_CLEAR_FLAG(DW1000_IRQn_Pin);
setup_DW1000RSTnIRQ(1);

/* Enable low-power listening mode. */
dwt_setlowpowerlistening(1);

/* Go to sleep to trigger low-power listening mode. */
dwt_entersleep();