This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

NRF52840 Sleep mode zephyr

Hello,

I am trying to set system on mode in nrf52840 usb dongle.

This mode switched automatically by idle task, when there is no thread running.

There is no while(1) loop and i am using k_sleep(k_forever).

I am using SWD debugger J-Link.

I  supply my nrf52840 from external power supply and i measure 500uA!

I suppose that debugger set some peripheral on and i verify that from that post:

"The nRF52 may remain in debug interface (DIF) mode if the SWD debugger connection is not disconnected properly. When the device is in debug interface mode, it will draw additional current since it keeps a certain set of peripherals ON at all times. Performing a pin reset, given pin reset has been enabled on the part and it is accessible, is a common way of making sure DIF mode is not enabled."

First question, how can i disable exactly the DIF mode?

Second question, could you please give me an example with system on based on nrf52840 with zephyr?

I appreciate your help guys!

Thanks in advance

  • Simplest way to disable debug mode is to just remove the power. Debug mode is disabled on power-up.

  • So there is other problem in my case. Do you have any example with system on mode?

  • The nRF52840 USB dongle is nice for demo purposes , but for development I recommend getting a nRF52840-DK instead. Alternatively get an SEGGER j-link so you can program and debug the nRF52840 USB dongle with. In this case the 500uA may be caused by USB is active, serial port and/or debug active. So by using a DK or an external SEGGER j-link you have much better control over the firmware (e.g. there is no USB bootloader needed and you can power directly using VDD also during development and prototype testing).

    Kenneth

Related