Skip to content

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

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

  1. deleted a comment from babipsylon on May 4, 2021
  2. fpistm commented on Jun 11, 2021

    @fpistm
    Member

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

  3. added
    enhancement
    and removed on Jul 16, 2024
  4. added this to the 2.10.0 milestone on Jan 22, 2025
  5. removed this from the 2.10.0 milestone on Jan 22, 2025
  6. added 6 commits that reference this issue on Mar 27, 2025
    fa90084
    b499ca7
    af08f5c
    d5cab93
    e17aa0d
    0b023a6
  7. added theissue type on Mar 31, 2025
  8. added this to the 2.11.0 milestone on Mar 31, 2025
  9. added a commit that references this issue on Mar 31, 2025
    3a60776
  10. moved this from To do to Done in STM32 core based on ST HALon Mar 11, 2026
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

    enhancement

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions