9.4.6.9.3 GCLK Frequency Change Procedure
The GCLK frequency change procedure is as follows.
- Wait for QSPI_SR.RBUSY=0 and QSPI_SR.HIDLE=1.
- Send a QSPI_CR.LASTXFER command.
- Wait for QSPI_ISR.CSRA=1.
- Set QSPI_CR.QSPIDIS and wait for QSPI_SR.QSPIENS=0.
- Disable the GCLK clock.
- Wait for QSPI_SR.CALBSY=0.
- Change GCLK frequency.
- Write:
- QSPI_CR.STPCAL
- Wait for:
- QSPI_SR.CALBSY=0
- Write QSPI_CR.QSPIEN.
- Wait for QSPI_SR.QSPIENS=1.
- If automatic refresh is enabled, wait for QSPI_ISR.RFRSHD=1 by polling or interrupt (see Automatic Refresh).