This article has been contributed by Andrew Berry.
The ARMv7M architecture allows the core to make speculative accesses to just about any address, including addresses that are not valid.
A normal access to an address in the QUADSPI range, but above the configured size of the external memory (set by QUADSPI->DCR.FSIZE) will cause an easy-to-detect busfault. But the core ignores faults caused by speculative accesses, so a speculative access to the same address apparently leaves the QUADSPI interface in an unresolved fault state. A later normal access then causes the MCU to lock up, as in the timeout counter case -- no more execution at any priority, including the watchdog EWI, no more external debug access (!), nothing to do but wait for the watchdog reset.
AFAIK, there is no public documentation on when or why the core performs speculative accesses, so this one is also hard to isolate if you don't know what to look for. I eventually identified it by checking the QUADSPI address register before reading from the external memory. If it contains a value above the size of the flash, resetting the QUADSPI interface seems to restore normal operation.
The real solution is to configure the entire QUADSPI address range as Not Accessible + Execute Never in the MPU -- since the core may perform speculative instruction fetches or data reads, both attributes are necessary to prevent any speculative access. Then override that with a smaller region that grants appropriate access rights to ONLY the valid range of the external memory.
Setting FSIZE to the entire available range may also prevent the problem, since the QUADSPI interface seems to not check for a valid response from the external memory in memory mapped mode, but I have not tested this specifically.
While this issue has been obeserved on 'F767/'F777, presumably it affects all other 'F7/'H7 parts that share the same QUADSPI IP.