DWM 1001 Bluetooth Turn OFF using UART Command

Hello

I am working on the DWM-1001 UART Functionality and playing with various shell commands to decrease the current consumption. I am able to achieve as low as 1.5mA using “nmo” shell command. This command send the device to passive off mode. Then using “nmt” , I am able to bring the device online during which the consumption is about 13-14mA. I know there is a deep sleep mode in the DWM1001 and I am unable to figure out how to decrease the consumption further. I am assuming the 1.5mA current only through the Bluetooth of the DWM. Is there a way to turn off the bluetooth through UART whenever not required and turning it back on ? Are my assumptions correct ?
I am stuck on this topic for some days and unable to get help anywhere.

Please assist me in achieving the low power using UART.

Regards

I had a similar problem, I solved it by compiling the firmware by commenting on the dwm_shell_compile (). Apparently this runs a thread that prevents the device from entering low power mode.

I share a fragment of the code I use.

are you using the DWM1001-DEV board? If so, be sure to remove the jumpers corresponding to the j-link. sometimes the nrf can enter debug mode and cause unwanted consumption.
I also see that you have activated lesd, I suggest deactiver and test.

regards

void dwm_user_start(void) {
uint8_t hndl;
int rv;
//dwm_shell_compile();
//Disabling ble by default as softdevice prevents debugging with breakpoints (due to priority)
//dwm_ble_compile();
dwm_le_compile();
//dwm_serial_spi_compile();
/* Create thread */
rv = dwm_thread_create(THREAD_APP_PRIO, app_thread_entry, (void )NULL,
“app”, THREAD_APP_STACK_SIZE, &hndl);
APP_ERR_CHECK(rv);
//configure as tag
dwm_cfg_tag_t cfg;
cfg.stnry_en = 1;
cfg.meas_mode = DWM_MEAS_MODE_TWR;
cfg.low_power_en = 1;
cfg.loc_engine_en = 1;
cfg.common.enc_en = 0;
cfg.common.led_en = 0;
cfg.common.ble_en = 0;
cfg.common.fw_update_en = 0;
cfg.common.uwb_mode = DWM_UWB_MODE_ACTIVE;
rv = dwm_cfg_tag_set(&cfg);
APP_ERR_CHECK(rv);
//panid
rv=dwm_panid_set(0x0010);
APP_ERR_CHECK(rv);
// config rate
rv=dwm_upd_rate_set(250, 600); // update rate 25 second. 60 seconds stationary
APP_ERR_CHECK(rv);
/
Start the thread */
dwm_thread_resume(hndl);
}

Thanks for your reply.
I am using the DWM in shell mode and I can see that you have sent the program you have tried which is for api mode. I don’t have an idea on how to use api mode. I don’t understand what do you mean by activating lesd. Can you explain that?

Hope to get a response as soon as possible.
Regards

Hi
Sorry “lesd” it was writing error.
PANS2 firmware runs under an operating system that runs multiple threads (uartshell, ble, le, spi, user app). In the case of uartshell, the thread remains active pending instructions, so it does not achieve ultra-low consumption. I personally only managed to obtain the microconsumption of the data sheet deactivating the function dwm_shell_compile (). in the following link you can find all the documentation with examples referring to the module dwm1001

https://www.decawave.com/wp-content/uploads/2019/03/DWM1001_DWM1001-DEV_MDEK1001_Sources_and_Docs_v9.zip

Hi,

you can use the default firmware to achieve the low power consumption.

Once configured in low power mode, it will automatically switch on/off at the update rate.
This can be configured using acts/acas commands in Shell. Please see the API documentation https://www.decawave.com/dwm1001/api/

When you enter shell, it will block the module to go to deep sleep. In order to go to sleep you must use ‘quit’ command.

If you have an external MCU controlling the DWM1001, then the correct way to communicate with it in low power mode is: to enable location event and wait for an interrupt. On the interrupt event wake up the module via one of the available API (Shell/UART/SPI), do what you need and then issue the sleep command.

Cheers,
TDK

I am just replying with my observations.
Please let me know if I am making any mistake.
This is the procedure I am trying

  1. Wakes Up the device with one bit.
  2. Enters into shell mode
  3. Sends the “lep” command to take the location data for 1 to 2 seconds
  4. sends “nmtl” command to enter low power mode.
  5. Sends the “quit” command to close the shell

After all this the current consumption is ~1.4mA . Isn’t it supposed to be in micro-amps range?

Hope to get a response soon
Regards
SHiva

Hi Shiva,

the command “nmtl” sets the module to TN low power mode and will automatically reset the module. So if you send the “quit” command, it will wake up the module.

I am not sure why you want to run the nmtl periodically. This command configures the module, so it writes the configuration to flash. Doing so will wear out the flash memory, so you do not want to do that often.

I would recommend the following procedure (considering the module has been configured already in TN low power mode):

  1. Wake up the device by toggling UART RX pin.
  2. Double enter to enter into shell mode.
  3. Send “lep” command. Capture some data.
  4. Send “quit” command to put the module in deep sleep mode.

The current should be in sub 10 uA level, depending on if the stationary detection is enabled.

You also need to check how the current is measured. Do mind the DWM1001-DEV has Segger J-Link MCU on it, so the measurement must be done at the input to the DWM1001 module.

Cheers,
TDK

Thanks for your reply! I have some doubts regarding your Answer!

1.Configuring module to TN low power mode : Is it same as turning off the responsive mode from the mobile app? Or is it something else and how can I achieve it assuming I have only Mobile app and UART connection to the DWM chip
2. Wake up the device by toggling UART RX pin: Is it same as sending one byte to the DWM1001 through UART ? That means, writing “\r” ?

Hope to get a response soon!
Regards

Hi, personally I have not achieved low consumption in shell mode.
You can use TLV by uart / spi and get it without problem.

best regards

I have tried achieving my goal with the TLV also but to no avail! My method of achieving it was as described below!

This operation was tested with responsive mode off.

  1. Wake up using “\r” - equivalent of sending one bit
  2. Get the location data using - “\x02\x00”
  3. Write the low power command - “\x0a\x00”

These commands are taken from this document

I have seen worse results with this !. After the last command , current consumption was fluctuating between 3-13mA and even sometimes reaches 20mA .
Is my method of doing it okay ?

Hope to get the response soon
Regards

In your current measurement are you only taking the one from module DWM1001? You have already verified that you do not have any additional components.
Can you share an image of how you perform the measurement?

are you using an j-link OB?
sometimes the nrf52 goes into debug mode, so it doesn’t go into low power mode

Thanks for the reply. I am afraid , I can’t share the image of schematic! I am measuring the current of DWM 1001 only and I am not using j-link OB.

Hi,

if the LED is enabled in the configuration, you can verify that the module has been put into deep sleep when all the LEDs go OFF. The Green LED would be ON if it is still not in deep sleep. The consumption of sub-20mA indicates that the module is still ON including the DW1000 IC.

What status responses do you get for the commands “\x02\x00” and “\x0a\x00”?
It looks like there is some mistake in the commands or communication in your application.

Cheers,
TDK