Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions bsp/stm32/libraries/HAL_Drivers/drivers/drv_usart.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@
static void stm32_dma_config(struct rt_serial_device *serial, rt_ubase_t flag);
#endif

/* Number of while blocking timeouts for the stm32_putc */
#define TX_BLOCK_TIMEOUT 2000

enum
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#ifndef BSP_STM32_UART_V1_TX_TIMEOUT
#define BSP_STM32_UART_V1_TX_TIMEOUT 2000
#endif

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

H730 with internal flash 就把这个bsp添加一下,做个example

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#ifndef BSP_STM32_UART_V1_TX_TIMEOUT #define BSP_STM32_UART_V1_TX_TIMEOUT 2000 #endif

所有stm32的bsp我都修改了,还需要加这个吗

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

H730 with internal flash 就把这个bsp添加一下,做个example

这个指的是?

{
#ifdef BSP_USING_UART1
Expand Down Expand Up @@ -233,8 +230,7 @@ static rt_err_t stm32_configure(struct rt_serial_device *serial, struct serial_c
return -RT_ERROR;
}
uart->DR_mask = stm32_uart_get_mask(uart->handle.Init.WordLength, uart->handle.Init.Parity);
uart->tx_block_timeout = TX_BLOCK_TIMEOUT;

uart->tx_block_timeout = BSP_STM32_UART_V1_TX_TIMEOUT;
return RT_EOK;
}

Expand Down
5 changes: 5 additions & 0 deletions bsp/stm32/libraries/templates/stm32f0xx/board/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ menu "On-chip Peripheral Drivers"
default y
select RT_USING_SERIAL
if BSP_USING_UART
config BSP_STM32_UART_V1_TX_TIMEOUT
int "UART TX timeout"
default 2000
depends on RT_USING_SERIAL_V1

config BSP_USING_UART1
bool "Enable UART1"
default y
Expand Down
5 changes: 5 additions & 0 deletions bsp/stm32/libraries/templates/stm32f10x/board/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ menu "On-chip Peripheral Drivers"
default y
select RT_USING_SERIAL
if BSP_USING_UART
config BSP_STM32_UART_V1_TX_TIMEOUT
int "UART TX timeout"
default 2000
depends on RT_USING_SERIAL_V1

config BSP_USING_UART1
bool "Enable UART1"
default y
Expand Down
5 changes: 5 additions & 0 deletions bsp/stm32/libraries/templates/stm32f2xx/board/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ menu "On-chip Peripheral Drivers"
default y
select RT_USING_SERIAL
if BSP_USING_UART
config BSP_STM32_UART_V1_TX_TIMEOUT
int "UART TX timeout"
default 2000
depends on RT_USING_SERIAL_V1

config BSP_USING_UART1
bool "Enable UART1"
default y
Expand Down
5 changes: 5 additions & 0 deletions bsp/stm32/libraries/templates/stm32f3xx/board/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ menu "On-chip Peripheral Drivers"
default y
select RT_USING_SERIAL
if BSP_USING_UART
config BSP_STM32_UART_V1_TX_TIMEOUT
int "UART TX timeout"
default 2000
depends on RT_USING_SERIAL_V1

config BSP_USING_UART2
bool "Enable UART2"
default y
Expand Down
5 changes: 5 additions & 0 deletions bsp/stm32/libraries/templates/stm32f4xx/board/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ menu "On-chip Peripheral Drivers"
default y
select RT_USING_SERIAL
if BSP_USING_UART
config BSP_STM32_UART_V1_TX_TIMEOUT
int "UART TX timeout"
default 2000
depends on RT_USING_SERIAL_V1

config BSP_USING_UART1
bool "Enable UART1"
default y
Expand Down
5 changes: 5 additions & 0 deletions bsp/stm32/libraries/templates/stm32f7xx/board/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ menu "On-chip Peripheral Drivers"
default y
select RT_USING_SERIAL
if BSP_USING_UART
config BSP_STM32_UART_V1_TX_TIMEOUT
int "UART TX timeout"
default 2000
depends on RT_USING_SERIAL_V1

config BSP_USING_UART1
bool "Enable UART1"
default y
Expand Down
5 changes: 5 additions & 0 deletions bsp/stm32/libraries/templates/stm32h7xx/board/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ menu "On-chip Peripheral Drivers"
default y
select RT_USING_SERIAL
if BSP_USING_UART
config BSP_STM32_UART_V1_TX_TIMEOUT
int "UART TX timeout"
default 2000
depends on RT_USING_SERIAL_V1

config BSP_USING_UART1
bool "Enable UART1"
default y
Expand Down
5 changes: 5 additions & 0 deletions bsp/stm32/libraries/templates/stm32l1xx/board/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ menu "On-chip Peripheral Drivers"
default y
select RT_USING_SERIAL
if BSP_USING_UART
config BSP_STM32_UART_V1_TX_TIMEOUT
int "UART TX timeout"
default 2000
depends on RT_USING_SERIAL_V1

config BSP_USING_UART1
bool "Enable UART1"
default y
Expand Down
5 changes: 5 additions & 0 deletions bsp/stm32/libraries/templates/stm32l4xx/board/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ menu "On-chip Peripheral Drivers"
default y
select RT_USING_SERIAL
if BSP_USING_UART
config BSP_STM32_UART_V1_TX_TIMEOUT
int "UART TX timeout"
default 2000
depends on RT_USING_SERIAL_V1

config BSP_USING_UART1
bool "Enable UART1"
default y
Expand Down
5 changes: 5 additions & 0 deletions bsp/stm32/libraries/templates/stm32l5xx/board/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ menu "On-chip Peripheral Drivers"
default y
select RT_USING_SERIAL
if BSP_USING_UART
config BSP_STM32_UART_V1_TX_TIMEOUT
int "UART TX timeout"
default 2000
depends on RT_USING_SERIAL_V1

config BSP_USING_LPUART1
bool "Enable LPUART1"
default y
Expand Down
4 changes: 4 additions & 0 deletions bsp/stm32/libraries/templates/stm32mp1xx/board/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ menu "On-chip Peripheral Drivers"
select RT_USING_SERIAL
default y
if BSP_USING_UART
config BSP_STM32_UART_V1_TX_TIMEOUT
int "UART TX timeout"
default 2000
depends on RT_USING_SERIAL_V1

config BSP_USING_UART4
bool "Enable UART4"
Expand Down
5 changes: 5 additions & 0 deletions bsp/stm32/libraries/templates/stm32wbxx/board/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ menu "On-chip Peripheral Drivers"
default y
select RT_USING_SERIAL
if BSP_USING_UART
config BSP_STM32_UART_V1_TX_TIMEOUT
int "UART TX timeout"
default 2000
depends on RT_USING_SERIAL_V1

config BSP_USING_UART1
bool "Enable UART1"
default y
Expand Down
5 changes: 5 additions & 0 deletions bsp/stm32/stm32f072-st-nucleo/board/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ menu "On-chip Peripheral Drivers"
default y
select RT_USING_SERIAL
if BSP_USING_UART
config BSP_STM32_UART_V1_TX_TIMEOUT
int "UART TX timeout"
default 2000
depends on RT_USING_SERIAL_V1

config BSP_USING_UART1
bool "Enable UART1"
default n
Expand Down
5 changes: 5 additions & 0 deletions bsp/stm32/stm32f091-st-nucleo/board/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ menu "On-chip Peripheral Drivers"
default y
select RT_USING_SERIAL
if BSP_USING_UART
config BSP_STM32_UART_V1_TX_TIMEOUT
int "UART TX timeout"
default 2000
depends on RT_USING_SERIAL_V1

config BSP_USING_UART1
bool "Enable UART1"
default y
Expand Down
5 changes: 5 additions & 0 deletions bsp/stm32/stm32f103-100ask-mini/board/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ menu "On-chip Peripheral Drivers"
default y
select RT_USING_SERIAL
if BSP_USING_UART
config BSP_STM32_UART_V1_TX_TIMEOUT
int "UART TX timeout"
default 2000
depends on RT_USING_SERIAL_V1

config BSP_USING_UART1
bool "Enable UART1"
default y
Expand Down
5 changes: 5 additions & 0 deletions bsp/stm32/stm32f103-100ask-pro/board/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ menu "On-chip Peripheral Drivers"
default y
select RT_USING_SERIAL
if BSP_USING_UART
config BSP_STM32_UART_V1_TX_TIMEOUT
int "UART TX timeout"
default 2000
depends on RT_USING_SERIAL_V1

config BSP_USING_UART1
bool "Enable UART1"
default y
Expand Down
5 changes: 5 additions & 0 deletions bsp/stm32/stm32f103-atk-nano/board/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ menu "On-chip Peripheral Drivers"
default y
select RT_USING_SERIAL
if BSP_USING_UART
config BSP_STM32_UART_V1_TX_TIMEOUT
int "UART TX timeout"
default 2000
depends on RT_USING_SERIAL_V1

config BSP_USING_UART1
bool "Enable UART1"
default y
Expand Down
5 changes: 5 additions & 0 deletions bsp/stm32/stm32f103-atk-warshipv3/board/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ menu "On-chip Peripheral Drivers"
default y
select RT_USING_SERIAL
if BSP_USING_UART
config BSP_STM32_UART_V1_TX_TIMEOUT
int "UART TX timeout"
default 2000
depends on RT_USING_SERIAL_V1

config BSP_USING_UART1
bool "Enable UART1"
default y
Expand Down
5 changes: 5 additions & 0 deletions bsp/stm32/stm32f103-blue-pill/board/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ menu "On-chip Peripheral Drivers"
default y
select RT_USING_SERIAL
if BSP_USING_UART
config BSP_STM32_UART_V1_TX_TIMEOUT
int "UART TX timeout"
default 2000
depends on RT_USING_SERIAL_V1

config BSP_USING_UART1
bool "Enable UART1"
default y
Expand Down
5 changes: 5 additions & 0 deletions bsp/stm32/stm32f103-dofly-M3S/board/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ menu "On-chip Peripheral Drivers"
default y
select RT_USING_SERIAL
if BSP_USING_UART
config BSP_STM32_UART_V1_TX_TIMEOUT
int "UART TX timeout"
default 2000
depends on RT_USING_SERIAL_V1

config BSP_USING_UART1
bool "Enable UART1"
default y
Expand Down
5 changes: 5 additions & 0 deletions bsp/stm32/stm32f103-dofly-lyc8/board/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ menu "On-chip Peripheral Drivers"
default y
select RT_USING_SERIAL
if BSP_USING_UART
config BSP_STM32_UART_V1_TX_TIMEOUT
int "UART TX timeout"
default 2000
depends on RT_USING_SERIAL_V1

config BSP_USING_UART1
bool "Enable UART1"
default y
Expand Down
5 changes: 5 additions & 0 deletions bsp/stm32/stm32f103-fire-arbitrary/board/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ menu "On-chip Peripheral Drivers"
default y
select RT_USING_SERIAL
if BSP_USING_UART
config BSP_STM32_UART_V1_TX_TIMEOUT
int "UART TX timeout"
default 2000
depends on RT_USING_SERIAL_V1

config BSP_USING_UART1
bool "Enable UART1"
default y
Expand Down
5 changes: 5 additions & 0 deletions bsp/stm32/stm32f103-gizwits-gokitv21/board/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ menu "On-chip Peripheral Drivers"
default y
select RT_USING_SERIAL
if BSP_USING_UART
config BSP_STM32_UART_V1_TX_TIMEOUT
int "UART TX timeout"
default 2000
depends on RT_USING_SERIAL_V1

config BSP_USING_UART1
bool "Enable UART1"
default y
Expand Down
5 changes: 5 additions & 0 deletions bsp/stm32/stm32f103-hw100k-ibox/board/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ menu "On-chip Peripheral Drivers"
default y
select RT_USING_SERIAL
if BSP_USING_UART
config BSP_STM32_UART_V1_TX_TIMEOUT
int "UART TX timeout"
default 2000
depends on RT_USING_SERIAL_V1

config BSP_USING_UART1
bool "Enable UART1"
default y
Expand Down
5 changes: 5 additions & 0 deletions bsp/stm32/stm32f103-onenet-nbiot/board/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ menu "On-chip Peripheral Drivers"
default y
select RT_USING_SERIAL
if BSP_USING_UART
config BSP_STM32_UART_V1_TX_TIMEOUT
int "UART TX timeout"
default 2000
depends on RT_USING_SERIAL_V1

config BSP_USING_UART1
bool "Enable UART1"
default y
Expand Down
5 changes: 5 additions & 0 deletions bsp/stm32/stm32f103-yf-ufun/board/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ menu "On-chip Peripheral Drivers"
default y
select RT_USING_SERIAL
if BSP_USING_UART
config BSP_STM32_UART_V1_TX_TIMEOUT
int "UART TX timeout"
default 2000
depends on RT_USING_SERIAL_V1

config BSP_USING_UART1
bool "Enable UART1"
default y
Expand Down
5 changes: 5 additions & 0 deletions bsp/stm32/stm32f103-ys-f1pro/board/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ menu "On-chip Peripheral Drivers"
default y
select RT_USING_SERIAL
if BSP_USING_UART
config BSP_STM32_UART_V1_TX_TIMEOUT
int "UART TX timeout"
default 2000
depends on RT_USING_SERIAL_V1

config BSP_USING_UART1
bool "Enable UART1"
default y
Expand Down
21 changes: 13 additions & 8 deletions bsp/stm32/stm32f107-uc-eval/board/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,19 @@ menu "On-chip Peripheral Drivers"
default y
select RT_USING_SERIAL
if BSP_USING_UART
config BSP_USING_UART2
bool "Enable UART2"
default y

config BSP_UART2_RX_USING_DMA
bool "Enable UART2 RX DMA"
depends on BSP_USING_UART2 && RT_SERIAL_USING_DMA
default n
config BSP_STM32_UART_V1_TX_TIMEOUT
int "UART TX timeout"
default 2000
depends on RT_USING_SERIAL_V1

config BSP_USING_UART2
bool "Enable UART2"
default y

config BSP_UART2_RX_USING_DMA
bool "Enable UART2 RX DMA"
depends on BSP_USING_UART2 && RT_SERIAL_USING_DMA
default n


endif
Expand Down
5 changes: 5 additions & 0 deletions bsp/stm32/stm32f207-st-nucleo/board/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ menu "On-chip Peripheral Drivers"
default y
select RT_USING_SERIAL
if BSP_USING_UART
config BSP_STM32_UART_V1_TX_TIMEOUT
int "UART TX timeout"
default 2000
depends on RT_USING_SERIAL_V1

config BSP_USING_UART3
bool "Enable UART3"
default y
Expand Down
5 changes: 5 additions & 0 deletions bsp/stm32/stm32f302-st-nucleo/board/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ menu "On-chip Peripheral Drivers"
default y
select RT_USING_SERIAL
if BSP_USING_UART
config BSP_STM32_UART_V1_TX_TIMEOUT
int "UART TX timeout"
default 2000
depends on RT_USING_SERIAL_V1

config BSP_USING_UART2
bool "Enable UART2"
default y
Expand Down
Loading