I have the following issue with an application that uses the RMT module for infrared transmission and reception (code adapted from the esp-idf example on sending and receiving the NEC protocol (https://github.com/espressif/esp-idf/tree/ee0ebc1/examples/peripherals/rmt_nec_tx_rx) for use on Arduino.
The application also uses WiFi, and everything works like a charm in this setup.
Now, I've recently started trying to get the EMAC interface working (using a Waveshare LAN8720 PHY, see https://www.waveshare.com/lan8720-eth-board.htm). Basically I've been following the official Arduino example. https://github.com/espressif/arduino-esp32/tree/master/libraries/WiFi/examples/ETH_LAN8720. This part works, I can access the web server running on my ESP32, but now IR reception stops working (IR transmission still works). On the serial console I see the following error popping up once I try to enable IR reception:
Code: Select all
Trying to enable IR...
E (2120) rmt: RMT ERR
E (2120) rmt: status: 0x14000040
The "rmt: status:" part is different each time, but the error is reported every time.
When switching the whole application back to WiFi everything works again. To be clear: "switching to WiFi" means throwing out all the ETH headers and calls, and recompiling. Equivalently, "switching to Ethernet" means throwing out all the WiFi headers and calls, and recompiling.
As the documentation for both the EMAC interface on the Arduino API level is very sparse, I'm currently out of ideas.
The only thing I can think of is that there might be an issue because the RMT is using the APB_CLOCK source and the PHY providing an external 50MHz clock signal?
Do you have any ideas?