You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
58 lines
1.7 KiB
58 lines
1.7 KiB
# STM32 UART configuration |
|
|
|
# Copyright (c) 2016 Open-RnD Sp. z o.o. |
|
# SPDX-License-Identifier: Apache-2.0 |
|
|
|
config UART_STM32 |
|
bool "STM32 MCU serial driver" |
|
default y |
|
depends on DT_HAS_ST_STM32_UART_ENABLED |
|
select SERIAL_HAS_DRIVER |
|
select SERIAL_SUPPORT_INTERRUPT |
|
# the ASYNC implementation requires a DMA controller |
|
select SERIAL_SUPPORT_ASYNC \ |
|
if DT_HAS_ST_STM32_DMA_V1_ENABLED || \ |
|
DT_HAS_ST_STM32_DMA_V2_ENABLED || \ |
|
DT_HAS_ST_STM32_DMA_V2BIS_ENABLED || \ |
|
DT_HAS_ST_STM32U5_DMA_ENABLED |
|
select DMA if UART_ASYNC_API |
|
select RESET |
|
select PINCTRL |
|
help |
|
This option enables the UART driver for STM32 family of |
|
processors. |
|
Say y if you wish to use serial port on STM32 MCU. |
|
|
|
if UART_STM32 |
|
|
|
if SOC_STM32U575XX || SOC_STM32U585XX || \ |
|
SOC_STM32H562XX || SOC_STM32H563XX || SOC_STM32H573XX |
|
|
|
choice UART_STM32U5_ERRATA_DMAT |
|
prompt "Workaround for DMAT errata on selected devices" |
|
default UART_STM32U5_ERRATA_DMAT_LOWPOWER if PM |
|
default UART_STM32U5_ERRATA_DMAT_NOCLEAR if !PM |
|
help |
|
Handles erratum "USART does not generate DMA requests after |
|
setting/clearing DMAT bit". |
|
Seen in Errata Sheet 0499 § 2.19.2 and §2.20.1 for stm32u57x/u58x, |
|
Errata Sheet 0565 § 2.14.1 and §2.15.1 for stm32h56x/h57x |
|
|
|
config UART_STM32U5_ERRATA_DMAT_LOWPOWER |
|
bool "Send first byte by polling" |
|
help |
|
This option sends first byte via software polling and |
|
rest of the buffer is sent via DMA. This option is suitable |
|
for STOP low-power modes. |
|
|
|
config UART_STM32U5_ERRATA_DMAT_NOCLEAR |
|
bool "Do not clear DMAT" |
|
help |
|
This option keeps DMAT bit set. This may cause additional power |
|
consumption in STOP low-power modes. |
|
|
|
endchoice |
|
|
|
endif # U575 || U585 || H562 || H563 || H573 |
|
|
|
endif # UART_STM32
|
|
|