Fixed. Thank you all - @Mcu32 for recognising it immediately and pointing at the old thread, @jmarsh for the FlexSPI timeout explanation, and @PaulStoffregen for the hardware details that ruled out several of my wrong guesses.
The cause was...
Thank you — and let me start by correcting my own post, because two of the things I reported as ruled out were measured wrong.
"Audio library and MQS output — not initialised" was false. My switch only skipped my own init function. The Audio...
Thanks for advice - these are good points, especially about the shared PIT interrupt. I'll add a GPIO toggle in the main loop so I can watch it on a scope. Also I'll sample NVIC_IABR and IPSR from a GPT2 interrupt at priority 0, so if something...
On a Teensy 4.1 with 16 MB PSRAM, my program freezes for exactly 2^30 CPU cycles (1.789 s at 600 MHz), at intervals that are multiples of 2^32 CPU cycles (7.16 s at 600 MHz). During the stall the main loop and my IntervalTimer stop, but systick...