This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How To Remove Debug Interface on NRF52832

Hello,

I can successfully put my nRF52832 into System OFF mode, however, the Debug Mode Interface is still running, so the current consumption is > 2mA. What are the command(s)/Soft Device APIs to truly take the system out of Debug Mode? I'm using SDK v11.0.0 and S132. I'm reading a lot of information on other posts, but none that pertain to SDK v11.0.0 with the Soft Device running S132. Please assist, thank you. 

Please note, I've already tried removing all the debug hardware and battery after flashing and re-attaching the battery, but still not getting the correct results. Thanks!

Best,

Sami

Parents Reply Children
  • Hi,

    The nRF52 should go into normal mode when it's has been power recycled. How do you know that it's still in DEBUG mode? Are you able to reproduce the same issue with the DK? 

    Jared

  • Yes, after flashing the device, we're issuing a reset to ensure that the device is no longer in debug interface mode (just in case). The premise behind my question: I'm putting my nRF into System OFF mode via a call to: 

    uint32_t errCode = sd_power_system_off();

    However, the current consumption is still ~2.5mA. After peeling through various threads, lots of responses have said that the nRF is still in debug interface mode. I thought that I had to issue a special command to get it out of debug interface mode in order to achieve truly low current consumption of ~1.5uA. 

    Anyway, before entering System OFF mode, I'm terminating EasyDMA (including the Software work-around to power flush TWIM and SPIM as per errata) and shutting down peripherals, but still getting a large current draw. Do I need to pull any other GPIOs low or explicitly halt the HFCLK?  Any assistance would be greatly appreciated.

  • First thing first.  Have you validated your hardware against leakage ? have you made any measurement to check that ? Here is how to qualify your hardware for low power.

    Make a firmware with just main function with while (1) { __WFE();}.  just that no softdevice. Remove swd connection, power cycle.  Check current.  It should not be less than 10uA.  If more than that, your hardware is leaking.  Next step is to find out what leaks.  This is done by configuring GPIO that are connected to something and the devices that are connected.  You might need to remove suspected components one by one to find the leaks.

  • Hi,

    I understand. I'm still not sure that the device is in debug mode. I would like to reproduce this myself. Could you share a pre-compiled hex file of the application and the softdevice version that you're using? 

    regards

    Jared 

  • Thank you Nguyen, my next analysis is to characterize leaks on my custom board.

    Jared, unfortunately, I cannot send my .hex file. Can't you check debug mode with a read on

    DWT->CYCCNT ?

    Also, don't I need to call 

      this: gpio_interrupt_disable();

    or

    this: nrf_gpio_input_disconnect();

    on all non-used GPIOs that while I'm in System OFF mode?

Related