chmorgan / esphttpd-freertos

freertos example of libesphttpd for esp32 and esp8266
54 stars 13 forks source link

Increment stack size to fix "Configure your wifi" page for ESP32; #5

Closed m0hai closed 6 years ago

m0hai commented 6 years ago

When you click on "Configure your wifi network" link on webinterface and then you switch to STA+AP mode a new scan is initiated. When finished wifiScanDoneCb() is called from wifi_event_handler which uses the event loop task stack. wifiScanDoneCb instantiate wifi_ap_record_t ap_records[NUM_APS] which is 80byte x 16 = 1280bytes Using uxTaskGetStackHighWaterMark at the beginning of wifi_event_handler you can see that normally before executing wifiScanDoneCb() it requires more or less 1200 bytes of stack, but after the first execution of wifiScanDoneCb() it requires like 2500 bytes of stack, but by default the stack size of the event loop task is 2304. With 4096 it works. (Tested with 6 networks)

chmorgan commented 6 years ago

@m0hai is there any reason why the sdkconfig and sdkconfig.old are included in your last commit? Increasing the stack is an easy merge but why not let sdkconfig.default handle the defaults and let the build system populate the values?

m0hai commented 6 years ago

Was a mistake, please consider only my first commit

m0hai commented 6 years ago

Deleted wrong commit, you can now can merge directly

chmorgan commented 6 years ago

@m0hai, thanks for the pull request!