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
  • Hi,

    Are you using a custom board? sd_flash_protect are used to set the flash protection config registers.

    regards

    Jared

  • Yes, I am using a custom board. I thought we use sd_flash_protect() to write to the UCIR register to take the nRF out of debug mode interface by writing

    "NRF_UICR->APPROTECT = 0xFF"

    What is the proper way to take the nRF52832 out of debug mode interface? Maybe sd_flash_protect() is not the correct API? I'm using SDK v11.0.0.

  • 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 

Reply Children
Related