UART0 stops working after defining UART2 #11946
Unanswered
michaelboatboy
asked this question in
ESP32
Replies: 2 comments 2 replies
-
Pins 16 and 17 might be used for the ESP32 flash. Try other pins for UART 2. |
Beta Was this translation helpful? Give feedback.
1 reply
-
You have to look into the schematics of the respective board. But pins 16 and 17 are often used for the memory, and there have been quite a few posts about it. Pins 16 and 17 have initially be used as default pin for UART1. But that caused many hiccups like yours, and so it was changed. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I wrote a program to use UART to talk to a motor driver IC and I have been having trouble using print() function after defining the UART2 connection to the IC. I also tried defining UART0 and writing to it instead of using the print() function. Am I doing anything stupid? Here is the code:
from machine import UART
uart1 = UART(0)
uart1.write(b'part1')
uart2 = UART(2, baudrate=115200, tx=16, rx=17)
uart2.write(b'nothing')
uart1.write(b'part2')
All I receive from UART0 is 'part1'. Part2 is never received.
Thank you in advanced!
my micropython version is: esp32-20220618-v1.19.1.bin
Beta Was this translation helpful? Give feedback.
All reactions