summaryrefslogtreecommitdiff
path: root/bsp/nrf5x/nrf52840
diff options
context:
space:
mode:
authorShermanShao11 <[email protected]>2020-05-25 12:04:04 +0800
committerShermanShao11 <[email protected]>2020-05-25 19:42:33 +0800
commita17867878dd38f48fb8ef75ea3e47bb1e7537dfe (patch)
tree88cef9814aa88bc47b5b2cf7fbcb310e6cec9164 /bsp/nrf5x/nrf52840
parentfc44e8f0aebc697613e4b861a40de81047fdb9b0 (diff)
[BSP]Add nrf5x SPI BSP
Diffstat (limited to 'bsp/nrf5x/nrf52840')
-rw-r--r--bsp/nrf5x/nrf52840/board/Kconfig74
-rw-r--r--bsp/nrf5x/nrf52840/board/sdk_config.h14
2 files changed, 81 insertions, 7 deletions
diff --git a/bsp/nrf5x/nrf52840/board/Kconfig b/bsp/nrf5x/nrf52840/board/Kconfig
index 8e6f6043f8..cc4b8ee92f 100644
--- a/bsp/nrf5x/nrf52840/board/Kconfig
+++ b/bsp/nrf5x/nrf52840/board/Kconfig
@@ -80,6 +80,79 @@ menu "On-chip Peripheral Drivers"
default n
endif
+ config BSP_USING_SPI
+ bool "Enable SPI"
+ select RT_USING_PIN
+ default y
+
+ if BSP_USING_SPI
+ config BSP_USING_SPI0
+ bool "Enable SPI0 bus"
+ default y
+ if BSP_USING_SPI0
+ config BSP_SPI0_SCK_PIN
+ int "SPI0 sck pin number set"
+ range 0 47
+ default 28
+ config BSP_SPI0_MOSI_PIN
+ int "SPI0 mosi pin number set"
+ range 0 47
+ default 29
+ config BSP_SPI0_MISO_PIN
+ int "SPI0 miso pin number set"
+ range 0 47
+ default 30
+ config BSP_SPI0_SS_PIN
+ int "SPI0 ss pin number set"
+ range 0 47
+ default 31
+ endif
+
+ config BSP_USING_SPI1
+ bool "Enable SPI1 bus"
+ default n
+ if BSP_USING_SPI1
+ config BSP_SPI1_SCK_PIN
+ int "SPI0 sck pin number set"
+ range 0 47
+ default 28
+ config BSP_SPI1_MOSI_PIN
+ int "SPI0 mosi pin number set"
+ range 0 47
+ default 29
+ config BSP_SPI1_MISO_PIN
+ int "SPI0 miso pin number set"
+ range 0 47
+ default 30
+ config BSP_SPI1_SS_PIN
+ int "SPI0 ss pin number set"
+ range 0 47
+ default 31
+ endif
+
+ config BSP_USING_SPI2
+ bool "Enable SPI2 bus"
+ default n
+ if BSP_USING_SPI2
+ config BSP_SPI2_SCK_PIN
+ int "SPI0 sck pin number set"
+ range 0 47
+ default 28
+ config BSP_SPI2_MOSI_PIN
+ int "SPI0 mosi pin number set"
+ range 0 47
+ default 29
+ config BSP_SPI2_MISO_PIN
+ int "SPI0 miso pin number set"
+ range 0 47
+ default 30
+ config BSP_SPI2_SS_PIN
+ int "SPI0 ss pin number set"
+ range 0 47
+ default 31
+ endif
+
+ endif
config BSP_USING_ON_CHIP_FLASH
select PKG_USING_FAL
bool "Enable on-chip FLASH"
@@ -87,7 +160,6 @@ menu "On-chip Peripheral Drivers"
menu "On-chip flash config"
-
config MCU_FLASH_START_ADDRESS
hex "MCU FLASH START ADDRESS"
default 0x00000000
diff --git a/bsp/nrf5x/nrf52840/board/sdk_config.h b/bsp/nrf5x/nrf52840/board/sdk_config.h
index 75efba927a..3ad63df3ea 100644
--- a/bsp/nrf5x/nrf52840/board/sdk_config.h
+++ b/bsp/nrf5x/nrf52840/board/sdk_config.h
@@ -3556,27 +3556,27 @@
// <e> NRFX_SPI_ENABLED - nrfx_spi - SPI peripheral driver
//==========================================================
#ifndef NRFX_SPI_ENABLED
-#define NRFX_SPI_ENABLED 0
+#define NRFX_SPI_ENABLED 1
#endif
// <q> NRFX_SPI0_ENABLED - Enable SPI0 instance
#ifndef NRFX_SPI0_ENABLED
-#define NRFX_SPI0_ENABLED 0
+#define NRFX_SPI0_ENABLED 1
#endif
// <q> NRFX_SPI1_ENABLED - Enable SPI1 instance
#ifndef NRFX_SPI1_ENABLED
-#define NRFX_SPI1_ENABLED 0
+#define NRFX_SPI1_ENABLED 1
#endif
// <q> NRFX_SPI2_ENABLED - Enable SPI2 instance
#ifndef NRFX_SPI2_ENABLED
-#define NRFX_SPI2_ENABLED 0
+#define NRFX_SPI2_ENABLED 1
#endif
// <o> NRFX_SPI_MISO_PULL_CFG - MISO pin pull configuration.
@@ -11694,9 +11694,11 @@
#endif
// </e>
-// </h>
+// </h>
//==========================================================
-
+#ifndef NRFX_SYSTICK_ENABLED
+#define NRFX_SYSTICK_ENABLED 1
+#endif
// <<< end of configuration section >>>
#endif //SDK_CONFIG_H