Enabling LDO or DCDC on nrf connect sdk

I am using nrf connect sdk with nrf52832 to interface RFID reader with custom board nrf52832 over SPI, the firmware is working very well on my custom board when the RTT debugger is running, but when the RTT is not activated the board is unable to detect the cards.

I am not sure if this is a firmware or hardware problem, I am trying to deactivate the DCDC and use LDO to check if this is a power issue, how can this be done using nrf connect sdk?

  • Hi,

     

    For the nRF52832, the DCDC is disabled by setting:

    CONFIG_BOARD_ENABLE_DCDC=n

     

    Please note that the default setting is to enable both DCDC and external 32k. If your design does not include an external 32k source, you can use the internal 32k RC oscillator instead by adding this:

    CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y

     

    Kind regards,

    Håkon

  • I have tried ```CONFIG_BOARD_ENABLE_DCDC=n``` but it is giving error undefined symbol CONFIG_BOARD_ENABLE_DCDC, I am using sdk ver 2.3.0

  • I am using a custom board of nrf52832 here is my proj.conf

    # Config PINCTR
    CONFIG_PINCTRL=y
    # Config GPIO
    CONFIG_GPIO=y

    # Config logger
    CONFIG_LOG=y
    # CONFIG_SERIAL=y
    CONFIG_CONSOLE=y
    CONFIG_LOG_BACKEND_SHOW_COLOR=y
    CONFIG_LOG_MODE_IMMEDIATE=y
    # Use console with RTT
    CONFIG_USE_SEGGER_RTT=y
    CONFIG_RTT_CONSOLE=y
    CONFIG_LOG_BACKEND_RTT=y
    # comment if RTT console not used
    CONFIG_SEGGER_RTT_BUFFER_SIZE_UP=2048

    # Use console with UART
    # CONFIG_UART_CONSOLE=y
    # CONFIG_LOG_BACKEND_UART=y


    CONFIG_DEBUG_THREAD_INFO=y
    CONFIG_DEBUG_OPTIMIZATIONS=n
    CONFIG_NO_OPTIMIZATIONS=n

    # Config PWM
    CONFIG_PWM=y
    CONFIG_PWM_NRFX=y
    CONFIG_PWM_LOG_LEVEL_DBG=n

    # Config PWM for LEDs and Buzzer
    CONFIG_NRFX_PWM0=y
    CONFIG_NRFX_PWM1=y

    # Config SPI
    CONFIG_SPI=y
    CONFIG_SPI_NRFX=y


    # Config NVS/Flash
    CONFIG_NVS=y
    CONFIG_FLASH=y
    CONFIG_FLASH_PAGE_LAYOUT=y
    CONFIG_FLASH_MAP=y
    CONFIG_SETTINGS=y

    CONFIG_MPU_ALLOW_FLASH_WRITE=y

    # NVS logs
    CONFIG_NVS_LOG_LEVEL_DBG=n
    CONFIG_NVS_LOG_LEVEL_OFF=n

    # Config Stack
    CONFIG_MAIN_STACK_SIZE=4096
    CONFIG_HEAP_MEM_POOL_SIZE=4096

    # Config Power Management
    CONFIG_PM_CPU_OPS=y
    CONFIG_PM_DEVICE=y
    CONFIG_PM=y
    CONFIG_PM_DEVICE_RUNTIME=y
    CONFIG_PM_STATS=y
    CONFIG_STATS=y

    CONFIG_MINIMAL_LIBC=y
    CONFIG_NEWLIB_LIBC=y
    CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y

    # Config Bluetooth
    CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096

    CONFIG_BT=y
    CONFIG_BT_DEBUG_LOG=n
    CONFIG_BT_SMP=y
    CONFIG_BT_SIGNING=y
    CONFIG_BT_PERIPHERAL=y
    CONFIG_BT_DIS=y
    CONFIG_BT_ATT_PREPARE_COUNT=5
    CONFIG_BT_PRIVACY=y  # setting to y will use random address, while setting to n will use fixed public address
    # CONFIG_BT_DIS_MANUF="DK"
    CONFIG_BT_DEVICE_NAME="DK"
    # CONFIG_BT_DEVICE_APPEARANCE=833
    CONFIG_BT_DEVICE_NAME_DYNAMIC=y
    CONFIG_BT_DEVICE_NAME_MAX=5
    CONFIG_BT_SETTINGS=y
    CONFIG_BT_CTLR_TX_PWR_0=y
    # CONFIG_SETTINGS_RUNTIME=y   #might not be required
    # CONFIG_SETTINGS_NONE=y      #might not be required
    CONFIG_BT_GATT_SERVICE_CHANGED=y
    CONFIG_BT_MAX_CONN=1
    # CONFIG_BT_DEBUG_HCI_CORE=n
    # CONFIG_BT_DEBUG_NONE=y
    # CONFIG_BT_FIXED_PASSKEY=y
    CONFIG_BT_BONDABLE=y
    # CONFIG_BT_BONDING_REQUIRED=n
    # CONFIG_BT_CTLR_PHY_CODED=y
    CONFIG_BT_EXT_ADV=y
    CONFIG_BT_USER_PHY_UPDATE=y
    CONFIG_BT_BUF_ACL_RX_SIZE=256
    CONFIG_BT_L2CAP_TX_MTU=252


    CONFIG_BT_KEYS_OVERWRITE_OLDEST=y

    # Config Date Time
    CONFIG_DATE_TIME=y
    # CONFIG_DATE_TIME_MODEM=n
    CONFIG_DATE_TIME_NTP=n
    CONFIG_DATE_TIME_UPDATE_INTERVAL_SECONDS=0
    CONFIG_DATE_TIME_TOO_OLD_SECONDS=0

    # Enable System reboot functionality
    CONFIG_REBOOT=y

    # Config ADC
    CONFIG_ADC=y

    # Config NFC
    # CONFIG_NFC_T4T_NRFXLIB=y
    # CONFIG_NFC_T2T_NRFXLIB=y

    # CONFIG_NFC_NDEF=y
    # CONFIG_NFC_NDEF_MSG=y
    # CONFIG_NFC_NDEF_RECORD=y
    # CONFIG_NFC_NDEF_TEXT_RECORD=y
    # CONFIG_NFC_NDEF_URI_REC=y
    # CONFIG_NFC_NDEF_URI_MSG=y

    # CONFIG_WATCHDOG=y

    # Enable mcumgr.
    # CONFIG_MCUMGR=y
    # Ensure an MCUboot-compatible binary is generated.
    # CONFIG_BOOTLOADER_MCUBOOT=y
    # Enable the Bluetooth (unauthenticated) and shell mcumgr transports.
    # CONFIG_MCUMGR_SMP_BT=y
    # CONFIG_MCUMGR_SMP_BT_AUTHEN=n
    # Enable most core commands.
    # CONFIG_MCUMGR_CMD_IMG_MGMT=y
    # CONFIG_MCUMGR_CMD_OS_MGMT=y

    CONFIG_TIMESLICING=y

    # CONFIG_SOC_SERIES_NRF52X=y
    # CONFIG_SOC_NRF52832_QFAA=y
    # CONFIG_ARM=y
    # CONFIG_ARM_MPU=n

    # CONFIG_BOARD_ENABLE_DCDC=n
    # CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
  • Hi,

     

    If your board does not have a kconfig entry for this, then it will not be available:

    https://github.com/nrfconnect/sdk-zephyr/blob/v3.2.99-ncs2/boards/arm/nrf52dk_nrf52832/Kconfig#L6-L10

     

    You can verify this by checking the build/zephyr/.config file and search for symbol "SOC_DCDC_NRF52X". This should not be selected in your case.

     

    You'll still need this set:

    MOHAMED AHMED ALI MAHMOUD ELSABAGH said:
    CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y

     

    Kind regards,

    Håkon

Related