I get this error message every time I try to utilize the sensor with Serial or Wifi communication.
Guru Meditation Error: Core 1 panic’ed (StoreProhibited). Exception was unhandled.
I have tried for weeks to understand what is happening but I’ve had to accept I simply don’t understand. The most I can make out is it has something to do with a read or write address and a buffer.
The end goal is to be able to communicate to the microcontroller over wifi, imitate a reading on command , and receive the reading back.
That error (LoadProhibited, StoreProhibited) happens when application attempts to read from or write to an invalid memory location. The address which was written/read is found in EXCVADDR register in the register dump. If this address is zero, it usually means that application attempted to dereference a NULL pointer. If this address is close to zero, it usually means that application attempted to access member of a structure, but the pointer to the structure was NULL. If this address is something else (garbage value, not in 0x3fxxxxxx - 0x6xxxxxxx range), it likely means that the pointer used to access the data was either not initialized or was corrupted. Use https://github.com/me-no-dev/EspExceptionDecoder to get the dump
Thanks TS-Russell, I understand that and have read the resources. However, that is literally where my understanding stops, I have no understanding of how to resolve it.
The sensor sample code works just fine, the serial call response works fine, but in the same sketch it fails.
I’ll post a dump but I’ve followed the rabbit hole and I can’t see what needs to change
PC: 0x4014bce4: TwoWire::beginTransmission(int) at C:\Users\\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\libraries\Wire\src\Wire.cpp line 156
EXCVADDR: 0x00000126
Decoding stack results
0x4014bce4: TwoWire::beginTransmission(int) at C:\Users\\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\libraries\Wire\src\Wire.cpp line 156
0x400d7f8e: AS7265X::readRegister(unsigned char) at C:\Users\\Documents\Arduino\libraries\SparkFun_Spectral_Triad_AS7265X\src\SparkFun_AS7265X.cpp line 539
0x400d8079: AS7265X::virtualWriteRegister(unsigned char, unsigned char) at C:\Users\\Documents\Arduino\libraries\SparkFun_Spectral_Triad_AS7265X\src\SparkFun_AS7265X.cpp line 516
0x400d80cc: AS7265X::selectDevice(unsigned char) at C:\Users\\Documents\Arduino\libraries\SparkFun_Spectral_Triad_AS7265X\src\SparkFun_AS7265X.cpp line 400
0x400d80df: AS7265X::getCalibratedValue(unsigned char, unsigned char) at C:\Users\\Documents\Arduino\libraries\SparkFun_Spectral_Triad_AS7265X\src\SparkFun_AS7265X.cpp line 269
0x400d812d: AS7265X::getCalibratedA() at C:\Users\\Documents\Arduino\libraries\SparkFun_Spectral_Triad_AS7265X\src\SparkFun_AS7265X.cpp line 208
0x400d0b85: loop() at C:\Users\\AppData\Local\Temp\arduino_modified_sketch_674402/sketch_sep06a.ino line 56
0x400da7f5: loopTask(void*) at C:\Users\\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32\main.cpp line 23
0x4008e1fe: vPortTaskWrapper at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port.c line 143
OK, this is also above my head as well…but I’m going to through out a guess that the ESP32 compiler is mad at the TwoWire library? I found this https://github.com/espressif/arduino-esp32/issues/977 where someone had luck separating the calls