espressif / esp-dev-kits

Docs, Schematics, Factory Firmwares for ESP Development Kits
Other
345 stars 183 forks source link

Kaluga Example Code esp_color_display(void) crashes #42

Closed BMaj7 closed 2 years ago

BMaj7 commented 2 years ago

void esp_color_display(void)

does not work for Kaluga V1.3

uint16_t *data_buf = (uint16_t *)heap_caps_calloc(IMAGE_WIDTH * IMAGE_HIGHT, sizeof(uint16_t), MALLOC_CAP_SPIRAM); (Line 90 in https://github.com/espressif/esp-dev-kits/blob/master/esp32-s2-kaluga-1/examples/lcd/main/main.c) causes to crash as soon as a value is assigned to data_buf[i + IMAGE_WIDTH * j] = color;

Terminal output: Guru Meditation Error: Core 0 panic'ed (StoreProhibited). Exception was unhandled.

Core 0 register dump: PC : 0x4008545b PS : 0x00060c30 A0 : 0x800855b2 A1 : 0x3ffc1170 A2 : 0x00000000 A3 : 0x00000000 A4 : 0x00000000 A5 : 0x00000000 A6 : 0x00000000 A7 : 0x00000001 A8 : 0x00000000 A9 : 0x3ffc1120 A10 : 0x00000003 A11 : 0x3f003ef8 A12 : 0x3f004c3c A13 : 0x00000335 A14 : 0x3f003ef8 A15 : 0x00000000 SAR : 0x00000004 EXCCAUSE: 0x0000001d EXCVADDR: 0x00000000 LBEG : 0x3f004c3c LEND : 0x00000335 LCOUNT : 0x40023ea1

Backtrace:0x40085458:0x3ffc1170 0x400855af:0x3ffc1190 0x4009270e:0x3ffc11d0 0x40028fd5:0x3ffc11f0

BMaj7 commented 2 years ago

My bad: CONFIG_ESP32S2_SPIRAM_SUPPORT=y needs to be set in sdkconfig. I have changed it but it was overwritten during compilation.