Hi,
I use an ESP32 to interface with a master-slave RS485 bus.
Upto now I had implemented a master device (using ESP32 WROVER) and everything works fine. My proprietary low level ISR driver for the UART controls the RTS signal (connected to the DE input of an ADM3072) so we can avoid interference on the bus.
I don't use the standard UART driver because the used protocol delimits packets by means of time-spaces, it also requires specific bus idle times before being allowed to send.
Now I implemented a slave device (using ESP32C3) and it works as per protocol specification, BUT I noticed that the master device starts reporting framing errors on the bus WHEN I restart my slave using esp_restart() function.
Ofcourse I tried the other way around, restart the master device and look on the slave device for errors -> no errors reported
The UART driver code is the same for both master and slave, so the difference is ESP32 WROVER vs C3.
In HW I have a pulldown resistor on the output driving the DE line of the ADM3072, just to avoid false enabling of the bus during ESP boot. So the only possibility is that this DE line coupled to the RTS function of the UART is somehow turning high.
esp_restart() causes framing error on RS485 bus
Re: esp_restart() causes framing error on RS485 bus
Ooops posted too soon.
Wanted to add that when restarting the ESP32C3 after flashing using hard reset via RTS, there is no problem. In this case the complete cpu will be reset I guess and my pulldown resistor does it's work
Seems like I need to be able to put the IO pin coupled to the RTS function into 3state or completely reset it to it's default bootup state.
How can I fix this ?
thx, Jo
Wanted to add that when restarting the ESP32C3 after flashing using hard reset via RTS, there is no problem. In this case the complete cpu will be reset I guess and my pulldown resistor does it's work
Seems like I need to be able to put the IO pin coupled to the RTS function into 3state or completely reset it to it's default bootup state.
How can I fix this ?
thx, Jo
Who is online
Users browsing this forum: trendictionbot and 2 guests