Alternate-bytes phase
ใน the alternate-bytes phase, 1-4 bytes จะถูกส่งไปยัง the Flash memory, โดยทั่วไปเพื่อควบคุม the mode of operation. จำนวนของ alternate bytes ที่จะถูกส่งถูกกำหนดค่าใน the ABSIZE[1:0] field of QUADSPI_CCR[17:16] register. The bytes ที่จะถูกส่งถูกระบุใน the QUADSPI_ABR register.
The alternate-bytes phase สามารถส่ง 1 bit ในแต่ละครั้ง (บน SO ใน single SPI mode), 2 bits ในแต่ละครั้ง (บน IO0/IO1 ใน dual SPI mode), หรือ 4 bits ในแต่ละครั้ง (บน IO0/IO1/IO2/IO3 ใน quad SPI mode). นี้สามารถถูกกำหนดค่าโดยใช้ the ABMODE[1:0] field of QUADSPI_CCR[15:14] register.
เมื่อ ABMODE = 00, the alternate-bytes phase จะถูกข้าม, และ the command sequence จะดำเนินการต่อโดยตรงไปยังเฟสถัดไป ถ้ามี.
อาจมีบางครั้งที่เฉพาะ a single nibble จำเป็นต้องถูกส่งในระหว่าง the alternate-byte phase แทนที่จะเป็น a full byte, อย่างเช่นเมื่อ dual-mode ถูกใช้และมีเพียง two cycles ถูกใช้สำหรับ the alternate bytes. ในกรณีนี้, firmware สามารถใช้ quad-mode (ABMODE = 11) และส่ง a byte ที่มี bits 7 and 3 of ALTERNATE ถูกเซ็ตเป็น ‘1’ (ทำให้ the IO3 line high), และ bits 6 and 2 ถูกเซ็ตเป็น ‘0’ (ทำให้ the IO2 line low). ในกรณีนี้ the upper two bits ของ the nibble ที่จะถูกส่งถูกวางใน bits 4:3 ของ ALTERNATE ในขณะที่ the lower two bits จะถูกวางใน bits 1 and 0. ตัวอย่างเช่น, ถ้า the nibble 2 (0010) จะถูกส่งบน IO0/IO1, ดังนั้น ALTERNATE ควรถูกเซ็ตเป็น 0x8A (1000_1010).