Skip to content

Support U[S]ART Inversion on STM32U0 #2669

Description

@ndoo

STM32U0 (and possibly other parts) support level inversion with the following:

huartx.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_TXINVERT_INIT;
huartx.AdvancedInit.TxPinLevelInvert = UART_ADVFEATURE_TXINV_ENABLE;

Please support these through the Arduino core.

Alternative workarounds include inverting the content before sending, or using an inverting buffer, but supporting this natively would be preferable.

Additional context

This is to support SDI-12 using the single-pin mode of the USART.

Activity

  1. added
    enhancement
    on Mar 4, 2025
  2. added
    duplicate
    on Mar 4, 2025
  3. fpistm commented on Mar 4, 2025

    @fpistm
    Member

    Hi @ndoo
    this issue is a duplicate of #1160 and already reference in #1418.
    Feel free to contribute, for example UART Tx Rx pin swap function was added by a contributor in #2601.

  4. ndoo commented on Mar 5, 2025

    @ndoo
    ContributorAuthor

    Hi @fpistm, thanks for capturing it on the list.

    For now my plan is to add the inversion in hardware as I'm also adding a level shifter to 5V, but if I find some time I will take a look at #2601.

  5. added this to the 2.11.0 milestone on Mar 31, 2025
  6. added theissue type on Mar 31, 2025
  7. 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

    duplicateenhancement

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions