New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
usage of Uart1 and Uart2 #437
Comments
I think that you need to change the pins to the ones muxed to UART2. I'm not clear if these are physical pin numbers or GPIO numbers. UART2 is mapped to GPIO 16 and 17 which are chip pins 25 and 27 respectively. |
Quite strange, For me it works fine: HardwareSerial SerialGPS(2); |
@claudeheintz update: OK, I see it here |
@copercini
I am guessing that individual characters are incorrect due to the fact the calculated and provided checksums are differing. Regards |
@eroom1966 Using Serial2 or Serial1 with pins 33 and 32 the ESP32 send about 50 AT commands and SIM808 receive and respond it without any problems. Did you tried with .begin in SerialGPS.begin(9600,SERIAL_8N1,33,32); ? |
@claudeheintz |
my posting was a typo, this is in fact what I have |
In the technical reference manual it refers to the ability to connect pins in two ways. I'm not sure I completely understand. But, there is through the GPIO mux and through the I/O mux. With the latter, only specific signals can be assigned to a pin. The technical reference manual (https://espressif.com/en/support/download/documents?keys=&field_type_tid%5B%5D=13) indicates that using the I/O mux has better performance for high frequency signals (whatever that means). I'm suggesting that if there is a corruption issue, even at 9600 baud, that using the pins specifically designated for U2TX and U2RX (rather than using the GPIO mux to assign any random pins) may make a difference. |
This is definitely worth investigating, thanks for the pointer |
@eroom1966 Did using the Pins designated for UART2 Solve the issue you were facing? Regards |
@llewellynnu |
@eroom1966 Thanks a lot. |
Here is a useful article about re-assigning the pins for the serial ports on ESP32 boards: |
I use the UART 2 on pin 16 and 17 and it is working well. The UART2 will be miss fonctioning. Best regards Thierry Vorms |
Whats about Expressif response?
Whats about serius irremote library using rmt register?
Best regards
Thierry Vorms
Thierry Vorms Saint-Cyrille-de-Lessard G0R 2W0
Le 27 févr. 2018 7:35 PM, "tgmaxx" <notifications@github.com> a écrit :
… UART 1 and 2 not working. Seems to me the ESP32 is a POS.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#437 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AD0B8X8bs386Qloq5wHE8Q74nPD2xNLdks5tZK1lgaJpZM4N246R>
.
|
Hi
I have been struggling to get the 2 UART interfaces working reliably, and have now seen a strange issue which seems to be related to my core issue
I have an external GPS receiver running at 9600 baud configured as follows
HardwareSerial SerGPS(1);
...
SerGPS(9600, SERIAL_8N1, 33, 32);
All works well, I stream the data from the GPS device and no issues, I can read and parse the messages
If I reconfigure to use UART2 (everything else remains the same), thus
HardwareSerial SerGPS(2);
...
SerGPS(9600, SERIAL_8N1, 33, 32);
Now using UART2 it becomes very unstable - the checksums on the messages fail and does not work reliably, this is very confusing from a S/W perspective, nothing has changed, only the internal configuration of the IO to UART mapping.
I will try to reduce to a simple testcase and share on this forum, but I am wondering has anybody else experienced a similar issue when trying to use UART2
Kind Regards
E
The text was updated successfully, but these errors were encountered: