Skip to content

Commit ab1747d

Browse files
maxd-nordicmbrossard
authored andcommitted
nrf52840_hic: Add nrf52840 HIC
1 parent 2aa62a0 commit ab1747d

File tree

17 files changed

+3922
-1
lines changed

17 files changed

+3922
-1
lines changed

projects.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,11 @@ module:
9393
- records/hic_hal/nrf52820.yaml
9494
- records/usb/usb-bulk.yaml
9595
- records/usb/usb-hid.yaml
96+
hic_nrf52840: &module_hic_nrf52840
97+
- records/rtos/rtos-cm4.yaml
98+
- records/hic_hal/nrf52840.yaml
99+
- records/usb/usb-bulk.yaml
100+
- records/usb/usb-hid.yaml
96101
hic_sam3u2c: &module_hic_sam3u2c
97102
- records/rtos/rtos-cm3.yaml
98103
- records/hic_hal/sam3u2c.yaml
@@ -195,6 +200,14 @@ projects:
195200
- *module_if
196201
- *module_hic_nrf52820
197202
- records/family/all_family.yaml
203+
nrf52840_bl:
204+
- *module_bl
205+
- records/hic_hal/nrf52840.yaml
206+
- records/board/nrf52840_bl.yaml
207+
nrf52840_if:
208+
- *module_if
209+
- *module_hic_nrf52840
210+
- records/family/all_family.yaml
198211
sam3u2c_bl:
199212
- *module_bl
200213
- records/hic_hal/sam3u2c.yaml

records/board/nrf52840_bl.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
common:
2+
sources:
3+
board:
4+
- source/board/nrf52820_bl.c

records/hic_hal/nrf52840.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
common:
2+
target:
3+
- Cortex-M4
4+
core:
5+
- Cortex-M4
6+
macros:
7+
- INTERFACE_NRF52840
8+
- NRF52840_XXAA
9+
- DAPLINK_HIC_ID=0x6E052840 # DAPLINK_HIC_ID_NRF52840
10+
- OS_CLOCK=64000000
11+
- __DAPLINK
12+
includes:
13+
- source/hic_hal/nordic/nrf52840
14+
- source/hic_hal/nordic/nrfx
15+
- source/hic_hal/nordic/nrfx/drivers
16+
- source/hic_hal/nordic/nrfx/hal
17+
- source/hic_hal/nordic/nrfx/mdk
18+
- source/hic_hal/nordic/shared/nrf52
19+
sources:
20+
hic_hal:
21+
- source/hic_hal/nordic/nrf52840
22+
- source/hic_hal/nordic/nrf52820/cmsis
23+
- source/hic_hal/nordic/nrfx/drivers
24+
- source/hic_hal/nordic/shared
25+
- source/hic_hal/nordic/shared/nrf52
26+
27+
tool_specific:
28+
uvision:
29+
misc:
30+
ld_flags:
31+
- --predefine="-I..\..\..\source\hic_hal\nordic\nrf52840"
32+
sources:
33+
hic_hal:
34+
- source/hic_hal/nordic/nrf52840/arm
35+
armcc:
36+
sources:
37+
hic_hal:
38+
- source/hic_hal/nordic/nrf52840/arm
39+
armclang:
40+
misc:
41+
common_flags:
42+
- -mfpu=none
43+
sources:
44+
hic_hal:
45+
- source/hic_hal/nordic/nrf52840/arm
46+
gcc_arm:
47+
sources:
48+
hic_hal:
49+
- source/hic_hal/nordic/nrf52840/gcc

source/daplink/daplink.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ COMPILER_ASSERT(DAPLINK_RAM_SHARED_START + DAPLINK_RAM_SHARED_SIZE == DAPLINK_RA
7070
#define DAPLINK_HIC_ID_M48SSIDAE 0x97969921
7171
#define DAPLINK_HIC_ID_PSOC5 0x2E127069
7272
#define DAPLINK_HIC_ID_NRF52820 0x6E052820 // 'n\x05\x28\x20'
73+
#define DAPLINK_HIC_ID_NRF52840 0x6E052840 // 'n\x05\x28\x40'
7374
//@}
7475

7576
#define DAPLINK_INFO_OFFSET 0x20

source/hic_hal/device.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@
4646
#include "M480.h"
4747
#elif defined (INTERFACE_NRF52820)
4848
#include "nrf52820.h"
49+
#elif defined (INTERFACE_NRF52840)
50+
#include "nrf52840.h"
4951
#else
5052
#error "CMSIS core headers needed"
5153
#endif

source/hic_hal/nordic/nrf52820/DAP_config.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,13 @@ Configures the DAP Hardware I/O pins for Serial Wire Debug (SWD) mode:
203203
- TDI, nTRST to HighZ mode (pins are unused in SWD mode).
204204
*/
205205
__STATIC_INLINE void PORT_SWD_SETUP (void) {
206+
#if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840)
207+
COMPILER_ASSERT(GPIO_CHECK_PRESENT_NRF52840(PIN_SWCLK));
208+
COMPILER_ASSERT(GPIO_CHECK_PRESENT_NRF52840(PIN_SWDIO));
209+
#else
206210
COMPILER_ASSERT(GPIO_CHECK_PRESENT_NRF52820(PIN_SWCLK));
207211
COMPILER_ASSERT(GPIO_CHECK_PRESENT_NRF52820(PIN_SWDIO));
212+
#endif
208213
gpio_cfg(GPIO_REG(PIN_SWCLK), GPIO_IDX(PIN_SWCLK),
209214
NRF_GPIO_PIN_DIR_OUTPUT, NRF_GPIO_PIN_INPUT_DISCONNECT,
210215
NRF_GPIO_PIN_NOPULL, NRF_GPIO_PIN_S0S1, NRF_GPIO_PIN_NOSENSE);

0 commit comments

Comments
 (0)