DWM1001 high current consumption during sleep

Hi,
I’m developing an custom firmware for DWM1001 and after initial test I faced a problem that the module consume about 4-7ma in sleep mode and about 18ma in idle mode . I have done the measurements directly on module and there no other components on the board.
By idle mode I mean I just connect the power to the module and erased the NRF52832 chip entirely .
and by sleep mode I mean this code :

[code]int main(void)
{
nrf_gpio_cfg_output(LEDA);
nrf_gpio_pin_clear(LEDA);
dwt_rxdiag_t diagData;
nrf_gpio_cfg_output(SPI_SS_PIN);
SPILowSpeedInit();
/* Reset and initialise DW1000.
* For initialisation, DW1000 clocks must be temporarily set to crystal speed. After initialisation SPI rate can be increased for optimum
* performance. /
reset_DW1000(); /
Target specific drive of RSTn line into DW1000 low for a period. */
spi_set_rate_low();
if (dwt_initialise(DWT_LOADUCODE) == DWT_ERROR)
{
if (debugflag)printf(“INIT FAILED”);
while (1)
{}
;
}
spi_set_rate_high();
init_DWT();

/* Configure DW1000. See NOTE 7 below. */
dwt_configure(&config);

/* Apply default antenna delay value. See NOTE 1 below. */
dwt_setrxantennadelay(RX_ANT_DLY);
dwt_settxantennadelay(TX_ANT_DLY);

/* Set expected response's delay and timeout. See NOTE 4, 5 and 6 below.
 * As this example only handles one incoming frame with always the same delay and timeout, those values can be set here once for all. */
dwt_setrxaftertxdelay(POLL_TX_TO_RESP_RX_DLY_UUS);
dwt_setrxtimeout(RESP_RX_TIMEOUT_UUS);
lfclk_config();
rtc_config();
dwt_configuresleep(DWT_PRESRV_SLEEP | DWT_CONFIG, DWT_WAKE_CS | DWT_SLP_EN);
dwt_entersleep();
for (;  ;)
{
	__SEV();
	__WFE();
	__WFE();	
  }

}[/code]

Has anyone done any measurements on DWM1001 modules ?
This seems pretty bad since my designed tags cannot even last 4day on a 1000ma battery and update rate 0f 0.5HZ.
By the way I made some measurements on original factory firmware and they seems to draw more than 7-8ma .
and I have used several measurement techniques using several ampere meters , oscilloscope. All of them report the same result .

Look here:

https://www.decawave.com/decaforum/showthread.php?tid=915

[color=#111111][size=small][font=Tahoma, Verdana, Arial, sans-serif]The current consumption versus sampling interval for a tag with disabled responsive mode (low power) is about:[/font][/size][/color]

[color=#111111][size=small][font=Tahoma, Verdana, Arial, sans-serif]I=0.43/t[/font][/size][/color]

Regards
Epenciso

[color=#222222][size=small][font=tahoma, sans-serif]I’ve managed to solve the issue, actually the problem was residing in measuring technique rather than DW1000 itself.However I will post my exprience here so that it might be helpful to others.[/font][/size][/color]
[color=#222222][size=small][font=tahoma, sans-serif]It seems that when the debugger is connected to micro controllers, it put the ARM core in a specific mode which will keep the debugging unit active so that we can debug or investigate the registers. However I used to disconnect the debugger from MCU but I had never resetting the MCU before measuring the current consumption which gives me about 3-4ma consumption. But after studying for some hours I’ve figured out that we need to reset the MCU (NRF52832 in my case) after programming using programmer ( JLink in my case ) to shutdown the debugging unit and measure the current consumption afterwards which is now something about ~10ua in my case which is related to linear regulator that I used and some other on board component.[/font][/size][/color]

Hi,

Thank you for sharing your experience, did you also change your code or just by disconnection the debugger and restarting the MCU every thing went well?

because right now I am using this block of code to put my module into sleep mode but it still consume about 20mA!!!

dwt_configuresleep(DWT_PRESRV_SLEEP | DWT_CONFIG, DWT_WAKE_CS | DWT_SLP_EN);
dwt_entersleep();

Hi,

Yes, Here is my code :
__WFE();
__WFE();
__SEV();
dwt_configuresleep(DWT_PRESRV_SLEEP | DWT_CONFIG, DWT_WAKE_WK | DWT_WAKE_CS | DWT_SLP_EN);
dwt_entersleep();

After programming this code and disconnecting programmer and restarting microcontroller, I could see about 10ua consumption, since debug unit of microcontroller is not running anymore.

Hi, how do you made the measurements of current on DWM1001-DEV module please ?

Regards,

Hugo.