mirror of
https://github.com/hathach/tinyusb.git
synced 2026-08-18 02:53:35 +00:00
bsp/stm32h5: fix uart definition
Signed-off-by: HiFiPhile <admin@hifiphile.com>
This commit is contained in:
@ -296,6 +296,7 @@ b_g474e_dpow1 STM32 B-G474E-DPOW1 Discovery kit stm32g4 https://www.s
|
||||
stm32g474nucleo STM32 G474 Nucleo stm32g4 https://www.st.com/en/evaluation-tools/nucleo-g474re.html
|
||||
stm32g491nucleo STM32 G491 Nucleo stm32g4 https://www.st.com/en/evaluation-tools/nucleo-g491re.html
|
||||
stm32h503nucleo STM32 H503 Nucleo stm32h5 https://www.st.com/en/evaluation-tools/nucleo-h503rb.html
|
||||
stm32h533nucleo STM32 H533 Nucleo stm32h5 https://www.st.com/en/evaluation-tools/nucleo-h533re.html
|
||||
stm32h563nucleo STM32 H563 Nucleo stm32h5 https://www.st.com/en/evaluation-tools/nucleo-h563zi.html
|
||||
stm32h573i_dk STM32 H573i Discovery stm32h5 https://www.st.com/en/evaluation-tools/stm32h573i-dk.html
|
||||
daisyseed Daisy Seed stm32h7 https://electro-smith.com/products/daisy-seed
|
||||
|
||||
@ -37,6 +37,8 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define UART_ID 3
|
||||
|
||||
#define PINID_LED 0
|
||||
#define PINID_BUTTON 1
|
||||
#define PINID_UART_TX 2
|
||||
|
||||
@ -38,6 +38,8 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define UART_ID 2
|
||||
|
||||
#define PINID_LED 0
|
||||
#define PINID_BUTTON 1
|
||||
#define PINID_UART_TX 2
|
||||
@ -46,22 +48,22 @@ extern "C" {
|
||||
static board_pindef_t board_pindef[] = {
|
||||
{ // LED
|
||||
.port = GPIOA,
|
||||
.pin_init = { .Pin = GPIO_PIN_5, .Mode = GPIO_MODE_OUTPUT_PP, .Pull = GPIO_PULLUP, .Speed = GPIO_SPEED_FREQ_HIGH, .Alternate = 0 },
|
||||
.active_state = 0
|
||||
.pin_init = { .Pin = GPIO_PIN_5, .Mode = GPIO_MODE_OUTPUT_PP, .Pull = GPIO_NOPULL, .Speed = GPIO_SPEED_FREQ_HIGH, .Alternate = 0 },
|
||||
.active_state = 1
|
||||
},
|
||||
{ // Button
|
||||
.port = GPIOC,
|
||||
.pin_init = { .Pin = GPIO_PIN_13, .Mode = GPIO_MODE_INPUT, .Pull = GPIO_PULLUP, .Speed = GPIO_SPEED_FREQ_HIGH, .Alternate = 0 },
|
||||
.pin_init = { .Pin = GPIO_PIN_13, .Mode = GPIO_MODE_INPUT, .Pull = GPIO_PULLDOWN, .Speed = GPIO_SPEED_FREQ_HIGH, .Alternate = 0 },
|
||||
.active_state = 1
|
||||
},
|
||||
{ // UART TX
|
||||
.port = GPIOA,
|
||||
.pin_init = { .Pin = GPIO_PIN_2, .Mode = GPIO_MODE_AF_PP, .Pull = GPIO_PULLUP, .Speed = GPIO_SPEED_FREQ_HIGH, .Alternate = GPIO_AF7_USART3 },
|
||||
.pin_init = { .Pin = GPIO_PIN_2, .Mode = GPIO_MODE_AF_PP, .Pull = GPIO_PULLUP, .Speed = GPIO_SPEED_FREQ_HIGH, .Alternate = GPIO_AF7_USART2 },
|
||||
.active_state = 0
|
||||
},
|
||||
{ // UART RX
|
||||
.port = GPIOA,
|
||||
.pin_init = { .Pin = GPIO_PIN_3, .Mode = GPIO_MODE_AF_PP, .Pull = GPIO_PULLUP, .Speed = GPIO_SPEED_FREQ_HIGH, .Alternate = GPIO_AF7_USART3 },
|
||||
.pin_init = { .Pin = GPIO_PIN_3, .Mode = GPIO_MODE_AF_PP, .Pull = GPIO_PULLUP, .Speed = GPIO_SPEED_FREQ_HIGH, .Alternate = GPIO_AF7_USART2 },
|
||||
.active_state = 0
|
||||
},
|
||||
};
|
||||
|
||||
@ -37,6 +37,8 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define UART_ID 3
|
||||
|
||||
#define PINID_LED 0
|
||||
#define PINID_BUTTON 1
|
||||
#define PINID_UART_TX 2
|
||||
@ -54,13 +56,13 @@ static board_pindef_t board_pindef[] = {
|
||||
.active_state = 0
|
||||
},
|
||||
{ // UART TX
|
||||
.port = GPIOA,
|
||||
.pin_init = { .Pin = GPIO_PIN_9, .Mode = GPIO_MODE_AF_PP, .Pull = GPIO_PULLUP, .Speed = GPIO_SPEED_FREQ_HIGH, .Alternate = GPIO_AF7_USART1 },
|
||||
.port = GPIOD,
|
||||
.pin_init = { .Pin = GPIO_PIN_8, .Mode = GPIO_MODE_AF_PP, .Pull = GPIO_PULLUP, .Speed = GPIO_SPEED_FREQ_HIGH, .Alternate = GPIO_AF7_USART3 },
|
||||
.active_state = 0
|
||||
},
|
||||
{ // UART RX
|
||||
.port = GPIOA,
|
||||
.pin_init = { .Pin = GPIO_PIN_10, .Mode = GPIO_MODE_AF_PP, .Pull = GPIO_PULLUP, .Speed = GPIO_SPEED_FREQ_HIGH, .Alternate = GPIO_AF7_USART1 },
|
||||
.port = GPIOD,
|
||||
.pin_init = { .Pin = GPIO_PIN_9, .Mode = GPIO_MODE_AF_PP, .Pull = GPIO_PULLUP, .Speed = GPIO_SPEED_FREQ_HIGH, .Alternate = GPIO_AF7_USART3 },
|
||||
.active_state = 0
|
||||
},
|
||||
};
|
||||
|
||||
@ -43,14 +43,16 @@ extern "C" {
|
||||
#define OTG_FS_VBUS_SENSE 1
|
||||
#define OTG_HS_VBUS_SENSE 0
|
||||
|
||||
#define PINID_LED 0
|
||||
#define PINID_BUTTON 1
|
||||
#define PINID_UART_TX 2
|
||||
#define PINID_UART_RX 3
|
||||
#define PINID_TCPP0203_EN 4
|
||||
#define PINID_I2C_SCL 5
|
||||
#define PINID_I2C_SDA 6
|
||||
#define PINID_TCPP0203_INT 7
|
||||
#define UART_ID 1
|
||||
|
||||
#define PINID_LED 0
|
||||
#define PINID_BUTTON 1
|
||||
#define PINID_UART_TX 2
|
||||
#define PINID_UART_RX 3
|
||||
#define PINID_TCPP0203_EN 4
|
||||
#define PINID_I2C_SCL 5
|
||||
#define PINID_I2C_SDA 6
|
||||
#define PINID_TCPP0203_INT 7
|
||||
|
||||
static board_pindef_t board_pindef[] = {
|
||||
{ // LED
|
||||
|
||||
@ -91,8 +91,10 @@ static UART_HandleTypeDef UartHandle = {
|
||||
.Parity = UART_PARITY_NONE,
|
||||
.HwFlowCtl = UART_HWCONTROL_NONE,
|
||||
.Mode = UART_MODE_TX_RX,
|
||||
.OverSampling = UART_OVERSAMPLING_16,
|
||||
.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_NO_INIT
|
||||
.OverSampling = UART_OVERSAMPLING_16
|
||||
},
|
||||
.AdvancedInit = {
|
||||
.AdvFeatureInit = UART_ADVFEATURE_NO_INIT
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
@ -134,7 +134,7 @@ deps_optional = {
|
||||
'57ea11f70ebf1850e1048989d665c9070f0bb863',
|
||||
'stm32h7rs'],
|
||||
'hw/mcu/st/cmsis_device_h5': ['https://github.com/STMicroelectronics/cmsis_device_h5.git',
|
||||
'5273b8f134ba65f5b8174c4141b711b5c0d295b2',
|
||||
'884b8dc78e41cbfca008363342b17f4a9e8641f7',
|
||||
'stm32h5'],
|
||||
'hw/mcu/st/cmsis_device_l0': ['https://github.com/STMicroelectronics/cmsis_device_l0.git',
|
||||
'7b7ae8cd71437331e1d7824f157d00c7bb4a5044',
|
||||
|
||||
Reference in New Issue
Block a user