Skip to content

Support U[S]ART Inversion on STM32U0 #2669

@ndoo

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

added
duplicateThis issue or pull request already exists
on Mar 4, 2025
fpistm

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.

ndoo

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.

added this to the 2.11.0 milestone on Mar 31, 2025

4 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

    duplicateThis issue or pull request already existsenhancementNew feature or request

    Projects

    Status

    To do

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Support U[S]ART Inversion on STM32U0 · Issue #2669 · stm32duino/Arduino_Core_STM32