summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2020-06-01 21:38:11 +1000
committerDamien George <damien.p.george@gmail.com>2020-06-02 10:48:49 +1000
commit246f3f640dd635f67269bfdbebe23408f77cd2b0 (patch)
tree0b8f4c23e701a86514e8c2e55a9fda4553e37c03
parentc8985d52d3fde45cea2020573a78fecc4d0de142 (diff)
stm32/boards/xxx_WB55: Enable pyb.ADC and hardware SPI on WB55 boards.
These features are now supported (although machine.ADC is recommended over pyb.ADC).
-rw-r--r--ports/stm32/boards/NUCLEO_WB55/mpconfigboard.h3
-rw-r--r--ports/stm32/boards/USBDONGLE_WB55/mpconfigboard.h6
2 files changed, 5 insertions, 4 deletions
diff --git a/ports/stm32/boards/NUCLEO_WB55/mpconfigboard.h b/ports/stm32/boards/NUCLEO_WB55/mpconfigboard.h
index 2992ccce7..206134941 100644
--- a/ports/stm32/boards/NUCLEO_WB55/mpconfigboard.h
+++ b/ports/stm32/boards/NUCLEO_WB55/mpconfigboard.h
@@ -10,7 +10,6 @@
#define MICROPY_HW_HAS_FLASH (1)
#define MICROPY_HW_ENABLE_RTC (1)
#define MICROPY_HW_ENABLE_RNG (1)
-#define MICROPY_HW_ENABLE_ADC (0)
#define MICROPY_HW_ENABLE_USB (1)
#define MICROPY_HW_HAS_SWITCH (1)
@@ -34,7 +33,6 @@
#define MICROPY_HW_I2C3_SDA (pin_C1) // Arduino A1, pin 30 on CN7
// SPI buses
-#if 0 // TODO need working DMA
#define MICROPY_HW_SPI1_NSS (pin_A4) // Arduino D10 pin 17 on CN10
#define MICROPY_HW_SPI1_SCK (pin_A5) // Arduino D13, pin 11 on CN10
#define MICROPY_HW_SPI1_MISO (pin_A6) // Arduino D12, pin 13 on CN10
@@ -43,7 +41,6 @@
#define MICROPY_HW_SPI2_SCK (pin_B13) // pin 30 on CN10
#define MICROPY_HW_SPI2_MISO (pin_B14) // pin 28 on CN10
#define MICROPY_HW_SPI2_MOSI (pin_B15) // pin 26 on CN10
-#endif
// User switch; pressing the button makes the input go low
#define MICROPY_HW_USRSW_PIN (pin_C4)
diff --git a/ports/stm32/boards/USBDONGLE_WB55/mpconfigboard.h b/ports/stm32/boards/USBDONGLE_WB55/mpconfigboard.h
index 0ff751d61..fdb061900 100644
--- a/ports/stm32/boards/USBDONGLE_WB55/mpconfigboard.h
+++ b/ports/stm32/boards/USBDONGLE_WB55/mpconfigboard.h
@@ -10,7 +10,6 @@
#define MICROPY_HW_HAS_FLASH (1)
#define MICROPY_HW_ENABLE_RTC (1)
#define MICROPY_HW_ENABLE_RNG (1)
-#define MICROPY_HW_ENABLE_ADC (0)
#define MICROPY_HW_ENABLE_USB (1)
#define MICROPY_HW_HAS_SWITCH (1)
@@ -24,6 +23,11 @@
#define MICROPY_HW_I2C1_SCL (pin_B8)
#define MICROPY_HW_I2C1_SDA (pin_B9)
+// SPI buses
+#define MICROPY_HW_SPI1_SCK (pin_A5) // pin 8 on CN1
+#define MICROPY_HW_SPI1_MISO (pin_A6) // pin 9 on CN1
+#define MICROPY_HW_SPI1_MOSI (pin_A7) // pin 10 on CN1
+
// User switch; pressing the button makes the input go low
#define MICROPY_HW_USRSW_PIN (pin_A10)
#define MICROPY_HW_USRSW_PULL (GPIO_PULLUP)