stm32/boards/USBDONGLE_WB55: Add definition files for new board.

pull/4927/head
Damien George 2019-07-17 16:51:24 +10:00
rodzic d2a8fb747f
commit 0c12adca46
4 zmienionych plików z 99 dodań i 0 usunięć

Wyświetl plik

@ -0,0 +1,43 @@
/* This file is part of the MicroPython project, http://micropython.org/
* MIT License; Copyright (c) 2019 Damien P. George
*/
#define MICROPY_HW_BOARD_NAME "USBDongle-WB55"
#define MICROPY_HW_MCU_NAME "STM32WB55CGU6"
#define MICROPY_PY_PYB_LEGACY (0)
#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)
// There is an external 32kHz oscillator
#define RTC_ASYNCH_PREDIV (0)
#define RTC_SYNCH_PREDIV (0x7fff)
#define MICROPY_HW_RTC_USE_LSE (1)
#define MICROPY_HW_RTC_USE_US (1)
// I2C buses
#define MICROPY_HW_I2C1_SCL (pin_B8)
#define MICROPY_HW_I2C1_SDA (pin_B9)
// User switch; pressing the button makes the input go low
#define MICROPY_HW_USRSW_PIN (pin_A10)
#define MICROPY_HW_USRSW_PULL (GPIO_PULLUP)
#define MICROPY_HW_USRSW_EXTI_MODE (GPIO_MODE_IT_FALLING)
#define MICROPY_HW_USRSW_PRESSED (0)
// LEDs
#define MICROPY_HW_LED1 (pin_B1) // red
#define MICROPY_HW_LED2 (pin_B0) // green
#define MICROPY_HW_LED3 (pin_A4) // blue
#define MICROPY_HW_LED_ON(pin) (mp_hal_pin_high(pin))
#define MICROPY_HW_LED_OFF(pin) (mp_hal_pin_low(pin))
// USB config
#define MICROPY_HW_USB_FS (1)
#define MICROPY_HW_USB_HID (0)
#define USBD_CDC_RX_DATA_SIZE (512)
#define USBD_CDC_TX_DATA_SIZE (512)

Wyświetl plik

@ -0,0 +1,5 @@
MCU_SERIES = wb
CMSIS_MCU = STM32WB55xx
AF_FILE = boards/stm32wb55_af.csv
LD_FILES = boards/stm32wb55xg.ld boards/common_basic.ld
STARTUP_FILE = lib/stm32lib/CMSIS/STM32WBxx/Source/Templates/gcc/startup_stm32wb55xx_cm4.o

Wyświetl plik

@ -0,0 +1,32 @@
,PA0
,PA1
,PA2
,PA3
,PA4
,PA5
,PA6
,PA7
,PA8
,PA9
,PA10
,PA11
,PA12
,PA13
,PA14
,PA15
,PB0
,PB1
,PB2
,PB3
,PB4
,PB5
,PB6
,PB7
,PB8
,PB9
SW,PA10
LED_GREEN,PB0
LED_RED,PB1
LED_BLUE,PA4
USB_DM,PA11
USB_DP,PA12
1 PA0
2 PA1
3 PA2
4 PA3
5 PA4
6 PA5
7 PA6
8 PA7
9 PA8
10 PA9
11 PA10
12 PA11
13 PA12
14 PA13
15 PA14
16 PA15
17 PB0
18 PB1
19 PB2
20 PB3
21 PB4
22 PB5
23 PB6
24 PB7
25 PB8
26 PB9
27 SW PA10
28 LED_GREEN PB0
29 LED_RED PB1
30 LED_BLUE PA4
31 USB_DM PA11
32 USB_DP PA12

Wyświetl plik

@ -0,0 +1,19 @@
/* This file is part of the MicroPython project, http://micropython.org/
* The MIT License (MIT)
* Copyright (c) 2019 Damien P. George
*/
#ifndef MICROPY_INCLUDED_STM32WBXX_HAL_CONF_H
#define MICROPY_INCLUDED_STM32WBXX_HAL_CONF_H
// Oscillator values in Hz
#define HSE_VALUE (32000000)
#define LSE_VALUE (32768)
#define EXTERNAL_SAI1_CLOCK_VALUE (48000)
// Oscillator timeouts in ms
#define HSE_STARTUP_TIMEOUT (100)
#define LSE_STARTUP_TIMEOUT (5000)
#include "boards/stm32wbxx_hal_conf_base.h"
#endif // MICROPY_INCLUDED_STM32WBXX_HAL_CONF_H