Inkplate 5 crashes parsing Google Calendar iCal data

Customer:

I’m working through the Google Calendar example. I updated the ssid, pass, and calendarURL variables and uploaded the code successfully. However, the device doesn’t do anything. The serial monitor shows an error: first it fails to connect to WiFi, then after ESP.restart() it connects, but getting the data causes a crash.

The error output:

Rebooting…
ets Jul 29 2019 12:21:46
rst:0xc (SW_CPU_RESET),boot:0x12 (SPI_FAST_FLASH_BOOT)
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:0x3fff0030,len:1344
load: ,len:13864
load: ,len:3608
entry 0x400805f0
Waiting for WiFi to connect………….Can't connect to WIFI, restarting
ets Jul 29 2019 12:21:46
rst:0xc (SW_CPU_RESET),boot:0x12 (SPI_FAST_FLASH_BOOT)
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:0x3fff0030,len:1344
load: ,len:13864
load: ,len:3608
entry 0x400805f0
Waiting for WiFi to connect…. connected
Waiting for NTP time sync:
Current time: Tue Jan 2 16:26:03 2024
Getting data…
Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.
Core 1 register dump:
PC : 0x40166bbe PS : 0x00060f30 A0 : 0x8016a076 A1 : 0x3ffb26b0
A2 : A3 : 0xab11cfd8 A4 : 0x3ffb260c A5 :
A6 : 0x00ff0000 A7 : 0xff000000 A8 : 0x8008a3a8 A9 : 0x3ffb2390
A10 : A11 : 0x3ffc1bba A12 : 0x000000a0 A13 : 0x3ffc1bf2
A14 : A15 : SAR : EXCCAUSE: 0x0000001c
EXCVADDR: 0xab11d15c LBEG : 0x4008bf19 LEND : 0x4008bf2d LCOUNT : 0xfffffff9
Backtrace:0x40166bbb:0x3ffb26b00x4016a073:0x3ffb26d0 0x4016a15d:0x3ffb26f0 0x400d3285:0x3ffb2770 0x400d348b:0x3ffb27f0 0x400ddce6:0x3ffb2820
ELF file SHA256:

Originally submitted via email support on 2 January 2024. Migrated to the forum for community visibility.

Soldered Support:

The cause is SW_CPU_RESET. How are you powering Inkplate? Via USB or with a battery, or both? Try a different USB power source and a different (more heavy-duty) USB cable—this can sometimes fix issues like this.

Can you send a screenshot of your Tools menu so I can verify the configuration?

Do the basic examples that don’t require WiFi work? For example, Game Of Life or Grayscale examples work regardless of internet connection without any modifications needed.

Customer:

I’m powering the Inkplate with both the power switch (battery) on and a USB cable connected to the computer. Without the power switch on, I couldn’t flash the code to the ESP. I tried a different cable, but the code downloads to the ESP fine. Yes, examples without WiFi requirements work perfectly—Game Of Life and Grayscale examples both work.

Attachment omitted in migration: arduino_inkplate5_config.jpg

Soldered Support:

The power switch needs to be ON (the blue light indicator should be on) for the ESP to be powered. Since you can program the ESP, it’s not a power issue.

The Tools menu looks fine.

Do you have a lot of events in your Google Calendar? That could be the cause. Try a blank calendar with just two events for testing—you can easily create a new test calendar in Google Calendar. This Inkplate example is very complex and uses a lot of memory when parsing the iCal data received from Google. The example uses xcal data which is memory-intensive. We might rewrite this in the future to use the API instead.

Try with a minimal test calendar and also try other WiFi examples that don’t involve Google Calendar.

Customer:

With a clean calendar containing 0 events it works fine. However, adding just 1 event causes the same error. I tested a cryptocurrency tracker example and that works flawlessly, so the WiFi module is working correctly. The problem is specifically when parsing iCal data.

Soldered Support:

It’s definitely a problem with parsing the Google Calendar data. Are you using special characters in your event names or descriptions? That could be the reason.