Skip to content

Commit 09589a6

Browse files
authored
Merge pull request #2481 from xudongzheng/pca10095-pr
Fix nRF5340 DK USB host shield build
2 parents d241f32 + 1315bc1 commit 09589a6

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

hw/bsp/nrf/boards/pca10095/board.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
set(MCU_VARIANT nrf5340_application)
22
set(LD_FILE_GNU ${NRFX_DIR}/mdk/nrf5340_xxaa_application.ld)
33

4+
# enable max3421 host driver for this board
5+
set(MAX3421_HOST 1)
6+
47
function(update_board TARGET)
58
target_sources(${TARGET} PRIVATE
69
${NRFX_DIR}/drivers/src/nrfx_usbreg.c

hw/bsp/nrf/boards/pca10095/board.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@
4242
#define BUTTON_STATE_ACTIVE 0
4343

4444
// UART
45-
#define UART_RX_PIN 32
46-
#define UART_TX_PIN 33
45+
#define UART_RX_PIN 22
46+
#define UART_TX_PIN 20
4747

4848
// SPI for USB host shield
4949
#define MAX3421_SCK_PIN _PINNUM(1, 15)

hw/bsp/nrf/boards/pca10095/board.mk

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ CPU_CORE = cortex-m33
22
MCU_VARIANT = nrf5340_application
33
CFLAGS += -DNRF5340_XXAA -DNRF5340_XXAA_APPLICATION
44

5+
# enable max3421 host driver for this board
6+
MAX3421_HOST = 1
7+
58
LD_FILE = hw/mcu/nordic/nrfx/mdk/nrf5340_xxaa_application.ld
69

710
SRC_C += hw/mcu/nordic/nrfx/drivers/src/nrfx_usbreg.c

hw/bsp/nrf/family.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ enum {
7676
#define LFCLK_SRC_RC CLOCK_LFCLKSRC_SRC_LFRC
7777
#define VBUSDETECT_Msk USBREG_USBREGSTATUS_VBUSDETECT_Msk
7878
#define OUTPUTRDY_Msk USBREG_USBREGSTATUS_OUTPUTRDY_Msk
79+
#define GPIOTE_IRQn GPIOTE1_IRQn
7980
#else
8081
#define LFCLK_SRC_RC CLOCK_LFCLKSRC_SRC_RC
8182
#define VBUSDETECT_Msk POWER_USBREGSTATUS_VBUSDETECT_Msk

0 commit comments

Comments
 (0)