STM32F7 13 Flexible memory controller (FMC)

Started by tha, November 10, 2022, 08:25:57 AM

Previous topic - Next topic

tha





ความแตกต่างเมื่อเปรียบเทียบกับ Mode1 คือการสลับของ NWE และ the independent read and write timings เมื่อ extended mode ถูกเซ็ต (Mode B).





Note: The FMC_BWTRx register ใช้ได้เฉพาะถ้า the Extended mode ถูกเซ็ต (mode B), มิฉะนั้นสิ่งที่อยู่ภายในของมันจะไม่ได้รับ
          ความสนใจ.

tha




ความแตกต่างเมื่อเปรียบเทียบกับ Mode1 คือการสลับของ NOE และ the independent read and write timings.




tha




ความแตกต่างเมื่อเปรียบเทียบกับ Mode1 คือการสลับของ NOE ที่จะสลับหลังจาก NADV เปลี่ยนและ the independent read and write timings.





tha




ความแตกต่างจาก ModeD คือการขับของ the lower address byte(s) บน the data bus.



tha

WAIT management in asynchronous accesses

ถ้า the asynchronous memory ยืนยัน a WAIT signal เพื่อแสดงให้เห็นว่ามันยังไม่พร้อมที่จะยอมรับหรือจัดให้มี data, the ASYNCWAIT bit ต้องถูกเซ็ตใน FSMC_BCRx register.

ถ้า the WAIT signal แอคทีฟ (high or low ขึ้นอยู่กับ the WAITPOL bit), the second access phase (Data setup phase) ที่โปรแกรมโดย the DATAST bits, ถูกยืดเวลาออกไปจนกว่า WAIT กลายมาเป็นไม่แอคทีฟ. ไม่เหมือนกับ the data setup phase, the first access phases (Address setup and Address hold phases), โปรแกรมโดย the ADDSET[3:0] and ADDHLD bits, จะไม่ WAIT sensitive และดังนั้นพวกมันจะไม่ถูกยืดเวลาออก.

The data setup phase ต้องถูกโปรแกรมดังนั้น WAIT สามารถถูกตรวจพบ 4 HCLK cycles ก่อน the end of the memory transaction. กรณีต่อไปนี้ต้องถูกพิจารณา:

1.    The memory ยืนยัน the WAIT signal ที่วางแนวไปยัง NOE/NWE ซึ่งสลับ:

                DATAST ≥ (4 × HCLK) + max_wait_assertion_time

2.    The memory ยืนยัน the WAIT signal ที่วางแนวไปยัง NEx (หรือ NOE/NWE ไม่มีการสลับ):
       ถ้า

               max_wait_assertion_time > address_phase + hold_phase

      ดังนั้น

               DATAST ≥ (4 × HCLK) + (max_wait_assertion_time – address_phase – hold_phase)

     มิฉะนั้น

               DATAST ≥ 4 × HCLK

      โดยที่ max_wait_assertion_time คือ the maximum time ที่ใช้โดย the memory เพื่อยืนยัน the WAIT signal เมื่อ
      NEx/NOE/NWE เป็น low.

Figure 48 and Figure 49 แสดงจำนวนของ HCLK clock cycles ที่ถูกเพิ่มไปยัง the memory access หลังจาก WAIT ถูกปลดปล่อยโดย the asynchronous memory (เป็นอิสระจากกรณีข้างบน).



tha

13.5.5 Synchronous transactions

The memory clock, FMC_CLK, เป็นตัวคูณย่อยของ HCLK. มันขึ้นอยู่กับค่าของ CLKDIV และ the MWID/ AHB data size, ตามสูตรที่ให้ด้านล่าง:

FMC_CLK divider ratio = max(CLKDIV + 1,MWID(AHB data size))

ถ้า MWID คือ 16 or 8-bit, the FMC_CLK divider ratio จะถูกกำหนดโดย the programmed CLKDIV value เสมอ.

ถ้า MWID คือ 32-bit, the FMC_CLK divider ratio จะขึ้นอยู่กับ AHB data size ด้วย.

Example:
•   ถ้า CLKDIV=1, MWID = 32 bits, AHB data size=8 bits, FMC_CLK=HCLK/4.
•   ถ้า CLKDIV=1, MWID = 16 bits, AHB data size=8 bits, FMC_CLK=HCLK/2.

NOR Flash memories ระบุ a minimum time จาก NADV assertion ถึง CLK high. เพื่อให้ตรงตามข้อจำกัดนี้, the FSMC จะไม่ปล่อยออก the clock ไปยัง the memory ในระหว่าง the first internal clock cycle of the synchronous access (ก่อน NADV assertion). นี้รับประกันว่า the rising edge of the memory clock เกิดขึ้นในช่วงกลางของ the NADV low pulse.

tha

Data latency versus NOR Flash latency

The data latency คือจำนวนของ cycles ที่รอก่อนการสุ่ม the data. The DATLAT value ต้องสอดคล้องกับ the latency value ที่ระบุใน the NOR Flash configuration register. The FSMC ไม่ได้รวม the clock cycle เมื่อ NADV เป็น low ใน the data latency count.

Caution: บาง NOR Flash memories รวม the NADV Low cycle ไว้ใน the data latency count, ดังนั้นความสัมพันธ์จริงๆ
                 ระหว่าง the NOR Flash latency and the FMSC DATLAT parameter สามารถเป็นอย่างใดอย่างหนึ่งของ:
                 •    NOR Flash latency = (DATLAT + 2) CLK clock cycles
                 •    NOR Flash latency = (DATLAT + 3) CLK clock cycles

บาง recent memories ยืนยัน NWAIT ในระหว่าง the latency phase. ในกรณีอย่างนี้ DATLAT สามารถถูกเซ็ตเป็นค่าต่ำสุดของมัน. เป็นผลให้, the FSMC สุ่ม the data และรอนานเพียงพอที่จะประเมินว่า the data ถูกต้องหรือไม่. ดังนั้น the FSMC ตรวจพบเมื่อ the memory ออกจาก latency และ data จริงถูกประมวลผล.

memories อื่นๆจะไม่ยืนยัน NWAIT ในระหว่าง latency. ในกรณีนี้ the latency ต้องถูกเซ็ตอย่างถูกต้องสำหรับทั้ง the FSMC and the memory, มิฉะนั้น data ที่ไม่ถูกต้องจะเข้าใจผิดว่าเป็น good data, หรือ data ที่ถูกต้องจะสูญหายใน the initial phase ของ the memory access.

tha

Single-burst transfer

เมื่อ the selected bank ถูกกำหนดค่าใน burst mode สำหรับ synchronous accesses, ถ้าตัวอย่างเช่น an AHB single-burst transaction ถูกร้องขอบน 16-bit memories, the FSMC จะดำเนินการ a burst transaction ความยาว 1 (ถ้า the AHB transfer เป็น 16-bit), หรือความยาว 2 (ถ้า the AHB transfer เป็น 32-bit) และถอนการยืนยัน the chip select signal เมื่อ the last data ถูก strobed.

transfers ดังกล่าวไม่ได้มีประสิทธิภาพมากที่สุดในแง่ของ cycles เมื่อเทียบกับ asynchronous read operations. อย่างไรก็ตาม, a random asynchronous access จะต้องการก่อนเพื่อโปรแกรมใหม่ the memory access mode, ซึ่งจะใช้งานได้นานกว่า.