Unexpected UART interrupt in STM32G0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-10-03 9:02 PM
Hi All,
I'm facing a strange issue on UART,
I generate the code by CubeMx for UART functionality, UART is working fine but when ever i remove the TTL (Serial to USB) and keep Rx pin float, UART interrupt occurred continuously and main application stopped.
I want to know why interrupt occurred on floating UART pins
Solved! Go to Solution.
- Labels:
-
STM32Cube MCU Packages
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-10-03 9:06 PM
Floating pins lead to ambiguous/invalid signals. UART should have a pullup to avoid unknown/invalid states. You can use the internal pullup for this.
Check the relevant flags in the interrupt to see which one it detects, if you want.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-10-03 9:06 PM
Floating pins lead to ambiguous/invalid signals. UART should have a pullup to avoid unknown/invalid states. You can use the internal pullup for this.
Check the relevant flags in the interrupt to see which one it detects, if you want.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-10-03 9:18 PM
My device is battery operated, is it good solution to introduce pull up on UART Rx pin ?
It happening in this microcontroller(STM32G0) only its not happening in other microcontroller(STM32F4, STM32L0)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-10-04 7:16 AM
If your concern is using more power, a pullup on a pin that is otherwise floating uses negligible current.
