stm32/boards/NUCLEO_H743ZI: Add extra pins and peripheral definitions.

- Corrected pin assignments and checked with CubeMX.
- Added additional I2C and UARTs.
- Added Ethernet interface definitions with lwIP and SSL support (but
  Ethernet is currently unsupported on H7 MCUs so not fully enabled).
This commit is contained in:
roland van straten 2019-12-10 21:52:30 +01:00 committed by Damien George
parent 26a78edb49
commit 43b576d88d
3 changed files with 135 additions and 41 deletions

View File

@ -31,8 +31,21 @@ void NUCLEO_H743ZI_board_early_init(void);
#define MICROPY_HW_FLASH_LATENCY FLASH_LATENCY_4 #define MICROPY_HW_FLASH_LATENCY FLASH_LATENCY_4
// UART config // UART config
#define MICROPY_HW_UART2_TX (pin_D5)
#define MICROPY_HW_UART2_RX (pin_D6)
#define MICROPY_HW_UART2_RTS (pin_D4)
#define MICROPY_HW_UART2_CTS (pin_D3)
#define MICROPY_HW_UART3_TX (pin_D8) #define MICROPY_HW_UART3_TX (pin_D8)
#define MICROPY_HW_UART3_RX (pin_D9) #define MICROPY_HW_UART3_RX (pin_D9)
#define MICROPY_HW_UART5_TX (pin_B6)
#define MICROPY_HW_UART5_RX (pin_B12)
#define MICROPY_HW_UART6_TX (pin_C6)
#define MICROPY_HW_UART6_RX (pin_C7)
#define MICROPY_HW_UART7_TX (pin_F7)
#define MICROPY_HW_UART7_RX (pin_F6)
#define MICROPY_HW_UART8_TX (pin_E1)
#define MICROPY_HW_UART8_RX (pin_E0)
#define MICROPY_HW_UART_REPL PYB_UART_3 #define MICROPY_HW_UART_REPL PYB_UART_3
#define MICROPY_HW_UART_REPL_BAUD 115200 #define MICROPY_HW_UART_REPL_BAUD 115200
@ -41,6 +54,8 @@ void NUCLEO_H743ZI_board_early_init(void);
#define MICROPY_HW_I2C1_SDA (pin_B9) #define MICROPY_HW_I2C1_SDA (pin_B9)
#define MICROPY_HW_I2C2_SCL (pin_F1) #define MICROPY_HW_I2C2_SCL (pin_F1)
#define MICROPY_HW_I2C2_SDA (pin_F0) #define MICROPY_HW_I2C2_SDA (pin_F0)
#define MICROPY_HW_I2C4_SCL (pin_F14)
#define MICROPY_HW_I2C4_SDA (pin_F15)
// SPI // SPI
#define MICROPY_HW_SPI3_NSS (pin_A4) #define MICROPY_HW_SPI3_NSS (pin_A4)
@ -75,3 +90,14 @@ void NUCLEO_H743ZI_board_early_init(void);
#define MICROPY_HW_SDCARD_DETECT_PIN (pin_G2) #define MICROPY_HW_SDCARD_DETECT_PIN (pin_G2)
#define MICROPY_HW_SDCARD_DETECT_PULL (GPIO_PULLUP) #define MICROPY_HW_SDCARD_DETECT_PULL (GPIO_PULLUP)
#define MICROPY_HW_SDCARD_DETECT_PRESENT (GPIO_PIN_RESET) #define MICROPY_HW_SDCARD_DETECT_PRESENT (GPIO_PIN_RESET)
// Ethernet via RMII (MDC define disabled for now until eth.c supports H7)
//#define MICROPY_HW_ETH_MDC (pin_C1)
#define MICROPY_HW_ETH_MDIO (pin_A2)
#define MICROPY_HW_ETH_RMII_REF_CLK (pin_A1)
#define MICROPY_HW_ETH_RMII_CRS_DV (pin_A7)
#define MICROPY_HW_ETH_RMII_RXD0 (pin_C4)
#define MICROPY_HW_ETH_RMII_RXD1 (pin_C5)
#define MICROPY_HW_ETH_RMII_TX_EN (pin_G11)
#define MICROPY_HW_ETH_RMII_TXD0 (pin_G13)
#define MICROPY_HW_ETH_RMII_TXD1 (pin_B13)

View File

@ -16,3 +16,8 @@ LD_FILES = boards/stm32h743.ld boards/common_ifs.ld
TEXT0_ADDR = 0x08000000 TEXT0_ADDR = 0x08000000
TEXT1_ADDR = 0x08040000 TEXT1_ADDR = 0x08040000
endif endif
# MicroPython settings
MICROPY_PY_LWIP = 1
MICROPY_PY_USSL = 1
MICROPY_SSL_MBEDTLS = 1

View File

@ -1,46 +1,97 @@
A0,PA0 A0,PA3
A1,PF10 A1,PC0
A2,PF9 A2,PC3
A3,PF8 A3,PB1
A4,PF7 A4,PC2
A5,PF6 A5,PF10
D0,PC7 A6,PF4
D1,PC6 A7,PF5
D2,PG6 A8,PF6
D3,PB4 D0,PB7
D4,PG7 D1,PB6
D5,PA8 D2,PG14
D6,PH6 D3,PE13
D7,PI3 D4,PE14
D8,PI2 D5,PE11
D9,PA15 D6,PE9
D10,PI0 D7,PG12
D11,PB15 D8,PF3
D12,PB14 D9,PD15
D13,PI1 D10,PD14
D11,PB5
D12,PA6
D13,PA7
D14,PB9 D14,PB9
D15,PB8 D15,PB8
D16,PC6
D17,PB15
D18,PB13
D19,PB12
D20,PA15
D21,PC7
D22,PB5 D22,PB5
D23,PB3 D23,PB3
D67,PD0 D24,PA4
D25,PB4
D26,PG6
D27,PB2
D28,PD13
D29,PD12
D30,PD11
D31,PE2
D32,PA0
D33,PB0
D34,PE0
D35,PB11
D36,PB10
D37,PE15
D38,PE6
D39,PE12
D40,PE10
D41,PE7
D42,PE8
D43,PC8
D44,PC9
D45,PC10
D46,PC11
D47,PC12
D48,PD2
D49,PG2
D50,PG3
D51,PD7
D52,PD6
D53,PD5
D54,PD4
D55,PD3
D56,PE2
D57,PE4
D58,PE5
D59,PE6
D60,PE3
D61,PF8
D62,PF7
D63,PF9
D64,PG1
D65,PG0
D66,PD1 D66,PD1
D67,PD0
D68,PF0
D69,PF1
D70,PF2
D71,PE9
D72,PB2
DAC1,PA4 DAC1,PA4
DAC2,PA5 DAC2,PA5
LED1,PB0 LED1,PB0
LED2,PB7 LED2,PB7
LED3,PB14 LED3,PB14
SW,PC13 SW,PC13
TP1,PH2
TP2,PI8
TP3,PH15
AUDIO_INT,PD6
AUDIO_SDA,PH8
AUDIO_SCL,PH7
I2C1_SDA,PB9 I2C1_SDA,PB9
I2C1_SCL,PB8 I2C1_SCL,PB8
I2C2_SDA,PF0 I2C2_SDA,PF0
I2C2_SCL,PF1 I2C2_SCL,PF1
EXT_RST,PG3 I2C4_SCL,PF14
I2C4_SDA,PF15
SD_D0,PC8 SD_D0,PC8
SD_D1,PC9 SD_D1,PC9
SD_D2,PC10 SD_D2,PC10
@ -48,20 +99,32 @@ SD_D3,PC11
SD_CMD,PD2 SD_CMD,PD2
SD_CK,PC12 SD_CK,PC12
SD_SW,PG2 SD_SW,PG2
LCD_BL_CTRL,PK3 OTG_FS_POWER,PG6
LCD_INT,PI13 OTG_FS_OVER_CURRENT,PG7
LCD_SDA,PH8 USB_VBUS,PA9
LCD_SCL,PH7 USB_ID,PA10
OTG_FS_POWER,PD5
OTG_FS_OVER_CURRENT,PD4
OTG_HS_OVER_CURRENT,PE3
USB_VBUS,PJ12
USB_ID,PA8
USB_DM,PA11 USB_DM,PA11
USB_DP,PA12 USB_DP,PA12
UART1_TX,PA9 UART2_TX,PD5
UART1_RX,PA10 UART2_RX,PD6
UART5_TX,PC12 UART2_RTS,PD4
UART5_RX,PD2 UART2_CTS,PD3
UART3_TX,PD8 UART3_TX,PD8
UART3_RX,PD9 UART3_RX,PD9
UART5_TX,PB6
UART5_RX,PB12
UART6_TX,PC6
UART6_RX,PC7
UART7_TX,PF7
UART7_RX,PF6
UART8_TX,PE1
UART8_RX,PE0
ETH_MDC,PC1
ETH_MDIO,PA2
ETH_RMII_REF_CLK,PA1
ETH_RMII_CRS_DV,PA7
ETH_RMII_RXD0,PC4
ETH_RMII_RXD1,PC5
ETH_RMII_TX_EN,PG11
ETH_RMII_TXD0,PG13
ETH_RMII_TXD1,PB13

1 A0 PA0 PA3
2 A1 PF10 PC0
3 A2 PF9 PC3
4 A3 PF8 PB1
5 A4 PF7 PC2
6 A5 PF6 PF10
7 D0 A6 PC7 PF4
8 D1 A7 PC6 PF5
9 D2 A8 PG6 PF6
10 D3 D0 PB4 PB7
11 D4 D1 PG7 PB6
12 D5 D2 PA8 PG14
13 D6 D3 PH6 PE13
14 D7 D4 PI3 PE14
15 D8 D5 PI2 PE11
16 D9 D6 PA15 PE9
17 D10 D7 PI0 PG12
18 D11 D8 PB15 PF3
19 D12 D9 PB14 PD15
20 D13 D10 PI1 PD14
21 D11 PB5
22 D12 PA6
23 D13 PA7
24 D14 PB9 PB9
25 D15 PB8 PB8
26 D16 PC6
27 D17 PB15
28 D18 PB13
29 D19 PB12
30 D20 PA15
31 D21 PC7
32 D22 PB5 PB5
33 D23 PB3 PB3
34 D67 D24 PD0 PA4
35 D25 PB4
36 D26 PG6
37 D27 PB2
38 D28 PD13
39 D29 PD12
40 D30 PD11
41 D31 PE2
42 D32 PA0
43 D33 PB0
44 D34 PE0
45 D35 PB11
46 D36 PB10
47 D37 PE15
48 D38 PE6
49 D39 PE12
50 D40 PE10
51 D41 PE7
52 D42 PE8
53 D43 PC8
54 D44 PC9
55 D45 PC10
56 D46 PC11
57 D47 PC12
58 D48 PD2
59 D49 PG2
60 D50 PG3
61 D51 PD7
62 D52 PD6
63 D53 PD5
64 D54 PD4
65 D55 PD3
66 D56 PE2
67 D57 PE4
68 D58 PE5
69 D59 PE6
70 D60 PE3
71 D61 PF8
72 D62 PF7
73 D63 PF9
74 D64 PG1
75 D65 PG0
76 D66 PD1 PD1
77 D67 PD0
78 D68 PF0
79 D69 PF1
80 D70 PF2
81 D71 PE9
82 D72 PB2
83 DAC1 PA4 PA4
84 DAC2 PA5 PA5
85 LED1 PB0 PB0
86 LED2 PB7 PB7
87 LED3 PB14 PB14
88 SW PC13 PC13
TP1 PH2
TP2 PI8
TP3 PH15
AUDIO_INT PD6
AUDIO_SDA PH8
AUDIO_SCL PH7
89 I2C1_SDA PB9 PB9
90 I2C1_SCL PB8 PB8
91 I2C2_SDA PF0 PF0
92 I2C2_SCL PF1 PF1
93 EXT_RST I2C4_SCL PG3 PF14
94 I2C4_SDA PF15
95 SD_D0 PC8 PC8
96 SD_D1 PC9 PC9
97 SD_D2 PC10 PC10
99 SD_CMD PD2 PD2
100 SD_CK PC12 PC12
101 SD_SW PG2 PG2
102 LCD_BL_CTRL OTG_FS_POWER PK3 PG6
103 LCD_INT OTG_FS_OVER_CURRENT PI13 PG7
104 LCD_SDA USB_VBUS PH8 PA9
105 LCD_SCL USB_ID PH7 PA10
OTG_FS_POWER PD5
OTG_FS_OVER_CURRENT PD4
OTG_HS_OVER_CURRENT PE3
USB_VBUS PJ12
USB_ID PA8
106 USB_DM PA11 PA11
107 USB_DP PA12 PA12
108 UART1_TX UART2_TX PA9 PD5
109 UART1_RX UART2_RX PA10 PD6
110 UART5_TX UART2_RTS PC12 PD4
111 UART5_RX UART2_CTS PD2 PD3
112 UART3_TX PD8 PD8
113 UART3_RX PD9 PD9
114 UART5_TX PB6
115 UART5_RX PB12
116 UART6_TX PC6
117 UART6_RX PC7
118 UART7_TX PF7
119 UART7_RX PF6
120 UART8_TX PE1
121 UART8_RX PE0
122 ETH_MDC PC1
123 ETH_MDIO PA2
124 ETH_RMII_REF_CLK PA1
125 ETH_RMII_CRS_DV PA7
126 ETH_RMII_RXD0 PC4
127 ETH_RMII_RXD1 PC5
128 ETH_RMII_TX_EN PG11
129 ETH_RMII_TXD0 PG13
130 ETH_RMII_TXD1 PB13