user73698: Using the .init function for the ST7789 TFT screen prevents my WDT ISR from firing. What explains this behaviour, and is there something I can do? Any other timer ISR I could use instead?
#include <Adafruit_ST7789.h>    // Includes Adafruit_GFX.h

#define TFT_CS 10 // define chip select pin
#define TFT_DC 9  // define data/command pin
#define TFT_RST 8 // define reset pin, or set to -1 and connect to Arduino RESET pin

Adafruit_ST7789 tft = Adafruit_ST7789(TFT_CS, TFT_DC, TFT_RST);

void setup()
{
    //Serial.begin(9600);
    pinMode(13, OUTPUT);

    WDTCSR = (24); // Change enable and WDE - also resets
    //prescalers only - get rid of the WDE and WDCE bit.
    WDTCSR = (6); // 1 sec
    WDTCSR |= (1 << 6); //enable interrupt mode - WDT as an interrupt is useful to wake up from sleep
    sei();

    tft.init(240, 240, SPI_MODE2); // comment this out and WDT works fine
    tft.setRotation(0);
    tft.setTextWrap(true);
}


void loop()
{
    
}


ISR(WDT_vect)
{
  digitalWrite(13, (digitalRead(13) ^ 1));   // toggle LED pin    
}

Thanks!

user37622: You can't use the LED on pin 13 on Uno, Nano or Nano Every, if you use SPI . It is the clock pin of the SPI.
The init function of the display initializes SPI which dedicates the pin to SPI peripheral and disconnects it from pin IO peripheral.

73698: <p>Using the <code>.init</code> function for the ST7789 TFT screen prevents my WDT ISR from firing. What explains this behaviour, and is there something I can do? Any other timer ISR I could use instead?</p>
<pre><code>#include &lt;Adafruit_ST7789.h&gt;    // Includes Adafruit_GFX.h

#define TFT_CS 10 // define chip select pin
#define TFT_DC 9  // define data/command pin
#define TFT_RST 8 // define reset pin, or set to -1 and connect to Arduino RESET pin

Adafruit_ST7789 tft = Adafruit_ST7789(TFT_CS, TFT_DC, TFT_RST);

void setup()
{
    //Serial.begin(9600);
    pinMode(13, OUTPUT);

    WDTCSR = (24); // Change enable and WDE - also resets
    //prescalers only - get rid of the WDE and WDCE bit.
    WDTCSR = (6); // 1 sec
    WDTCSR |= (1 &lt;&lt; 6); //enable interrupt mode - WDT as an interrupt is useful to wake up from sleep
    sei();

    tft.init(240, 240, SPI_MODE2); // comment this out and WDT works fine
    tft.setRotation(0);
    tft.setTextWrap(true);
}


void loop()
{
    
}


ISR(WDT_vect)
{
  digitalWrite(13, (digitalRead(13) ^ 1));   // toggle LED pin    
}
</code></pre>
<p>Thanks!</p>
 37622: <p>You can't use the LED on pin 13 on Uno, Nano or Nano Every, if you use SPI . It is the clock pin of the SPI.</p>
<p>The init function of the display initializes SPI which dedicates the pin to SPI peripheral and disconnects it from pin IO peripheral.</p>
