Skip to content

Support for UART RX/TX level inversion on F3/F7 platforms #1160

@pawelsky

Description

@pawelsky

Please add API in HardwareSerial class to enable/disable RX/TX level inversion for platforms that support it (e.g. F3 or F7)

This can be done e.g. by adding a inverse_logic parameter to the constructor (similarily to SoftwareSerial), and based on that configuring the AdvancedInit member of the UART_AdvFeatureInitTypeDef struct in uart_init function in the uart.c wrapper to something like:

    huart->AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_TXINVERT_INIT | UART_ADVFEATURE_RXINVERT_INIT;
    huart->AdvancedInit.TxPinLevelInvert = UART_ADVFEATURE_TXINV_ENABLE;
    huart->AdvancedInit.RxPinLevelInvert = UART_ADVFEATURE_RXINV_ENABLE;

Activity

deleted a comment from babipsylon on May 4, 2021
fpistm

fpistm commented on Jun 11, 2021

@fpistm
Member

Added to [U(S)ART] request list #1418

added this to the 2.10.0 milestone on Jan 22, 2025
removed this from the 2.10.0 milestone on Jan 22, 2025
added a commit that references this issue on Mar 27, 2025
fa90084

11 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    Status

    To do

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Support for UART RX/TX level inversion on F3/F7 platforms · Issue #1160 · stm32duino/Arduino_Core_STM32