Crash in timer interrupt
Posted: Mon Jun 26, 2017 2:33 pm
If I uncomment "bigBuf", all parts of the code works as intended. When i comment "bigBuf" I get "Guru Meditation Error of type IllegalInstruction occurred on core 1" and I have no idea why. Any help would be appreciated.
Code: Select all
unsigned long bigBuf[numSamplesToTake];
void IRAM_ATTR onTimer(){
if (isSampling){
adcBuffer[bufferIndex] = numSamples;
//bigBuf[numSamples] = (micros());
bufferIndex++;
if (haveWritten && bufferIndex >= writeSize){
toWrite = bufferIndex;
bufferIndex = 0;
uint16_t* t = adcBuffer;
adcBuffer = sdBuffer;
sdBuffer = t;
haveWritten = false;
shouldWrite = true;
}
numSamples++;
if (numSamples >= numSamplesToTake){
isSampling = false;
haveWritten = false;
shouldWrite = true;
}
}
}