STM32F7 14 Quad-SPI interface (QUADSPI)

Started by tha, November 22, 2022, 02:04:44 PM

Previous topic - Next topic

tha

14.5.5 QUADSPI data length register (QUADSPI_DLR)

Address offset: 0x0010
Reset value: 0x0000 0000



Bits 31:0 DL[31:0]: Data length
     จำนวนของ data ที่จะถูกดึง (value+1) ใน indirect and status-polling modes. A value ไม่เกิน 3 (แสดง 4 bytes) ควรถูกใช้
     สำหรับ status-polling mode.
     เป็น 1s ทั้งหมดใน indirect mode หมายถึงความยาวที่ไม่ได้กำหนด, โดยที่ QUADSPI จะต่อเนื่องเรื่อยไปจนกว่า the end of
     memory, ตามที่กำหนดโดย FSIZE.
     0x0000_0000: 1 byte ที่จะถูกส่งถ่าย
     0x0000_0001: 2 bytes ที่จะถูกส่งถ่าย
     0x0000_0002: 3 bytes ที่จะถูกส่งถ่าย
     0x0000_0003: 4 bytes ที่จะถูกส่งถ่าย
     ...
     0xFFFF_FFFD: 4,294,967,294 (4G-2) bytes ที่จะถูกส่งถ่าย
     0xFFFF_FFFE: 4,294,967,295 (4G-1) bytes ที่จะถูกส่งถ่าย
     0xFFFF_FFFF: ความยาวที่ไม่ได้กำหนด -- ทุก bytes จนกว่า the end of Flash memory (ตามที่กำหนดโดย FSIZE) จะถูกส่ง
     ถ่าย. การอ่านอย่างต่อเนื่องไม่มีที่สิ้นสุดถ้า FSIZE = 0x1F.
     DL[0] จะถูกติดอยู่ที่ '1' ใน dual-flash mode (DFM = 1) แม้ว่าเมื่อ '0' ถูกเขียนไปยังบิตนี้, ดังนั้นทำให้มั่นใจได้ว่าแต่ละ access จะ
     ส่งถ่ายจำนวนไบต์เป็นเลขคู่.
     ฟิลด์นี้จะไม่มีผลอะไรเมื่ออยู่ใน memory-mapped mode (FMODE = 10).
     ฟิลด์นี้สามารถถูกเขียนเฉพาะเมื่อ BUSY = 0.

tha

14.5.6 QUADSPI communication configuration register (QUADSPI_CCR)

Address offset: 0x0014
Reset value: 0x0000 0000



Bit 31 DDRM: Double data rate mode
     บิตนี้เซ็ต the DDR mode สำหรับ the address, alternate byte และ data phase:
     0: DDR Mode ถูกปิดใช้งาน
     1: DDR Mode ถูกเปิดใช้งาน
     ฟิลด์นี้สามารถถูกเขียนเฉพาะเมื่อ BUSY = 0.

Bit 30 DHHC: DDR hold
     หน่วงเวลา the data output ล่วงไป 1/4 of the QUADSPI output clock cycle ใน DDR mode:
     0: หน่วงเวลา the data output โดยใช้ analog delay
     1: หน่วงเวลา the data output ล่วงไป 1/4 of a QUADSPI output clock cycle.
     คุณลักษณะแอคทีฟเฉพาะใน DDR mode.
     ฟิลด์นี้สามารถถูกเขียนเฉพาะเมื่อ BUSY = 0.

Bit 29 Reserved, must be kept at reset value.

tha

Bit 28 SIOO: Send instruction only once mode
     ดู Section 14.3.12: Sending the instruction only once on page 396. บิตนี้จะไม่มีผลอะไรเมื่อ IMODE = 00.
     0: ส่ง instruction บนทุกๆ transaction
     1: ส่ง instruction เฉพาะสำหรับ the first command
     ฟิลด์นี้สามารถถูกเขียนเฉพาะเมื่อ BUSY = 0.

Bits 27:26 FMODE[1:0]: Functional mode
     ฟิลด์นี้กำหนด the QUADSPI functional mode of operation.
     00: Indirect write mode
     01: Indirect read mode
     10: Automatic polling mode
     11: Memory-mapped mode
     ถ้า DMAEN = 1 แล้ว, ดังนั้น the DMA controller สำหรับ the corresponding channel ต้องถูกปิดใช้งานก่อนการเปลี่ยน the
     FMODE value.
     ฟิลด์นี้สามารถถูกเขียนเฉพาะเมื่อ BUSY = 0.

Bits 25:24 DMODE[1:0]: Data mode
     ฟิลด์นี้กำหนด the data phase's mode of operation:
     00: No data
     01: Data on a single line
     10: Data on two lines
     11: Data on four lines
     ฟิลด์นี้กำหนด the dummy phase mode of operation อีกด้วย.
     ฟิลด์นี้สามารถถูกเขียนเฉพาะเมื่อ BUSY = 0.

Bit 23 Reserved, must be kept at reset value.

Bits 22:18 DCYC[4:0]: Number of dummy cycles
     ฟิลด์นี้กำหนดช่วงเวลาของ the dummy phase. ในทั้ง SDR and DDR modes, มันระบุจำนวนของ CLK cycles (0-31).
     ฟิลด์นี้สามารถถูกเขียนเฉพาะเมื่อ BUSY = 0.

Bits 17:16 ABSIZE[1:0]: Alternate bytes size
     ฟิลด์นี้กำหนด alternate bytes size:
     00: 8-bit alternate byte
     01: 16-bit alternate bytes
     10: 24-bit alternate bytes
     11: 32-bit alternate bytes
     ฟิลด์นี้สามารถถูกเขียนเฉพาะเมื่อ BUSY = 0.

Bits 15:14 ABMODE[1:0]: Alternate bytes mode
     ฟิลด์นี้กำหนด the alternate-bytes phase mode of operation:
     00: No alternate bytes
     01: Alternate bytes on a single line
     10: Alternate bytes on two lines
     11: Alternate bytes on four lines
     ฟิลด์นี้สามารถถูกเขียนเฉพาะเมื่อ BUSY = 0.


tha

Bits 13:12 ADSIZE[1:0]: Address size
     บิตนี้กำหนด address size:
     00: 8-bit address
     01: 16-bit address
     10: 24-bit address
     11: 32-bit address
     ฟิลด์นี้สามารถถูกเขียนเฉพาะเมื่อ BUSY = 0.

Bits 11:10 ADMODE[1:0]: Address mode
     ฟิลด์นี้กำหนด the address phase mode of operation:
     00: No address
     01: Address on a single line
     10: Address on two lines
     11: Address on four lines
     ฟิลด์นี้สามารถถูกเขียนเฉพาะเมื่อ BUSY = 0.

Bits 9:8 IMODE[1:0]: Instruction mode
     ฟิลด์นี้กำหนด the instruction phase mode of operation:
     00: No instruction
     01: Instruction on a single line
     10: Instruction on two lines
     11: Instruction on four lines
     ฟิลด์นี้สามารถถูกเขียนเฉพาะเมื่อ BUSY = 0.

Bits 7:0 INSTRUCTION[7:0]: Instruction
     Instruction ที่จะถูกส่งไปยัง the external SPI device.
     ฟิลด์นี้สามารถถูกเขียนเฉพาะเมื่อ BUSY = 0.

tha

14.5.7 QUADSPI address register (QUADSPI_AR)

Address offset: 0x0018
Reset value: 0x0000 0000



Bits 31:0 ADDRESS[31:0]: Address
     Address ที่จะถูกส่งไปยัง the external Flash memory
     การเขียนถึงฟิลด์นี้จะถูกเพิกเฉยเมื่อ BUSY = 0 หรือเมื่อ FMODE = 11 (memory-mapped mode).
     ใน dual flash mode, ADDRESS[0] จะถูกติดที่ '0' โดยอัตโนมัติเนื่องจาก the address ควรเป็นเลขคู่เสมอ

tha

14.5.8 QUADSPI alternate bytes registers (QUADSPI_ABR)

Address offset: 0x001C
Reset value: 0x0000 0000



Bits 31:0 ALTERNATE[31:0]: Alternate Bytes
     data ทางเลือกที่จะถูกส่งไปยัง the external SPI device ทันทีหลังจาก the address.
     ฟิลด์นี้สามารถถูกเขียนเฉพาะเมื่อ BUSY = 0.

tha

14.5.9 QUADSPI data register (QUADSPI_DR)

Address offset: 0x0020
Reset value: 0x0000 0000



Bits 31:0 DATA[31:0]: Data
     Data ที่จะถูกส่ง/ถูกรับ ไปยัง/จาก the external SPI device.
     ใน indirect write mode, data ที่เขียนไปยัง register นี้จะถูกเก็บบน the FIFO ก่อนที่มันจะถูกส่งไปยัง the Flash memory ใน
     ระหว่าง the data phase. ถ้า the FIFO เต็มเกินไป, a write operation จะถูกหยุดจนกว่า the FIFO จะมีพื้นที่เพียงพที่จะรับจำนวน
     ของ data ที่กำลังถูกเขียน.
     ใน indirect read mode, การอ่าน register นี้จะให้ (โดยทาง the FIFO) the data ซึ่งถูกรับจาก the Flash memory. ถ้า the
     FIFO ไม่มีจำนวนไบต์ตามที่ร้องขอโดย the read operation และถ้า BUSY=1, the read operation จะถูกหยุดจนกว่า data ที่
     เพียงพอปรากฎหรือจนกว่า the transfer เสร็จสมบูรณ์, แล้วแต่กรณีใดจะเกิดขึ้นก่อน.
     ใน automatic polling mode, register นี้บรรจุ the last data ที่อ่านจาก the Flash memory (โดยไม่มีการบัง).
     Word, halfword, and byte accesses ไปยัง register นี้ถูกรองรับ. ใน indirect write mode, a byte write จะเพิ่ม 1 byte ไป
     ยัง the FIFO, a halfword write 2, และ a word write 4. ในทำนองเดียวกัน, ใน indirect read mode, a byte read จะลบ 1
     byte จาก the FIFO, a halfword read 2, และ a word read 4. การเข้าถึงใน indirect mode จะต้องถูกจัดแนวชิดด้านล่างของ
     register นี้: a byte read ต้องอ่าน DATA[7:0] และ a halfword read ต้องอ่าน DATA[15:0].

tha

14.5.10 QUADSPI polling status mask register (QUADSPI _PSMKR)

Address offset: 0x0024
Reset value: 0x0000 0000



Bits 31:0 MASK[31:0]: Status mask
     Mask ถูกนำมาใช้กับ the status bytes ที่รับใน polling mode.
     สำหรับ bit n:
     0: Bit n of the data ที่รับใน automatic polling mode ถูกบังและค่าของมันไม่ถูกพิจารณาใน the matching logic
     1: Bit n of the data ที่รับใน automatic polling mode ไม่ถูกบังและค่าของมันถูกพิจารณาใน the matching logic
     ฟิลด์นี้สามารถถูกเขียนเฉพาะเมื่อ BUSY = 0.