duff2013 / ulptool

Program the esp32 ULP coprocessor in Arduino
272 stars 66 forks source link

ESP_ERROR_CHECK failed: esp_err_t 0x104 #43

Closed vangalvin closed 4 years ago

vangalvin commented 4 years ago

I now seem to be having a few issues with this error. 15:25:42.804 -> Rebooting... 15:25:42.804 -> ets Jun 8 2016 00:22:57 15:25:42.804 -> 15:25:42.804 -> rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) 15:25:42.804 -> configsip: 188777542, SPIWP:0xee 15:25:42.804 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 15:25:42.804 -> mode:DIO, clock div:2 15:25:42.804 -> load:0x3fff0018,len:4 15:25:42.804 -> load:0x3fff001c,len:1100 15:25:42.804 -> load:0x40078000,len:9232 15:25:42.804 -> load:0x40080400,len:6412 15:25:42.839 -> entry 0x400806a8 15:25:42.942 -> Not ULP wakeup, initializing ULP 15:25:42.942 -> ESP_ERROR_CHECK failed: esp_err_t 0x104 (ESP_ERR_INVALID_SIZE) at 0x4008972c 15:25:42.942 -> file: "E:\Arduino\ULP-TempSenseorTest\ULP-TempSenseorTest.ino" line 25 15:25:42.976 -> func: void init_ulp_program() 15:25:42.976 -> expression: err 15:25:42.976 -> 15:25:42.976 -> Backtrace: 0x4008924c:0x3ffb1f40 0x4008972f:0x3ffb1f60 0x400d0d0e:0x3ffb1f80 0x400d19cb:0x3ffb1fb0 0x40087d99:0x3ffb1fd0 15:25:42.976 ->

I am trying to implament and compile a similar system as published by https://github.com/fhng/ESP32-ULP-1-Wire

In my case I have a bunch of DS18B20 sensors and need to log the temperatures then once every half an hour (or there abouts) send the data via either WiFi or LoRa. and when i say a bunch.. (thats up to 60 of them).

Using the normal core this works OK however the units are destined to be in a prety remote location and the only power option is battery. Hence the use of the low power mode to collect the sensor data and I was thinking that if I keep an eye on the memory usage when it gets anywhere near full the system kickes out of sleep or ULP mode and saves the data to the flash drive.

Initially when i compiled the sketch I got a ram overflow but read something about setting the memory size in "esp32.ulp.ld" and that seemed to fix that problem.

Any sugestions as to the best way to deal with the next error?

duff2013 commented 4 years ago

Did you increase #define CONFIG_ULP_COPROC_RESERVE_MEM in sdkconfig.h?