summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Cross <sean@xobs.io>2020-05-07 17:00:51 +0800
committerSean Cross <sean@xobs.io>2020-05-12 09:31:51 +0800
commit370fc7293a9ebe8015b70b9579f15386e59cbfea (patch)
tree5eff42dcac13d5181a2065989f7a3c33d0e11597
parent79c055f958dc5d85942cadf21b384b4654e92bba (diff)
nrf: support disabling SPIM3
SPIM3 is faster than all other SPI blocks, and is capable of generating a 32 MHz clock. However, it cannot be used at the same time as the BLE radio without dedicating an additional 8 kB of RAM to it. Therefore, some boards may want to disable this. Support pre-defining NRFX_SPIM3_ENABLED on the command line to disable it on some bords. Signed-off-by: Sean Cross <sean@xobs.io>
-rw-r--r--ports/nrf/nrfx_config.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/ports/nrf/nrfx_config.h b/ports/nrf/nrfx_config.h
index 05ec95ae3..7a7f2e6d6 100644
--- a/ports/nrf/nrfx_config.h
+++ b/ports/nrf/nrfx_config.h
@@ -41,12 +41,14 @@
#define NRFX_SPIM1_ENABLED 1
#endif
#define NRFX_SPIM2_ENABLED 1
+#ifndef NRFX_SPIM3_ENABLED
#if defined(NRF52840_XXAA) || defined(NRF52833_XXAA)
#define NRFX_SPIM_EXTENDED_ENABLED 1
#define NRFX_SPIM3_ENABLED 1
#elif CIRCUITPY_NRF_NUM_I2C == 2
#define NRFX_SPIM3_ENABLED 0
#endif
+#endif
#define NRFX_SPIM_DEFAULT_CONFIG_IRQ_PRIORITY 7