nRF52840 Custom Board Not Detected After First Flash Without Specifying Zigbee Channel

Description:

I am working with an nRF52840 custom board. I have encountered an issue where the board is not detected by the J-Link debugger after flashing the firmware a second time.

Issue Details:

  • Behavior:

    • The first time I flash the board without specifying the Zigbee channel (CONFIG_ZIGBEE_CHANNEL), it works as expected.
    • After the second flash (again without specifying the channel), the device is no longer detected by J-Link.
  • Workaround:

    • If I add the CONFIG_ZIGBEE_CHANNEL=15 line to prj.conf, the board works properly even after multiple flashes:
    • However, I would like to understand why specifying the channel is necessary and how I can recover the board without relying on this setting.

prj.conf Content:

#
# Copyright (c) 2020 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

CONFIG_NCS_SAMPLES_DEFAULTS=y

CONFIG_SERIAL=y
CONFIG_GPIO=y

# Make sure printk is not printing to the UART console
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y

CONFIG_MAIN_THREAD_PRIORITY=7

CONFIG_ZIGBEE=y
CONFIG_ZIGBEE_APP_UTILS=y
CONFIG_ZIGBEE_ROLE_COORDINATOR=y

# Enable DK LED and Buttons library
CONFIG_DK_LIBRARY=y

# This example requires more workqueue stack
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096

# Enable nRF ECB driver
CONFIG_CRYPTO=y
CONFIG_CRYPTO_NRF_ECB=y
CONFIG_CRYPTO_INIT_PRIORITY=80

# Networking
CONFIG_NET_IPV6=n
CONFIG_NET_IP_ADDR_CHECK=n
CONFIG_NET_UDP=n

CONFIG_NO_OPTIMIZATIONS=y
CONFIG_UART_INTERRUPT_DRIVEN=n
CONFIG_UART_ASYNC_API=y
CONFIG_UART_1_ASYNC=y

# Enable API for powering down unused RAM parts
CONFIG_RAM_POWER_DOWN_LIBRARY=y

# Networking
CONFIG_NET_IPV6=n
CONFIG_NET_IP_ADDR_CHECK=n
CONFIG_NET_UDP=n
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
CONFIG_ZIGBEE_SCENES=y
CONFIG_ZIGBEE_CHANNEL=15


CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_NVS=y
CONFIG_LOG=y
CONFIG_LOG_BACKEND_FS=y
#CONFIG_LOG_MODE_IMMEDIATE=y
#CONFIG_LOG_MODE_DEFERRED=y
CONFIG_NVS_LOG_LEVEL_DBG=y
CONFIG_REBOOT=y
CONFIG_MPU_ALLOW_FLASH_WRITE=y
CONFIG_MAIN_STACK_SIZE= 8192


CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE=8192
CONFIG_NEWLIB_LIBC=y
CONFIG_HEAP_MEM_POOL_SIZE= 8192

CONFIG_CBPRINTF_FP_SUPPORT=y
CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y

CONFIG_ZBOSS_DEFAULT_THREAD_STACK_SIZE=4096

CONFIG_SYS_HEAP_RUNTIME_STATS=y
CONFIG_COMMON_LIBC_MALLOC=y




Questions:

  1. Why does specifying CONFIG_ZIGBEE_CHANNEL prevent the detection issue after multiple flashes?
  2. How can I recover the board when it is no longer detected by J-Link?
  3. What is the best practice for handling Zigbee channel configurations to avoid such detection issues?
  4. Is there a known bug or hardware dependency that could be causing this behavior?
Parents Reply Children
No Data
Related