Hello,
I'm working on a project using the Freenove ESP32 WROVER board, aiming to integrate both:
- A Waveshare 4.2-inch e-Paper display (400x300, Rev 2.2)
- The onboard OV2640 camera module
I'm utilizing the Arduino IDE with the following configurations:
- e-Paper display library: GxEPD2
- e-Paper interface:
- Initially tried VSPI (default SPI: MOSI 23, MISO 19, SCK 18, CS 5, DC 14, RST 12, BUSY 4)
- Also attempted HSPI (MOSI 13, MISO 12, SCK 14, CS 15, DC 2, RST 4, BUSY 5)
- Camera library: ESP32 Camera library (Arduino examples)
What I've confirmed so far:
- The e-Paper display functions correctly when operated alone over VSPI using the GxEPD2 library.
- The camera operates correctly when run alone using the ESP32 Camera example.
- The BS jumper on the e-Paper is set to 0 (4-wire SPI mode).
- The
setup()
andloop()
functions are properly defined in my sketches. - I'm using Arduino IDE 2.3.5 and have selected the ESP32 WROVER Module board.
Problem:
When combining the e-Paper and camera code into a single sketch, I encounter GPIO errors or conflicts at runtime:
- The camera initialization fails.
- The e-Paper display becomes unresponsive.
- Error messages such as:
"
gpio_install_isr_service(502): GPIO isr service already installed
camera probe failed with error 0x105 (ESP_ERR_NOT_FOUND)
"
These issues suggest that the e-Paper and camera are attempting to use overlapping GPIO pins, leading to conflicts.
Details of pin mapping:
- e-Paper (VSPI):
- MOSI → GPIO23
- MISO → GPIO19
- SCK → GPIO18
- CS → GPIO5
- DC → GPIO14
- RST → GPIO12
- BUSY → GPIO4
- e-Paper (HSPI):
- MOSI → GPIO13
- MISO → GPIO12
- SCK → GPIO14
- CS → GPIO15
- DC → GPIO2
- RST → GPIO4
- BUSY → GPIO5
- Camera (ESP32 WROVER module defaults):
- XCLK → GPIO21
- SIOD → GPIO26
- SIOC → GPIO27
- Y9 → GPIO35
- Y8 → GPIO34
- Y7 → GPIO39
- Y6 → GPIO36
- Y5 → GPIO19
- Y4 → GPIO18
- Y3 → GPIO5
- Y2 → GPIO4
- VSYNC → GPIO25
- HREF → GPIO23
- PCLK → GPIO22
As evident, several GPIOs are shared between the e-Paper and camera modules, leading to the observed conflicts.
What I need help with:
- Has anyone successfully run both the camera and an SPI-based display on the ESP32 WROVER?
- Which GPIO pins can I safely remap for the e-Paper display to avoid conflicts with the camera module?
- Would switching the e-Paper to use software SPI or another SPI bus mitigate these conflicts?
- Are there recommended libraries or board configurations for combining SPI devices and a camera on the ESP32 WROVER?
Thank you for your assistance! Any guidance on pin mappings, wiring diagrams, or example sketches would be greatly appreciated.