Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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

Closed
pawelsky opened this issue Aug 31, 2020 · 1 comment · Fixed by #2701
Closed

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

pawelsky opened this issue Aug 31, 2020 · 1 comment · Fixed by #2701
Labels
enhancement New feature or request
Milestone

Comments

@pawelsky
Copy link

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;
@stm32duino stm32duino deleted a comment from babipsylon May 4, 2021
@fpistm fpistm mentioned this issue Jun 11, 2021
4 tasks
@fpistm
Copy link
Member

fpistm commented Jun 11, 2021

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

@fpistm fpistm closed this as completed Jun 11, 2021
@fpistm fpistm added enhancement New feature or request and removed Request labels Jul 16, 2024
@fpistm fpistm added this to the 2.10.0 milestone Jan 22, 2025
@fpistm fpistm linked a pull request Jan 22, 2025 that will close this issue
@fpistm fpistm removed this from the 2.10.0 milestone Jan 22, 2025
ndoo added a commit to ndoo/Arduino_Core_STM32 that referenced this issue Mar 27, 2025
This enables UART Tx and Rx invert function on STM32 families that support it.

In order to enable Tx and Rx invert, call respectively:

```c++
Serial1.setTxInvert();
Serial1.setRxInvert();
```

Fixes: stm32duino#1160 stm32duino#2669
See also: stm32duino#1418

Signed-off-by: Andrew Yong <me@ndoo.sg>
ndoo added a commit to ndoo/Arduino_Core_STM32 that referenced this issue Mar 27, 2025
This enables UART Tx and Rx invert function on STM32 families that support it.

In order to enable Tx and Rx invert, call respectively:

```c++
Serial1.setTxInvert();
Serial1.setRxInvert();
```

Fixes: stm32duino#1160 stm32duino#2669
See also: stm32duino#1418

Signed-off-by: Andrew Yong <me@ndoo.sg>
ndoo added a commit to ndoo/Arduino_Core_STM32 that referenced this issue Mar 28, 2025
This enables UART Tx and Rx invert function on STM32 families that support it.

In order to enable Tx and Rx invert, call respectively:

```c++
Serial1.setTxInvert();
Serial1.setRxInvert();
```

Fixes: stm32duino#1160 stm32duino#2669
See also: stm32duino#1418

Signed-off-by: Andrew Yong <me@ndoo.sg>
ndoo added a commit to ndoo/Arduino_Core_STM32 that referenced this issue Mar 28, 2025
This enables UART Tx, Rx and data invert function on STM32 families that support it.

In order to enable Tx, Rx and/or data invert, call respectively:

```c++
Serial1.setTxInvert();
Serial1.setRxInvert();
Serial1.setDataInvert();
```

Fixes: stm32duino#1160 stm32duino#2669
See also: stm32duino#1418

Signed-off-by: Andrew Yong <me@ndoo.sg>
ndoo added a commit to ndoo/Arduino_Core_STM32 that referenced this issue Mar 28, 2025
This enables UART Tx, Rx and data invert function on STM32 families that support it.

In order to enable Tx, Rx and/or data invert, call respectively:

```c++
Serial1.setTxInvert();
Serial1.setRxInvert();
Serial1.setDataInvert();
```

Fixes: stm32duino#1160 stm32duino#2669
See also: stm32duino#1418

Signed-off-by: Andrew Yong <me@ndoo.sg>
ndoo added a commit to ndoo/Arduino_Core_STM32 that referenced this issue Mar 29, 2025
This enables UART Tx, Rx and data invert function on STM32 families that support it.

In order to enable Tx, Rx and/or data invert, call respectively:

```c++
Serial1.setTxInvert();
Serial1.setRxInvert();
Serial1.setDataInvert();
```

Fixes: stm32duino#1160 stm32duino#2669
See also: stm32duino#1418

Signed-off-by: Andrew Yong <me@ndoo.sg>
@fpistm fpistm added this to the 2.11.0 milestone Mar 31, 2025
fpistm pushed a commit that referenced this issue Mar 31, 2025
This enables UART Tx, Rx and data invert function on STM32 families that support it.

In order to enable Tx, Rx and/or data invert, call respectively:

```c++
Serial1.setTxInvert();
Serial1.setRxInvert();
Serial1.setDataInvert();
```

Fixes: #1160 #2669
See also: #1418

Signed-off-by: Andrew Yong <me@ndoo.sg>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
Development

Successfully merging a pull request may close this issue.

2 participants