espressif / arduino-esp32

Arduino core for the ESP32
GNU Lesser General Public License v2.1
13.64k stars 7.41k forks source link

RMT colliding with UART? #2642

Closed Miq1 closed 5 years ago

Miq1 commented 5 years ago

Hardware:

Board: ESP32 DevkitC V2 Core Installation/update date: Mar 2019 IDE name: PlatformIO Arduino Flash Frequency:
PSRAM enabled:
Upload Speed:
Computer OS: Windows 10

Description:

I have a 433MHz receiver running with the ESP32 (DevkitC V2), that is read out by means of the RMT. The data received are processed and presented on a web page via WiFi.

All runs fine as long as I do not connect neither USB nor a Nextion HMI display (that is connected to UART2). If the USB is connected, reception gets very bad, when the display is connected, it is completely lost. The RMT reports no errors whatsoever, it looks like there simply is no more detectable phase change on the receiver's GPIO (GPIO27, if that matters).

What I did so far:

Sorted out power supply causes. The power is stable on both 3.3V and 5V, no spikes, brownouts or other irregularities are to be detected. The supply is more than strong enough to drive the system.
Sorted out 433MHz noise. I put a SDR antenna close to that of the receiver and listened on 433MHz with display connected or not - no difference at all. There is no noise in that band induced by the display.
I tested several shielded USB cables with ferrite coils - no noticeable difference,

So I am back to the ESP itself as a possible cause. I am wondering if the coincidence of UART being used when the reception fails does perhaps matter, and if so, if there is a known reason for this?

Miq1 commented 5 years ago

Sorry for bothering you - I found the reason lies in the RX line amplifying additional noise from the USB and display wires.