Hi All!
Hope you are doing well!
I am using nrf52833, NCS 2.3.0, Want to minimize the current consumption by sleep mode.
For this, I disabled the UART and SPI and the current goes down to 80uA when in the connected state with the central. But as per the specification, it should be 10uA.
So I tried to enable the " Normal Voltage mode, REG1 DC/DC"
using this piece of code
// Check if DC/DC converter is supported on the device if (NRF_POWER->DCDCEN) { // Enable the DC/DC converter NRF_POWER->DCDCEN = 1; // NRF_POWER->DCDCEN0 = 1; // Wait for the DC/DC converter to stabilize while (!NRF_POWER->DCDCEN || NRF_POWER->MAINREGSTATUS != POWER_MAINREGSTATUS_MAINREGSTATUS_High) { k_sleep(K_MSEC(1)); printk("DC/DC: %d, Main Reg Status: %d\n", NRF_POWER->DCDCEN, NRF_POWER->MAINREGSTATUS); } }
But it stuck here while (!NRF_POWER->DCDCEN || NRF_POWER->MAINREGSTATUS != POWER_MAINREGSTATUS_MAINREGSTATUS_High)
so when I replaced POWER_MAINREGSTATUS_MAINREGSTATUS_High
with
# # Copyright (c) 2018 Nordic Semiconductor # # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # #CONFIG_GPIO=y CONFIG_SPI=y CONFIG_SPI_NRFX=y # prj.conf CONFIG_PM_DEVICE=y CONFIG_PM=y # Required to disable default behavior of deep sleep on timeout CONFIG_PM_DEVICE=y # Enable the UART driver #CONFIG_UART_ASYNC_API=y #y #CONFIG_NRFX_UARTE0=y #y #CONFIG_SERIAL=y CONFIG_GPIO=y # Make sure printk is printing to the UART console #CONFIG_CONSOLE=y #y #CONFIG_UART_CONSOLE=y #y CONFIG_I2C=y CONFIG_NEWLIB_LIBC=y CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y CONFIG_CBPRINTF_FP_SUPPORT=y CONFIG_HEAP_MEM_POOL_SIZE=2048 CONFIG_BT=y CONFIG_BT_PERIPHERAL=y CONFIG_BT_DEVICE_NAME="Nordic_UART_Service" CONFIG_BT_DEVICE_APPEARANCE=833 CONFIG_BT_MAX_CONN=1 CONFIG_BT_MAX_PAIRED=1 CONFIG_BT_HCI_VS_EXT=y # Enable the NUS service CONFIG_BT_NUS=y # Enable bonding CONFIG_BT_SETTINGS=y CONFIG_FLASH=y CONFIG_FLASH_PAGE_LAYOUT=y CONFIG_FLASH_MAP=y CONFIG_NVS=y CONFIG_SETTINGS=y # Enable DK LED and Buttons library CONFIG_DK_LIBRARY=y # This example requires more workqueue stack CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048 # Config logger CONFIG_LOG=n #y #CONFIG_USE_SEGGER_RTT=y #CONFIG_LOG_BACKEND_RTT=y #y #CONFIG_LOG_BACKEND_UART=y CONFIG_ASSERT=n # i added these 3 lines from child image of coded phy uart pheripheral CONFIG_BT_EXT_ADV=y CONFIG_BT_CTLR_ADV_EXT=y CONFIG_BT_CTLR_PHY_CODED=y #CONFIG_BT_USER_PHY_UPDATE=y #CONFIG_BT_LL_SW_SPLIT=y #CONFIG_BT_CTLR=y #CONFIG_BT_HCI=y #CONFIG_BT=y #CONFIG_BT_CTLR_ADVANCED_FEATURES=y #CONFIG_BT_CTLR_CONN_RSSI=y #CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL=y CONFIG_BT_CTLR_TX_PWR_0=y #CONFIG_MY_CUSTOM_TX_PWR_LEVEL=8 #CONFIG_BT_USER_DATA_LEN_UPDATE=y #CONFIG_BT_AUTO_DATA_LEN_UPDATE=y #CONFIG_BT_L2CAP_TX_MTU=247 #CONFIG_BT_BUF_ACL_TX_SIZE=251 #CONFIG_BT_BUF_ACL_RX_SIZE=251 #CONFIG_BT_CTLR_DATA_LENGTH_MAX=251 #CONFIG_BT_CTLR_TX_PWR_MINUS_20=y #CONFIG_BT_CTLR_TX_PWR_MINUS_4=y #CONFIG_BT_CTLR_TX_PWR_ANTENNA=20 #CONFIG_MPSL=y #CONFIG_MPSL_FEM=y #CONFIG_MPSL_FEM_NRF21540_GPIO_SPI=y #CONFIG_MPSL_FEM_NRF21540_RX_GAIN_DB=0 #CONFIG_MPSL_FEM_NRF21540_TX_GAIN_DB=20