Interrupt on pin 17 IOT Red Board & SD card

I was logging data on the sd card until I added a hardware interrupt on pin 17. ISR works, tried adding the sd card back in and now the card can’t be found. This is the bit of code I’ve used for months,

if (!SD.begin(PIN_SPI_CS)) {
while (1) {
Serial.println(F(“SD CARD FAILED, OR NOT PRESENT!”));
delay(1000);
}
}

And this is what the isr set and code is

pinMode(17, INPUT_PULLUP);
attachInterrupt(17, isr, RISING);

void IRAM_ATTR isr() {
data_ready = true;
}

I moved some code lines around and todays there is no problem. Its a moot point anyway, I was just trying to time the gnss module to when i knew it had a new data set; but I still have to poll the i2c to get it.