-
Notifications
You must be signed in to change notification settings - Fork 7.6k
HardwareSerial setMode fails #8934
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
Comments
Set verbose debug level in the tools menu, upload again, and see if you get a better error from that. |
@econeale - Try it again by using just void setup() {
Serial.begin(9600);
delay(2000);
RS485.begin(9600, SERIAL_8N1, RS485_RX_PIN, RS485_TX_PIN);
if(!RS485.setPins(-1, -1, -1, RS485_RTS_PIN)){
Serial.print("Failed to set RS485 pins");
}
// if(!RS485.setHwFlowCtrlMode(HW_FLOWCTRL_RTS)) {
// Serial.print("Failed to set flow control");
// }
if(!RS485.setMode(MODE_RS485_HALF_DUPLEX)) {
Serial.print("Failed to set RS485 mode");
}
} You can also check the information in the ESP-IDF example at |
Nothing gets reported when I increase the Core Debug level to Verbose; I would have expected something which is kind of suspicious. But, running without setting |
Greate, thanks! |
Uh oh!
There was an error while loading. Please reload this page.
Board
Adafruit QT Py ESP32-S3
Device Description
Adafruit QT Py ESP32-S3 with 4MB flash and 2MB PSRAM
Hardware Configuration
ESP32-S3 using hardware UART to interface with a MAX33046E UART / RS485 transceiver. Board is configured as described in documentation.
GPIO 16 (UART RX) -> MAX3304 RO
GPIO 5 (UART TX) -> MAX3304 DI
GPIO 37 (UART RTS) -> MAX3304 DE
Version
v2.0.14
IDE Name
Arduino IDE 2
Operating System
Windows 11
Flash frequency
40MHz
PSRAM enabled
yes
Upload speed
921600
Description
When attempting to initialize the HardwareSerial object and set the mode to RS485_HALF_DUPLEX, the
setMode
function returns false. The pin selection looks valid to me which leads me to believe one of the internal pointers is invalid and the underlying HAL implementation is producing an error but I'm not sure how to go about debugging that.Sketch
Debug Message
Other Steps to Reproduce
I thought it might be related to #8755 but I'm not using the
Serial
objects provided by Arduino for the RS485 device. Switching the RS485 object to from UART 1 to UART 2 also had no impact.I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: