SPI disable fails

Hi all,

I am using an SPI peripheral with a custom mega PCB. At one part of the firmware, the SPI device fails to turn off (pin 6 LOW). I've replicated it in this sample code below. Seems that commenting out SPI.attachinterrupt() will allow it to function, but perhaps detaching the interrupt is failing. Any guidance on what is happening?

Thanks!

#include 

void setup() {
}

void loop() {
  pinMode(6,OUTPUT);
  pinMode(SCK, INPUT);
  pinMode(MOSI, INPUT);
  pinMode(MISO, OUTPUT);
  pinMode(SS, INPUT);
  SPCR = (1 << SPE);          // Enable SPI as slave.
  SPI.attachInterrupt();      // now turn on interrupts
  digitalWrite(6,HIGH);
  delay(2000);

  SPI.detachInterrupt();
  digitalWrite(6,LOW);
  delay(2000);
}