STM32F7 9 Chrom-ART Accelerator™ controller (DMA2D)

Started by tha, November 04, 2022, 08:17:21 AM

Previous topic - Next topic

tha

9.3.5 DMA2D foreground and background CLUT interface

The CLUT interface จัดการ the CLUT memory access และการโหลดโดยอัตโนมัติของ the CLUT.

สามประเภทของการเข้าถึงที่สามารถทำได้:
•   CLUT ถูกอ่านโดย the PFC ในระหว่าง pixel format conversion operation
•   CLUT ถูกเข้าถึงผ่านทาง the AHB slave port เมื่อ the CPU กำลังอ่านหรือกำลังเขียน data ลงใน the CLUT
•   CLUT ถูกเขียนผ่านทาง the AHB master port เมื่อการโหลดโดยอัตโนมัติของ the CLUT ถูกดำเนินการ

The CLUT memory loading สามารถถูกทำในสองวิธีที่แตกต่างกัน:
•    Automatic loading
     ลำดับต่อไปนี้ควรถูกทำตามเพื่อโหลด the CLUT:
     a)   โปรแกรม the CLUT address ลงใน the DMA2D_FGCMAR register (foreground CLUT) หรือ DMA2D_BGCMAR
           register (background CLUT)
     b)   โปรแกรม the CLUT size ใน the CS[7:0] field ของ the DMA2D_FGPFCCR register (foreground CLUT) หรือ
           DMA2D_BGPFCCR register (background CLUT).
     c)   เซ็ต the START bit ของ the DMA2D_FGPFCCR register (foreground CLUT) หรือ DMA2D_BGPFCCR register
           (background CLUT) เพื่อสตาร์ท the transfer. ในระหว่าง automatic loading process นี้, the CLUT ไม่สามารถเข้าถึงได้
           โดย the CPU. ถ้าความขัดแย้งเกิดขึ้น, a CLUT access error interrupt จะพุ่งขึ้น ทึกทักเอาว่า CAEIE ถูกเซ็ตเป็น '1' ใน
           DMA2D_CR.
•    Manual loading
     The application ต้องโปรแกรม the CLUT แบบแมนน้วลผ่านทาง the DMA2D AHB slave port ซึ่ง the local CLUT memory
     ถูกแม็ปถึง.The foreground CLUT ถูกอยู่ตำแหน่งที่ address offset 0x0400 และ the background CLUT ที่ address offset
     0x0800.

The CLUT format สามารถเป็น 24 หรือ 32 bits. มันถูกกำหนดค่าผ่านทาง the CCM bit ของ the DMA2D_FGPFCCR register (foreground CLUT) หรือ DMA2D_BGPFCCR register (background CLUT) ดังแสดงใน Table 38: Supported CLUT color mode.



วิธีที่ the CLUT data ถูกจัดระเบียบใน the system memory ถูกระบุใน Table 39: CLUT data order in system memory.


tha

9.3.6 DMA2D blender

The DMA2D blender ผสม the source pixels ทีละคู่เพื่อคำนวณ the resulting pixel.

The blending ถูกดำเนินการสอดคล้องกันกับสมการต่อไปนี้:



ไม่มี configuration register ถูกต้องการโดย the blender. The blender usage ขึ้นอยู่กับ the DMA2D operating mode ที่กำหนดใน MODE[1:0] field ของ the DMA2D_CR register.

tha

9.3.7 DMA2D output PFC

The output PFC ดำเนินการ the pixel format conversion จาก 32 bits ไปเป็น the output format ที่กำหนดใน the CM[2:0] field ของ the DMA2D output pixel format converter configuration register (DMA2D_OPFCCR).

The supported output formats ถูกให้ไว้ใน Table 40: Supported color mode in output



tha

9.3.8 DMA2D output FIFO

The output FIFO โปรแกรม the pixels สอดคล้องกันกับ the color format ที่กำหนดใน the output PFC.

The destination area ถูกกำหนดผ่านทางชุดของ control registers:
•   DMA2D output memory address register (DMA2D_OMAR)
•   DMA2D output offset register (DMA2D_OOR)
•   DMA2D number of lines register (number of lines and pixel per lines) (DMA2D_NLR)

ถ้า the DMA2D ทำงานใน register-to-memory mode, the configured output rectangle ถูกเติมโดย the color ที่ระบุใน the DMA2D output color register (DMA2D_OCOLR) ซึ่งบรรจุ a fixed 32-bit, 24-bit or 16-bit value. The format ถูกเลือกโดย the CM[2:0] field ของ the DMA2D_OPFCCR register.

The data ถูกเก็บลงใน the memory ในลำดับที่กำหนดใน Table 41: Data order in memory



The RGB888 ที่วางแนวบน 32-bit ถูกรองรับผ่านทาง the ARGB8888 mode.

tha

9.3.9 DMA2D AHB master port timer

An 8-bit timer ถูกฝังลงใน the AHB master port เพื่อจัดให้มีข้อจำกัดให้เลือกได้ของ the bandwidth บน the crossbar.

timer นี้ถูกให้สัญญานนาฬิกาโดย the AHB clock และนับ a dead time ระหว่างสองการเข้าถึงที่ติดต่อกัน. นี้จำกัด the bandwidth usage.

The timer enabling และ the dead time value ถูกกำหนดค่าผ่านทาง the AHB master port timer configuration register (DMA2D_AMPTCR).

tha

9.3.10 DMA2D transactions

DMA2D transactions ประกอบด้วยลำดับของจำนวนที่ให้ไว้ของ data transfers. จำนวนของ data และ the width สามารถถูกโปรแกรมโดย software.

แต่ละ DMA2D data transfer ประกอบด้วย 4 ขั้นตอน:
1.   Data loading จาก the memory location ที่ชี้โดย the DMA2D_FGMAR register และ pixel format conversion ตามที่
      กำหนดใน DMA2D_FGCR.
2.   Data loading จาก a memory location ที่ชี้โดย the DMA2D_BGMAR register และ pixel format conversion ตามที่
      กำหนดใน DMA2D_BGCR.
3.   การผสมทุก retrieved pixels สอดคล้องกันกับ the alpha channels ที่เป็นผลมาจาก the PFC operation บน alpha values.
4.   Pixel format conversion ของ the resulting pixels สอดคล้องกันกับ the DMA2D_OCR register และการโปรแกรมของ the
      data ไปยัง the memory location ที่ระบุที่อยู่ผ่านทาง the DMA2D_OMAR register.

tha

9.3.11 DMA2D configuration

ทั้ง source and destination data transfers สามารถกำหนดเป้าหมาย peripherals and memories ใน the whole 4 Gbyte memory area, ที่ระบุที่อยู่ช่วงระหว่าง 0x0000 0000 และ 0xFFFF FFFF.

The DMA2D สามารถทำงานในโหมดใดๆของ the four following modes ที่เลือกผ่านทาง MODE[1:0] bits of the DMA2D_CR register:
•   Register-to-memory
•   Memory-to-memory
•   Memory-to-memory with PFC
•   Memory-to-memory with PFC and blending

tha

Register-to-memory

The register-to-memory mode ถูกใช้เพื่อเติม a user defined area ด้วย a predefined color.

The color format ถูกเซ็ตใน the DMA2D_OPFCCR.

The DMA2D ไม่ดำเนินการ data fetching ใดๆจาก source ใดๆ. มันเพียงเขียน the color ที่กำหนดใน the DMA2D_OCOLR register ไปยัง the area ที่ตั้งอยู่ที่ the address ที่ชี้โดย the DMA2D_OMAR และที่กำหนดใน the DMA2D_NLR and DMA2D_OOR.