U8glib_Arduino
U8glib_Arduino copied to clipboard
ESP32 U8GLIB_SH1106_128X64 Unhandled Exception please help!
Hi, I am working on a school project with an ESP32, I managed to get my OLED:
https://ibb.co/yyRmHMz
To work well using U8GLIB_SH1106_128X64 u8g(13, 12, 5, 9, 11);
on an Arduino Uno, however it will not run on an ESP32, here is the error:
Raw error:
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1044
load:0x40078000,len:8896
load:0x40080400,len:5816
entry 0x400806ac
Guru Meditation Error: Core 0 panic'ed (LoadStoreError). Exception was unhandled.
Core 0 register dump:
PC : 0x400d69a0 PS : 0x00060130 A0 : 0x800d6a85 A1 : 0x3ffe3aa0
A2 : 0x3ffc10c4 A3 : 0x3ffbec84 A4 : 0x40144ad6 A5 : 0x3ff000cc
A6 : 0x000000ff A7 : 0x00000000 A8 : 0x00000000 A9 : 0x3ffe3a80
A10 : 0x00000001 A11 : 0x00000001 A12 : 0x00000002 A13 : 0x00000000
A14 : 0x00000016 A15 : 0x00000000 SAR : 0x0000001d EXCCAUSE: 0x00000003
EXCVADDR: 0x40144ad6 LBEG : 0x400d6d6c LEND : 0x400d6d71 LCOUNT : 0x00000000
Backtrace: 0x400d69a0:0x3ffe3aa0 0x400d6a82:0x3ffe3ac0 0x40143806:0x3ffe3ae0 0x400d6dab:0x3ffe3b00 0x400d6ec1:0x3ffe3b20 0x400d6f05:0x3ffe3b40 0x400d6912:0x3ffe3b70 0x400d3c02:0x3ffe3ba0 0x400dba47:0x3ffe3bd0 0x4008225d:0x3ffe3bf0 0x4008246c:0x3ffe3c20 0x40079053:0x3ffe3c40 0x400790b9:0x3ffe3c70 0x400790c4:0x3ffe3ca0 0x4007928d:0x3ffe3cc0 0x400806de:0x3ffe3df0 0x40007c31:0x3ffe3eb0 0x4000073d:0x3ffe3f20
Decoded:
PC: 0x400d69a0: u8g_GetGlyph at C:\Users\liamd\Documents\Arduino\libraries\U8glib_Arduino-master\src\clib\u8g_font.c line 391
EXCVADDR: 0x40144ad6
Decoding stack results
0x400d69a0: u8g_GetGlyph at C:\Users\liamd\Documents\Arduino\libraries\U8glib_Arduino-master\src\clib\u8g_font.c line 391
0x400d6a82: u8g_draw_glyph at C:\Users\liamd\Documents\Arduino\libraries\U8glib_Arduino-master\src\clib\u8g_font.c line 203
0x400d6dab: u8g_pb8v1_Set8PixelOpt2 at C:\Users\liamd\Documents\Arduino\libraries\U8glib_Arduino-master\src\clib\u8g_pb8v1.c line 127
0x400d6ec1: __analogSetWidth at C:\Users\liamd\AppData\Local\arduino15\packages\esp32\hardware\esp32\1.0.4\cores\esp32\esp32-hal-adc.c line 43
0x400d6f05: __analogSetCycles at C:\Users\liamd\AppData\Local\arduino15\packages\esp32\hardware\esp32\1.0.4\cores\esp32\esp32-hal-adc.c line 51
0x400d6912: u8g_font_GetEncoding97Pos at C:\Users\liamd\Documents\Arduino\libraries\U8glib_Arduino-master\src\clib\u8g_font.c line 160
0x400d3c02: _GLOBAL__sub_I__ZN11WiFiAPClass6softAPEPKcS1_iii() at C:\Users\liamd\AppData\Local\arduino15\packages\esp32\hardware\esp32\1.0.4\cores\esp32/IPAddress.h line 94
0x400dba47: esp_vApplicationIdleHook at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/freertos_hooks.c line 48
0x4008225d: start_cpu0_default at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/cpu_start.c line 367
0x4008246c: call_start_cpu0 at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/cpu_start.c line 238
I adjusted the pin outs in the U8GLIB_SH1106_128X64 u8g(x, x, x, x, x);
code to ensure it works with ESP32 pin out. I also tried uploading code to the ESP32 with nothing except the line just mentioned, and it still generated the error.
Thanks in advanced for your help, I really want to use your library because Adafruit is to difficult for me to understand. I appreciate your help!