Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion subsys/bluetooth/controller/Kconfig.ll_sw_split
Original file line number Diff line number Diff line change
Expand Up @@ -1449,7 +1449,14 @@ config BT_CTLR_PROFILE_ISR

config BT_CTLR_DEBUG_PINS
bool "Bluetooth Controller Debug Pins"
depends on BOARD_NRF51DK_NRF51822 || BOARD_NRF52DK_NRF52832 || BOARD_NRF52DK_NRF52810 || BOARD_NRF52840DK_NRF52840 || BOARD_NRF52833DK_NRF52833 || BOARD_NRF5340DK_NRF5340_CPUNET || BOARD_RV32M1_VEGA
depends on BOARD_NRF51DK_NRF51822 || \
BOARD_NRF52DK_NRF52832 || \
BOARD_NRF52DK_NRF52810 || \
BOARD_NRF52840DK_NRF52840 || \
BOARD_NRF52833DK_NRF52833 || \
BOARD_NRF5340DK_NRF5340_CPUNET || \
BOARD_NRF54L15DK_NRF54L15_CPUAPP || \
BOARD_RV32M1_VEGA
help
Turn on debug GPIO toggling for the Bluetooth LE Controller. This is useful
when debugging with a logic analyzer or profiling certain sections of
Expand Down
18 changes: 16 additions & 2 deletions subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/debug.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,27 @@
/*
* Copyright (c) 2016-2020 Nordic Semiconductor ASA
* Copyright (c) 2016-2025 Nordic Semiconductor ASA
* Copyright (c) 2016 Vinayak Kariappa Chettimada
*
* SPDX-License-Identifier: Apache-2.0
*/

#if defined(CONFIG_BT_CTLR_DEBUG_PINS) || \
defined(CONFIG_BT_CTLR_DEBUG_PINS_CPUAPP)
#if defined(CONFIG_BOARD_NRF5340DK)
#if defined(CONFIG_BOARD_NRF54L15DK_NRF54L15_CPUAPP)
Copy link

Copilot AI Oct 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original condition CONFIG_BOARD_NRF5340DK has been replaced, but the updated condition should maintain backward compatibility. Consider using #elif instead of replacing the original condition to ensure existing NRF5340DK configurations continue to work.

Copilot uses AI. Check for mistakes.

#define DEBUG_PORT NRF_P1 /* Pin header/connector labeled "PORT P1" or "P1" on DK */
#define DEBUG_PIN0 BIT(7) /* overlaps CTS1, FIXME */
#define DEBUG_PIN1 BIT(8)
#define DEBUG_PIN2 BIT(9)
#define DEBUG_PIN3 BIT(10)
#define DEBUG_PIN4 BIT(10)
#define DEBUG_PIN5 BIT(11)
#define DEBUG_PIN6 BIT(11)
#define DEBUG_PIN7 BIT(12)
#define DEBUG_PIN8 BIT(13)
#define DEBUG_PIN9 BIT(14)
#elif defined(CONFIG_BOARD_NRF5340DK_NRF5340_CPUAPP) || \
Copy link

Copilot AI Oct 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original CONFIG_BOARD_NRF5340DK condition has been expanded to three specific variants, but this may break compatibility if the original generic condition was used elsewhere. Verify that all NRF5340DK board configurations are properly covered by these three specific variants.

Suggested change
#elif defined(CONFIG_BOARD_NRF5340DK_NRF5340_CPUAPP) || \
#elif defined(CONFIG_BOARD_NRF5340DK) || \
defined(CONFIG_BOARD_NRF5340DK_NRF5340_CPUAPP) || \

Copilot uses AI. Check for mistakes.

defined(CONFIG_BOARD_NRF5340DK_NRF5340_CPUAPP_NS) || \
defined(CONFIG_BOARD_NRF5340DK_NRF5340_CPUNET)
#define DEBUG_PORT NRF_P1
#define DEBUG_PIN_IDX0 0
#define DEBUG_PIN_IDX1 1
Expand Down