Skip to content

Commit fbd81f2

Browse files
committed
nrf52840_hic: change default pinmap
Should be compatible with nRF52840 Dongle (aQFN73) and QFN48
1 parent 17049c1 commit fbd81f2

File tree

7 files changed

+17
-107
lines changed

7 files changed

+17
-107
lines changed

projects.yaml

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -579,28 +579,6 @@ projects:
579579
- *module_if
580580
- *module_hic_nrf52820
581581
- records/board/microbitv2_nrf52820.yaml
582-
nrf52840_dongle_bl:
583-
- *module_bl
584-
- records/hic_hal/nrf52840.yaml
585-
- records/board/nrf52840_bl.yaml
586-
- records/board/nrf52840_dongle.yaml
587-
nrf52840_dongle_if:
588-
- *module_if
589-
- *module_hic_nrf52840
590-
- records/board/nrf52840_if.yaml
591-
- records/board/nrf52840_dongle.yaml
592-
- records/family/all_family.yaml
593-
nrf52840_xiao_bl:
594-
- *module_bl
595-
- records/hic_hal/nrf52840.yaml
596-
- records/board/nrf52840_bl.yaml
597-
- records/board/nrf52840_xiao.yaml
598-
nrf52840_xiao_if:
599-
- *module_if
600-
- *module_hic_nrf52840
601-
- records/board/nrf52840_if.yaml
602-
- records/board/nrf52840_xiao.yaml
603-
- records/family/all_family.yaml
604582
sam3u2c_mkit_dk_dongle_nrf5x_if:
605583
- *module_if
606584
- *module_hic_sam3u2c

records/board/nrf52840_dongle.yaml

Lines changed: 0 additions & 4 deletions
This file was deleted.

records/board/nrf52840_if.yaml

Lines changed: 0 additions & 6 deletions
This file was deleted.

records/board/nrf52840_xiao.yaml

Lines changed: 0 additions & 4 deletions
This file was deleted.

records/hic_hal/nrf52840.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ common:
99
- DAPLINK_HIC_ID=0x6E052840 # DAPLINK_HIC_ID_NRF52840
1010
- OS_CLOCK=64000000
1111
- __DAPLINK
12+
## Uncomment one of the following defines to use alternate pinmap
13+
# - SSCI_ISP1807
14+
# - SEEEDSTUDIO_XIAO_BLE
1215
includes:
1316
- source/hic_hal/nordic/nrf52840
1417
- source/hic_hal/nordic/nrfx

source/board/nrf52840_dongle.c

Lines changed: 0 additions & 36 deletions
This file was deleted.

source/hic_hal/nordic/nrf52840/IO_Config.h

Lines changed: 14 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -39,26 +39,7 @@
3939
// This GPIO configuration is only valid for the nrf52840 HIC
4040
COMPILER_ASSERT(DAPLINK_HIC_ID == DAPLINK_HIC_ID_NRF52840);
4141

42-
#if defined(NRF52840_DONGLE)
43-
44-
#define GPIO_LED_ACTIVE_STATE 0
45-
#define RESET_BUTTON_PULL NRF_GPIO_PIN_PULLUP
46-
#define PIN_SWCLK NRF_GPIO_PIN_MAP(0, 9) // SWDCLK (Output)
47-
#define PIN_SWDIO NRF_GPIO_PIN_MAP(0, 10) // SWDIO (Input/Output)
48-
#define PIN_nRESET NRF_GPIO_PIN_MAP(0, 24) // nRESET Pin
49-
#undef LED_RUNNING // Target Running LED (Output)
50-
#undef LED_CONNECTED // Connected LED (Output)
51-
#define LED_HID NRF_GPIO_PIN_MAP(0, 6) // HID LED
52-
#define LED_MSC NRF_GPIO_PIN_MAP(0, 8) // MSC LED
53-
#define LED_CDC NRF_GPIO_PIN_MAP(0, 12) // CDC LED
54-
#undef LED_PWR // POWER LED
55-
#define RESET_BUTTON NRF_GPIO_PIN_MAP(1, 6) // Reset button (SW_RESET)
56-
#define UART_TX_PIN NRF_GPIO_PIN_MAP(1, 10) // UART
57-
#define UART_RX_PIN NRF_GPIO_PIN_MAP(1, 13) // UART
58-
#define I2C_SCL_PIN NRF_GPIO_PIN_MAP(1, 25) // I2C
59-
#define I2C_SDA_PIN NRF_GPIO_PIN_MAP(0, 2) // I2C
60-
61-
#elif defined(SEEEDSTUDIO_XIAO_BLE)
42+
#if defined(SEEEDSTUDIO_XIAO_BLE)
6243

6344
#define GPIO_LED_ACTIVE_STATE 0
6445
#define RESET_BUTTON_PULL NRF_GPIO_PIN_PULLUP
@@ -98,24 +79,22 @@ COMPILER_ASSERT(DAPLINK_HIC_ID == DAPLINK_HIC_ID_NRF52840);
9879

9980
#else
10081

101-
// Default PIN assignment (not finalized based on nRF52833)
102-
#define GPIO_LED_ACTIVE_STATE 1
82+
#define GPIO_LED_ACTIVE_STATE 0
10383
#define RESET_BUTTON_PULL NRF_GPIO_PIN_PULLUP
104-
105-
#define PIN_SWCLK NRF_GPIO_PIN_MAP(0, 1) // SWDCLK (Output)
106-
#define PIN_SWDIO NRF_GPIO_PIN_MAP(0, 0) // SWDIO (Input/Output)
107-
#undef PIN_nRESET // nRESET Pin
84+
#define PIN_SWCLK NRF_GPIO_PIN_MAP(0, 13) // SWDCLK (Output)
85+
#define PIN_SWDIO NRF_GPIO_PIN_MAP(0, 17) // SWDIO (Input/Output)
86+
#define PIN_nRESET NRF_GPIO_PIN_MAP(0, 9) // nRESET Pin
10887
#undef LED_RUNNING // Target Running LED (Output)
10988
#undef LED_CONNECTED // Connected LED (Output)
110-
#define LED_HID NRF_GPIO_PIN_MAP(0, 15) // HID LED
111-
#define LED_MSC NRF_GPIO_PIN_MAP(0, 15) // MSC LED
112-
#define LED_CDC NRF_GPIO_PIN_MAP(0, 15) // CDC LED
113-
#define LED_PWR NRF_GPIO_PIN_MAP(0, 17) // POWER LED
114-
#define RESET_BUTTON NRF_GPIO_PIN_MAP(1, 9) // Reset button (SW_RESET)
115-
#define UART_TX_PIN NRF_GPIO_PIN_MAP(0, 2) // UART From IMCU to target
116-
#define UART_RX_PIN NRF_GPIO_PIN_MAP(0, 3) // UART From target to IMCU
117-
#define I2C_SCL_PIN NRF_GPIO_PIN_MAP(0, 29) // I2C SCL
118-
#define I2C_SDA_PIN NRF_GPIO_PIN_MAP(0, 28) // I2C SDA
89+
#define LED_HID NRF_GPIO_PIN_MAP(0, 6) // HID LED
90+
#define LED_MSC NRF_GPIO_PIN_MAP(0, 8) // MSC LED
91+
#define LED_CDC NRF_GPIO_PIN_MAP(0, 12) // CDC LED
92+
#undef LED_PWR // POWER LED
93+
#define RESET_BUTTON NRF_GPIO_PIN_MAP(1, 6) // Reset button (SW_RESET)
94+
#define UART_TX_PIN NRF_GPIO_PIN_MAP(0, 24) // UART TX
95+
#define UART_RX_PIN NRF_GPIO_PIN_MAP(1, 0) // UART RX
96+
#define I2C_SCL_PIN NRF_GPIO_PIN_MAP(1, 25) // I2C
97+
#define I2C_SDA_PIN NRF_GPIO_PIN_MAP(0, 2) // I2C
11998

12099
#endif
121100

0 commit comments

Comments
 (0)