Skip to content

Commit

Permalink
nrf52840_hic: change default pinmap
Browse files Browse the repository at this point in the history
Should be compatible with nRF52840 Dongle (aQFN73) and QFN48
  • Loading branch information
mbrossard committed Mar 23, 2023
1 parent 17049c1 commit fbd81f2
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 107 deletions.
22 changes: 0 additions & 22 deletions projects.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -579,28 +579,6 @@ projects:
- *module_if
- *module_hic_nrf52820
- records/board/microbitv2_nrf52820.yaml
nrf52840_dongle_bl:
- *module_bl
- records/hic_hal/nrf52840.yaml
- records/board/nrf52840_bl.yaml
- records/board/nrf52840_dongle.yaml
nrf52840_dongle_if:
- *module_if
- *module_hic_nrf52840
- records/board/nrf52840_if.yaml
- records/board/nrf52840_dongle.yaml
- records/family/all_family.yaml
nrf52840_xiao_bl:
- *module_bl
- records/hic_hal/nrf52840.yaml
- records/board/nrf52840_bl.yaml
- records/board/nrf52840_xiao.yaml
nrf52840_xiao_if:
- *module_if
- *module_hic_nrf52840
- records/board/nrf52840_if.yaml
- records/board/nrf52840_xiao.yaml
- records/family/all_family.yaml
sam3u2c_mkit_dk_dongle_nrf5x_if:
- *module_if
- *module_hic_sam3u2c
Expand Down
4 changes: 0 additions & 4 deletions records/board/nrf52840_dongle.yaml

This file was deleted.

6 changes: 0 additions & 6 deletions records/board/nrf52840_if.yaml

This file was deleted.

4 changes: 0 additions & 4 deletions records/board/nrf52840_xiao.yaml

This file was deleted.

3 changes: 3 additions & 0 deletions records/hic_hal/nrf52840.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ common:
- DAPLINK_HIC_ID=0x6E052840 # DAPLINK_HIC_ID_NRF52840
- OS_CLOCK=64000000
- __DAPLINK
## Uncomment one of the following defines to use alternate pinmap
# - SSCI_ISP1807
# - SEEEDSTUDIO_XIAO_BLE
includes:
- source/hic_hal/nordic/nrf52840
- source/hic_hal/nordic/nrfx
Expand Down
36 changes: 0 additions & 36 deletions source/board/nrf52840_dongle.c

This file was deleted.

49 changes: 14 additions & 35 deletions source/hic_hal/nordic/nrf52840/IO_Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,26 +39,7 @@
// This GPIO configuration is only valid for the nrf52840 HIC
COMPILER_ASSERT(DAPLINK_HIC_ID == DAPLINK_HIC_ID_NRF52840);

#if defined(NRF52840_DONGLE)

#define GPIO_LED_ACTIVE_STATE 0
#define RESET_BUTTON_PULL NRF_GPIO_PIN_PULLUP
#define PIN_SWCLK NRF_GPIO_PIN_MAP(0, 9) // SWDCLK (Output)
#define PIN_SWDIO NRF_GPIO_PIN_MAP(0, 10) // SWDIO (Input/Output)
#define PIN_nRESET NRF_GPIO_PIN_MAP(0, 24) // nRESET Pin
#undef LED_RUNNING // Target Running LED (Output)
#undef LED_CONNECTED // Connected LED (Output)
#define LED_HID NRF_GPIO_PIN_MAP(0, 6) // HID LED
#define LED_MSC NRF_GPIO_PIN_MAP(0, 8) // MSC LED
#define LED_CDC NRF_GPIO_PIN_MAP(0, 12) // CDC LED
#undef LED_PWR // POWER LED
#define RESET_BUTTON NRF_GPIO_PIN_MAP(1, 6) // Reset button (SW_RESET)
#define UART_TX_PIN NRF_GPIO_PIN_MAP(1, 10) // UART
#define UART_RX_PIN NRF_GPIO_PIN_MAP(1, 13) // UART
#define I2C_SCL_PIN NRF_GPIO_PIN_MAP(1, 25) // I2C
#define I2C_SDA_PIN NRF_GPIO_PIN_MAP(0, 2) // I2C

#elif defined(SEEEDSTUDIO_XIAO_BLE)
#if defined(SEEEDSTUDIO_XIAO_BLE)

#define GPIO_LED_ACTIVE_STATE 0
#define RESET_BUTTON_PULL NRF_GPIO_PIN_PULLUP
Expand Down Expand Up @@ -98,24 +79,22 @@ COMPILER_ASSERT(DAPLINK_HIC_ID == DAPLINK_HIC_ID_NRF52840);

#else

// Default PIN assignment (not finalized based on nRF52833)
#define GPIO_LED_ACTIVE_STATE 1
#define GPIO_LED_ACTIVE_STATE 0
#define RESET_BUTTON_PULL NRF_GPIO_PIN_PULLUP

#define PIN_SWCLK NRF_GPIO_PIN_MAP(0, 1) // SWDCLK (Output)
#define PIN_SWDIO NRF_GPIO_PIN_MAP(0, 0) // SWDIO (Input/Output)
#undef PIN_nRESET // nRESET Pin
#define PIN_SWCLK NRF_GPIO_PIN_MAP(0, 13) // SWDCLK (Output)
#define PIN_SWDIO NRF_GPIO_PIN_MAP(0, 17) // SWDIO (Input/Output)
#define PIN_nRESET NRF_GPIO_PIN_MAP(0, 9) // nRESET Pin
#undef LED_RUNNING // Target Running LED (Output)
#undef LED_CONNECTED // Connected LED (Output)
#define LED_HID NRF_GPIO_PIN_MAP(0, 15) // HID LED
#define LED_MSC NRF_GPIO_PIN_MAP(0, 15) // MSC LED
#define LED_CDC NRF_GPIO_PIN_MAP(0, 15) // CDC LED
#define LED_PWR NRF_GPIO_PIN_MAP(0, 17) // POWER LED
#define RESET_BUTTON NRF_GPIO_PIN_MAP(1, 9) // Reset button (SW_RESET)
#define UART_TX_PIN NRF_GPIO_PIN_MAP(0, 2) // UART From IMCU to target
#define UART_RX_PIN NRF_GPIO_PIN_MAP(0, 3) // UART From target to IMCU
#define I2C_SCL_PIN NRF_GPIO_PIN_MAP(0, 29) // I2C SCL
#define I2C_SDA_PIN NRF_GPIO_PIN_MAP(0, 28) // I2C SDA
#define LED_HID NRF_GPIO_PIN_MAP(0, 6) // HID LED
#define LED_MSC NRF_GPIO_PIN_MAP(0, 8) // MSC LED
#define LED_CDC NRF_GPIO_PIN_MAP(0, 12) // CDC LED
#undef LED_PWR // POWER LED
#define RESET_BUTTON NRF_GPIO_PIN_MAP(1, 6) // Reset button (SW_RESET)
#define UART_TX_PIN NRF_GPIO_PIN_MAP(0, 24) // UART TX
#define UART_RX_PIN NRF_GPIO_PIN_MAP(1, 0) // UART RX
#define I2C_SCL_PIN NRF_GPIO_PIN_MAP(1, 25) // I2C
#define I2C_SDA_PIN NRF_GPIO_PIN_MAP(0, 2) // I2C

#endif

Expand Down

0 comments on commit fbd81f2

Please sign in to comment.