nRF52840 custom PCB firmware does not execute after power-cycle unless J-Link/RTT is attached

Hardware:

  • Custom PCB, nRF52840 SoC
  • VDD = 1.8V (battery-powered, no USB)
  • External LFCLK crystal (32.768 kHz) originally configured; switched to RC oscillator during debugging

SDK / Toolchain:

  • nRF Connect SDK v3.2.1 (Zephyr 4.2.99)
  • Zephyr SDK 0.17.0
  • nrfjprog + JLinkARM DLL for flashing/debug

What we have ruled out or tried:

  1. RTT/logging backend – Fully disabled (CONFIG_LOG=n, CONFIG_USE_SEGGER_RTT=n, CONFIG_LOG_BACKEND_RTT=n, CONFIG_PRINTK=n, CONFIG_EARLY_CONSOLE=n, CONFIG_BOOT_BANNER=n, CONFIG_NCS_BOOT_BANNER=n). Issue persists.

  2. LFCLK source – Was CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y. Switching to CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y reduced idle current by ~100 µA but did not resolve the standalone boot issue.

  3. Early return 0; exits in main() – Audited the entire main() function; it has several points where it returns early on init failure (GPIO not ready, IRQ config failure etc.). We added retry logic with a 5-second timeout and removed all early return paths to make startup tolerant of peripheral init failures. Issue persists.

  4. APPROTECT  CONFIG_NRF_APPROTECT_LOCK=n confirmed; access port protection is not engaged.

Question to Nordic DevZone:

  1. On nRF52840 at VDD = 1.8V, is there any condition under which the chip will remain in a low-power (~10–100 µA) non-executing state after power-on that would be resolved by J-Link probe attach? Specifically: is there any boot-mode selection, debug interface lock, or internal boot ROM behavior that could gate firmware execution on SWD/debugger presence?

  2. Does the nRF52840 boot ROM perform any check or handshake when CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y and the LFXO fails to stabilize? Could a slow-starting or absent XTAL cause the SoftDevice or clock driver to stall pre-main()?

  3. Are there any NCS v3.2.1 / Zephyr 4.2.99 known issues or errata with cold-boot behavior at 1.8V that could cause the described "kickstart required" symptom? 


  1. CONFIG_GPIO=y
    CONFIG_PWM=y
    CONFIG_SPI=y
    CONFIG_ADC=y
    CONFIG_FLASH=y
    CONFIG_FLASH_MAP=y
    CONFIG_FLASH_PAGE_LAYOUT=y
    CONFIG_NORDIC_QSPI_NOR=y
    CONFIG_NVS=y
    CONFIG_MBEDTLS=y
    CONFIG_MBEDTLS_SHA256=y
    CONFIG_MBEDTLS_ENABLE_HEAP=y
    CONFIG_HEAP_MEM_POOL_SIZE=16384
    CONFIG_SENSOR=y
    CONFIG_LIS2DH=n
    
    # Clock: internal LFRC for custom PCB bring-up robustness
    CONFIG_CLOCK_CONTROL_NRF=y
    CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
    
    # Logging: disable SEGGER RTT backend for production
    CONFIG_LOG=n
    CONFIG_LOG_BACKEND_RTT=n
    CONFIG_LOG_PRINTK=n
    CONFIG_USE_SEGGER_RTT=n
    
    # Disable UART console and backend
    CONFIG_UART_CONSOLE=n
    CONFIG_LOG_BACKEND_UART=n
    CONFIG_SERIAL=n
    CONFIG_CONSOLE=n
    CONFIG_PRINTK=n
    CONFIG_EARLY_CONSOLE=n
    
    # Debug basics
    CONFIG_DEBUG=n
    CONFIG_ASSERT=n
    CONFIG_MAIN_STACK_SIZE=2048
    CONFIG_NCS_BOOT_BANNER=n
    CONFIG_BOOT_BANNER=n
    
    # Reset cause diagnostics (no RTT needed — LED pattern at cold boot)
    CONFIG_HWINFO=y
    CONFIG_REBOOT=y
    
    # Safety: never lock APPROTECT from this build
    CONFIG_NRF_APPROTECT_LOCK=n
    
    # Power Management: enable device suspend/resume for peripherals like ADC
    CONFIG_PM_DEVICE=y
    
    # Bluetooth
    CONFIG_BT=y
    CONFIG_BT_PERIPHERAL=y
    CONFIG_BT_DEVICE_NAME="TamperSeal"
    CONFIG_BT_DEVICE_APPEARANCE=0
    CONFIG_BT_MAX_CONN=1
    CONFIG_BT_BAS=y
    
    # BLE data throughput: 64-byte event notifications require MTU >= 67
    CONFIG_BT_L2CAP_TX_MTU=247
    CONFIG_BT_BUF_ACL_TX_SIZE=251
    CONFIG_BT_ATT_TX_COUNT=6
    
    
    



Parents Reply Children
No Data
Related