PervasiveDisplays / EPD_Driver_GU_small

Hardware driver for small-sized screens, with built-in images for test
17 stars 5 forks source link

GPIO output gpio_num error when running the demo on ESP32DevkitC #4

Closed TDuxis closed 4 months ago

TDuxis commented 4 months ago

Hi

When I run this code on an ESP32DevkitC with a SE2154JS0C1 1.54" display, I get the error as below.

I have updated the code accordingly, see further down.

17:06:19.420 -> ets Jul 29 2019 12:21:46 17:06:19.420 -> 17:06:19.420 -> rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) 17:06:19.420 -> configsip: 0, SPIWP:0xee 17:06:19.420 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 17:06:19.420 -> mode:DIO, clock div:1 17:06:19.420 -> load:0x3fff0030,len:1344 17:06:19.420 -> load:0x40078000,len:13964 17:06:19.420 -> load:0x40080400,len:3600 17:06:19.420 -> entry 0x400805f0 17:06:19.558 -> [ 28][D][esp32-hal-cpu.c:244] setCpuFrequencyMhz(): PLL: 480 / 2 = 240 Mhz, APB: 80000000 Hz 17:06:19.604 -> E (43) gpio: gpio_set_level(227): GPIO output gpio_num error 17:06:19.604 -> E (43) gpio: gpio_set_level(227): GPIO output gpio_num error

// DEMO Image Set <Comment out when in User Mode>
// Screen Size: 154, 213, 266, 271, 287, 370, 420, 437
#define SCREEN 154
#include "globalupdate_src/demoImageData.h"
// User Mode Image Set
//#include "globalupdate_src/userImageData.h"
//------------------------------------------------------------

void setup()
{
  EPD_Driver epdtest(eScreen_EPD_154, boardESP32DevKitC_EXT3 );

  No other changes made to the code other than the screen size and EPS32 Devkit C.

  What could be the reason for this, and how to fix it?

  Thanks!
rei-vilo commented 4 months ago

The ESP32 SPI implementation on the Arduino SDK isn't very clean. Default configuration raises error.

Please refer to this thread Omit pin config in SPI.begin() for ESP boards #14.