computski / ESP_DCC_Controller

DCC controller based on nodeMCU ESP12-E device
GNU General Public License v3.0
6 stars 2 forks source link

ICACHE_RAM_ATTR compiler directive required in JogWheel.cpp #1

Closed enfieldcat closed 2 years ago

enfieldcat commented 2 years ago

When compiling on newer compilers ISRs are checked if they are in RAM or flash memory, they should be in Flash. Otherwise on boot the following appears: Boot DCC ESP I2C scanning... No I2C devices found

Setting soft-AP DCC_ESP pwd=

192.168.6.1 mode 2 HTTP server started. WebSocket start port 12080 ISR not in IRAM!

To fix include the following ICACHE_RAM_ATTR directive in line 90 of JogWheel.cpp: void ICACHE_RAM_ATTR nsJogWheel::jogHandler() {

computski commented 2 years ago

Thanks for this. I will update in the code. Further explanation at link below. Basically put all ISRs in RAM. https://stackoverflow.com/questions/58113937/esp8266-arduino-why-is-it-necessary-to-add-the-icache-ram-attr-macro-to-isrs-an