STM32F1 FSMC

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

Previous topic - Next topic

tha

21.4.2 NAND/PC Card address mapping

ในกรณีนี้, three banks มีให้ใช้งาน, แต่ละของมันถูกแบ่งลงใน memory spaces ดังแสดงใน Table 102.



สำหรับ NAND Flash memory, the common and attribute memory spaces ถูกแบ่งย่อยลงใน three sections (ดูใน Table 103 ข้างล่าง) ตั้งอยู่ใน the lower 256 Kbytes:
•    Data section (first 64 Kbytes in the common/attribute memory space)
•    Command section (second 64 Kbytes in the common / attribute memory space)
•    Address section (next 128 Kbytes in the common / attribute memory space)



The application software ใช้ the 3 sections เพื่อเข้าถึง the NAND Flash memory:
•    เพื่อส่งคำสั่งไปยัง NAND Flash memory: the software ต้องเขียน the command value ไปยัง memory location ใดๆใน
      the command section.
•    เพื่อระบุ the NAND Flash address ที่ต้องถูกอ่านหรือเขียน: the software ต้องเขียน the address value ไปยัง memory
      location ใดๆใน the address section. เนื่องจาก an address สามารถมีความยาว 4 หรือ 5 bytes (ขึ้นอยู่กับ the actual
      memory size), several consecutive writes ไปยัง the address section ถูกต้องการเพื่อระบุ the full address.
•    เพื่ออ่านหรือเขียน data: the software อ่านหรือเขียน the data value จากหรือไปยัง memory location ใดๆใน the data
      section.

เนื่องจาก the NAND Flash memory เพิ่ม addresses โดยอัตโนมัติ, ไม่มีความจำเป็นต้องเพิ่ม the address ของ the data section เพื่อเข้าถึง consecutive memory locations.

tha

21.5 NOR Flash/PSRAM controller

The FSMC สร้าง the appropriate signal timings เพื่อขับ the following types of memories:
•    Asynchronous SRAM and ROM
      –    8-bit
      –    16-bit
      –    32-bit
•    PSRAM (Cellular RAM)
      –    Asynchronous mode
      –    Burst mode for synchronous accesses
•    NOR Flash
      –    Asynchronous mode
      –    Burst mode for synchronous accesses
      –    Multiplexed or nonmultiplexed

The FSMC ส่งออก a unique chip select signal NE[4:1] ต่อ bank. สัญญาฯอื่นๆทั้งหมด (addresses, data and control) ถูกแชร์.

สำหรับ synchronous accesses, the FSMC ปล่อยออก the clock (CLK) ไปยัง the selected external device เฉพาะในระหว่าง the read/write transactions. clock นี้คือ a submultiple ของ the HCLK clock. ขนาดของแต่ละ bank ถูก fixed และเท่ากับ 64 Mbytes.

แต่ละ bank ถูกกำหนดค่าโดยวิธีของ dedicated registers (ดู Section 21.5.6).

The programmable memory parameters รวมถึง access timings (see Table 104) และการรองรับสำหรับ wait management (สำหรับ PSRAM and NOR Flash ถูกเข้าถึงใน burst mode).


tha

21.5.1 External memory interface signals

Table 105, Table 106 and Table 107  แสดงรายการสัญญาณที่มักใช้เพื่อเชื่อมต่อกับ NOR Flash, SRAM and PSRAM

Note: คำนำหน้า "N". ระบุ the associated signal ว่า active low.



NOR Flash memories ถูกระบุที่อยู่ใน 16-bit words. The maximum capacity คือ 512 Mbit (26 address lines).



NOR Flash memories ถูกระบุที่อยู่ใน 16-bit words. The maximum capacity คือ 512 Mbit (26 address lines).



PSRAM memories ถูกระบุที่อยู่ใน 16-bit words. The maximum capacity คือ 512 Mbit (26 address lines).


tha

21.5.2 Supported memories and transactions

Table 108 ข้างล่างแสดงตัวอย่างของ the supported devices, access modes และ transactions เมื่อ the memory data bus คือ 16-bit for NOR, PSRAM and SRAM. Transactions ไม่อนุญาติ (หรือไม่รองรับ) โดย the FSMC ในตัวอย่างนี้จะปรากฎในสีเทา.


tha

21.5.3 General timing rules

Signals synchronization

•    controller output signals ทั้งหมดเปลี่ยนบน the rising edge of the internal clock (HCLK)
•    ใน synchronous mode (read or write), output signals ทั้งหมดเปลี่ยนบน the rising edge of HCLK. ไม่ว่าค่า CLKDIV จะ
      เป็นเท่าใด, outputs ทั้งหมดเปลี่ยนดังต่อไปนี้:
      –    NOEL/NWEL/ NEL/NADVL/ NADVH /NBLL/ Address valid outputs เปลี่ยนบน the falling edge of FSMC_CLK
            clock.
      –    NOEH/ NWEH / NEH/ NOEH/NBLH/ Address invalid outputs เปลี่ยนบน the rising edge of FSMC_CLK clock.

tha

21.5.4 NOR Flash/PSRAM controller asynchronous transactions

Asynchronous static memories (NOR Flash memory, PSRAM, SRAM)

•    Signals ถูก synchronized โดย the internal clock HCLK. clock นี้ไม่ได้ถูกปล่อยออกไปยัง the memory
•    The FSMC สุ่มตัวอย่าง the data เสมอก่อนยกเลิกการยืนยัน the NOE signals. นี้รับประกันว่า the memory data-hold timing
      constraint ถูกตรงตาม (chip enable high เพื่อ data transition, โดยปกติต่ำสุดคือ 0 ns.)
•    ถ้า the extended mode ถูก enabled (EXTMOD bit ถูก set ใน the FSMC_BCRx register), มากถึง four extended
      modes (A, B, C and D) มีให้ใช้งาน. มันเป็นไปได้ที่จะผสม A, B, C and D modes สำหรับ read and write operations.
      ตัวอย่างเช่น, read operation สามารถถูกดำเนินการใน mode A และเขียนใน mode B.
•    ถ้า the extended mode ถูก disabled (EXTMOD bit ถูก reset ใน the FSMC_BCRx register), the FSMC สามารถดำเนิน
      การใน Mode1 or Mode2 ดังต่อไปนี้
      –    Mode 1 คือ the default mode เมื่อ SRAM/PSRAM memory type ถูกเลือก (MTYP[0:1] = 0x0 or 0x01 in the
            FSMC_BCRx register)
      –    Mode 2 คือ the default mode เมื่อ NOR memory type ถูกเลือก (MTYP[0:1] = 0x10 in the FSMC_BCRx
            register).

tha

Mode 1 - SRAM/PSRAM (CRAM)

The next figures แสดง the read and write transactions สำหรับ the supported modes ตามด้วย the required configuration of FSMC _BCRx, and FSMC_BTRx/FSMC_BWTRx registers.



The one HCLK cycle ที่ the end of the write transaction ช่วยกะรันตี the address and data hold time หลังจาก the NWE rising edge. เนื่องจากการมีอยู่ของ one HCLK cycle นี้, the DATAST value ต้องใหญ่กว่าศูนย์ (DATAST > 0).


tha



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