STM32F1 FSMC

Started by tha, December 29, 2020, 08:15:46 AM

Previous topic - Next topic

tha





ความแตกต่างกับ mode1 คือ the toggling of NWE and the independent read and write timings เมื่อ extended mode ถูก set (Mode B).





Note: The FSMC_BWTRx register จะใช้ได้เฉพาะถ้า extended mode ถูก set (mode B), มิฉะนั้นเนื้อหาของมันทั้งหมดไม่ต้องสนใจ.

tha


tha



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





tha


1. The bus turnaround delay (BUSTURN + 1) และ the delay ระหว่าง side-by-side transactions เหลื่อมกัน, ดังนั้น  BUSTURN ≤5 ไม่มีผลกระทบ.



ความแตกต่างกับ mode D คือ the drive of the lower address byte(s) on the databus.





ปล. สวัสดีปีใหม่ ขอให้ชาวอีเล็คทูเดย์มีความสุข สุขภาพแข็งแรง มีสติ มีสมาธิ มีปัญญากันนะครับ

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 (DATAST in FSMC_BTRx register) ต้องถูกโปรแกรมดังนั้น the WAIT signal จะตรงตามเงื่อนไขต่อไปนี้:
•    สำหรับ read accesses: WAIT สามารถถูกตรวจพบ 4 HCLK cycles ก่อน data จะถูกสุ่มจับหรือ 6 HCLK cycles ก่อน NOE ถูก
      ยกเลิกการยืนยัน (อ้างอิงถึง Figure 200).
•    สำหรับ write accesses: WAIT สามารถถูกตรวจพบ 4 HCLK cycles ก่อน NWE ยกเลิกการยืนยัน (refer to Figure 201).

1.    Memory ยืนยัน the WAIT signal เป็นแนวไปยัง NOE/NWE ซึ่งสลับ:

           DATAST ≥ (4 × HCLK) + max_wait_assertion_time

2.    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 200 and Figure 201 แสดง the number of HCLK clock cycles ที่ถูกเพิ่มไปยัง the memory access หลังจาก WAIT ถูกปลดปล่อยโดย the asynchronous memory (เป็นอิสระจากกรณีข้างบน).





tha

21.5.5 Synchronous transactions

The memory clock, CLK, คือ a submultiple of HCLK สอดคล้องกันกับ the value of parameter CLKDIV.

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 middle of the NADV low pulse.

Data latency versus NOR Flash latency

The data latency คือ the number of cycles เพื่อ wait ก่อนการสุ่มจับ 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 exact
                 relation ระหว่าง 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

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

memories อื่นๆจะไม่ยืนยัน NWAIT ในระหว่าง latency. ในกรณีนี้ the latency ต้องถูกเซ็ตอย่างถูกต้องสำหรับทั้ง the FSMC and the memory, มิฉะนั้น invalid data จะเข้าใจผิดว่าเป็น good data, หรือ valid 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.

เห็นได้ชัดว่า, a transfer ดังกล่าวไม่มี the most efficient ใน terms of cycles (เปรียบเทียบกับ an asynchronous read). อย่างไรก็ตาม, a random asynchronous access จะต้องการเป็นอันดับแรกที่จะตั้งโปรแกรม the memory access mode ใหม่, ซึ่งจะอยู่ได้นานขึ้น.

tha

Cross boundary page for Cellular RAM 1.5

Cellular RAM 1.5 ไม่อนุญาติ burst access เพื่อข้าม the page boundary. The FSMC controller อนุญาติที่จะแยกโดยอัตโนมัติy the burst access เมื่อ the memory page size ถูกบรรลุผลสำเร็จโดยการกำหนดค่า the CPSIZE bits ใน the FSMC_BCR1 register ตามหลัง the memory page size.