Skip to content

Commit ef20473

Browse files
committed
Initial commit of Myriad2 board-specific configuration files
1 parent 0429d35 commit ef20473

3 files changed

Lines changed: 478 additions & 0 deletions

File tree

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#define PYBV10 // To maintain support for LED intensity - see led.c (maybe usart.c also?)
2+
3+
#define MICROPY_HW_BOARD_NAME "Myriad2"
4+
#define MICROPY_HW_MCU_NAME "STM32F405RG"
5+
6+
#define MICROPY_HW_HAS_SWITCH (1)
7+
#define MICROPY_HW_HAS_SDCARD (1)
8+
#define MICROPY_HW_HAS_MMA7660 (0) //blm
9+
#define MICROPY_HW_HAS_LIS3DSH (0)
10+
#define MICROPY_HW_HAS_LCD (0) //blm
11+
#define MICROPY_HW_ENABLE_RNG (1)
12+
#define MICROPY_HW_ENABLE_RTC (1)
13+
#define MICROPY_HW_ENABLE_TIMER (1)
14+
#define MICROPY_HW_ENABLE_SERVO (1)
15+
#define MICROPY_HW_ENABLE_DAC (1)
16+
#define MICROPY_HW_ENABLE_I2C1 (1)
17+
#define MICROPY_HW_ENABLE_SPI1 (1)
18+
#define MICROPY_HW_ENABLE_SPI3 (0)
19+
#define MICROPY_HW_ENABLE_CC3K (0)
20+
21+
// USRSW has no pullup or pulldown, and placing the jumper makes the input go low
22+
#define MICROPY_HW_USRSW_PIN (pin_A13)
23+
#define MICROPY_HW_USRSW_PULL (GPIO_PULLUP)
24+
#define MICROPY_HW_USRSW_EXTI_MODE (GPIO_MODE_IT_FALLING)
25+
#define MICROPY_HW_USRSW_PRESSED (0)
26+
27+
// The pyboard has 4 LEDs
28+
#define MICROPY_HW_LED1 (pin_C4) // LED1
29+
#define MICROPY_HW_LED2 (pin_C5) // LED2
30+
#define MICROPY_HW_LED3 (pin_B5) // red
31+
#define MICROPY_HW_LED4 (pin_B4) // green
32+
#define MICROPY_HW_LED_OTYPE (GPIO_MODE_OUTPUT_OD)
33+
#define MICROPY_HW_LED_ON(pin) (pin->gpio->BSRRH = pin->pin_mask)
34+
#define MICROPY_HW_LED_OFF(pin) (pin->gpio->BSRRL = pin->pin_mask)
35+
36+
// SD card detect switch
37+
#define MICROPY_HW_SDCARD_DETECT_PIN (pin_A8)
38+
#define MICROPY_HW_SDCARD_DETECT_PULL (GPIO_PULLUP)
39+
#define MICROPY_HW_SDCARD_DETECT_PRESENT (GPIO_PIN_RESET)

stmhal/boards/MYRIAD2/pins.csv

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
X1,PA0
2+
X2,PA1
3+
X3,PA2
4+
X4,PA3
5+
X5,PA4
6+
X6,PA5
7+
X7,PA6
8+
X8,PA7
9+
X9,PB6
10+
X10,PB7
11+
X13,Reset
12+
X14,GND
13+
X15,3.3V
14+
X16,VIN
15+
X17,PB3
16+
X18,PC13
17+
X19,PC0
18+
X20,PC1
19+
X21,PC2
20+
X22,PC3
21+
X23,A3.3V
22+
X24,AGND
23+
Y1,PC6
24+
Y2,PC7
25+
Y3,PB8
26+
Y4,PB9
27+
Y5,PB12
28+
Y6,PB13
29+
Y7,PB14
30+
Y8,PB15
31+
Y9,PB10
32+
Y10,PB11
33+
Y11,PB0
34+
Y12,PB1
35+
Y13,Reset
36+
Y14,GND
37+
Y15,3.3V
38+
Y16,VIN
39+
LED1,PC4
40+
LED2,PC5
41+
LED3,PB5
42+
LED4,PB4
43+
SW,PA13
44+
SD,PA8
45+
46+

0 commit comments

Comments
 (0)