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

peripheral uart power consumption

So,

I've got  a working framework for my project - a battery powered appliance that will occasionally trigger one of two solenoids, timestamping the operation and subsequently reporting them to a bluetooth connected phone.

I developed initially on a nRF52 DK (PCA10040 - nRF52832), putting together a heavily modified peripheral_uart sample with I2C and ADC support.

On the nRF52, when idling (Advertising only at a 2 second interval) I measured current consumption at 8 uA  at the current measurement pins while supplying 3.0V at the External Supply pins..

I ported to a newly received nRF5340 DK with minimal changes (GPIO port assignments moved from gpio 0 to gpio 1).  At the same idle state as the nRF52832 (the main loop is a k_sleep(K_FOREVER); statement), current consumption at P22 with power supplied at P21 at  3.0V from a regulated power supply) at about .37 mA.

I had to compile and load  hci_rpmsg to get bluetooth connectivity - as delivered  the nRF5340DK did not seem to have a network core.

Where do I go from here to get reasonable current consumption?

  • Hei Martin, 
    When you configure the hci_rpmsg, please make sure you set  CONFIG_LOG=n and CONFIG_SERIAL=n . Logging enabled on the netcore could be the reason you have higher current consumption. 

  • I did as you suggested, turning off CONFIG_LOG and CONFIG_SERIAL via the Segger SES "Configure nRF Connect SDK Project."

    There was an error reported on downloading - the transcript is 

    Preparing target for download
    Executing Reset script TargetInterface.resetAndStop()
    Reset: Halt core after reset via DEMCR.VC_CORERESET.
    Reset: Reset device via AIRCR.SYSRESETREQ.
    Downloading ‘merged.hex’ to J-Link
    Programming 159.9 KB of addresses 00000000 — 00027fef
    J-Link: Flash download: Bank 1 @ 0x00000000: 1 range affected (131072 bytes)
    J-Link: Flash download: Total: 4.181s (Prepare: 0.107s, Compare: 0.103s, Erase: 2.793s, Program & Verify: 1.168s, Restore: 0.008s)
    J-Link: Flash download: Program & Verify speed: 109 KB/s
    Connecting ‘J-Link’ using ‘USB’
    Connecting to target using SWD
    Loaded C:/Users/kover/ncs/v1.5.1/toolchain/segger_embedded_studio/bin/JLink_x64.dll
    Firmware Version: J-Link OB-K22-NordicSemi compiled Jan 21 2020 17:33:01
    DLL Version: 6.94a
    Hardware Version: V1.00
    Target Voltage: 3.300
    Device "NRF5340_XXAA_NET" selected.
    ConfigTargetSettings() start
    ConfigTargetSettings() end
    InitTarget() start
    InitTarget() end
    Found SW-DP with ID 0x6BA02477
    DPIDR: 0x6BA02477
    AP map detection skipped. Manually configured AP map found.
    AP[0]: AHB-AP (IDR: Not set)
    AP[1]: AHB-AP (IDR: Not set)
    AP[2]: MEM-AP (IDR: Not set)
    AP[3]: MEM-AP (IDR: Not set)
    AP[1]: Core found
    AP[1]: AHB-AP ROM base: 0xE00FE000
    CPUID register: 0x410FD214. Implementer code: 0x41 (ARM)
    Found Cortex-M33 r0p4, Little endian.
    FPUnit: 8 code (BP) slots and 0 literal slots
    Security extension: not implemented
    CoreSight components:
    ROMTbl[0] @ E00FE000
    ROMTbl[0][0]: E00FF000, CID: B105100D, PID: 000BB4C9 ROM Table
    ROMTbl[1] @ E00FF000
    ROMTbl[1][0]: E000E000, CID: B105900D, PID: 000BBD21 Cortex-M33
    ROMTbl[1][1]: E0001000, CID: B105900D, PID: 000BBD21 DWT
    ROMTbl[1][2]: E0002000, CID: B105900D, PID: 000BBD21 FPB
    ROMTbl[1][6]: E0042000, CID: B105900D, PID: 000BBD21 CSS600-CTI
    Preparing target for download
    Executing Reset script TargetInterface.resetAndStop()
    ResetTarget() start
    ResetTarget() end
    Downloading ‘zephyr.elf’ to J-Link
    Programming 167.0 KB of addresses 01000000 — 01029c4b
    Programming 1.3 KB of addresses 01029c4c — 0102a1bb
    T-bit of XPSR is 0 but should be 1. Changed to 1.
    Timeout while preparing target, RAMCode did not respond in time. (PC = 0x00000000, CPSR = 0x00000000, LR = 0x61000003)!
    Failed to prepare RAMCode using RAM
    Failed to download application.
    Generic error.
    Please check J-Link and target connection.
    Illegal value 0x21009F28 written to register 67 (PSP_NS) ignored

    The current draw after the download is uncganged.

  • Please make sure you recover the chip as erasing is not possible after programming (because of readback protection) 

    Please have a look here: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_nrf5340.html#readback-protection

  • I'm in a Windows environment. Neither west nor nrfjprog are in my $PATH. I looked in Progam Files and Program Files x86 and couldn't find them.

  • I downloaded the nrfjprog stuff, did the two nrfjprog steps your documentation suggests, then went back to hci_rpmsg and tried to download it again.

    I got the same kind of error as I had before.

    I reloaded my app.

    Idle power consumption is now in the 100 uA range.

Related