Electoday 2025

ไมโครคอนโทรลเลอร์ => ARM Processors => Topic started by: tha on November 04, 2022, 08:17:21 AM

Title: STM32F7 9 Chrom-ART Accelerator™ controller (DMA2D)
Post by: tha on November 04, 2022, 08:17:21 AM
9 Chrom-ART Accelerator™ controller (DMA2D)

9.1 DMA2D introduction

The Chrom-ART Accelerator™ (DMA2D) เป็น a specialized DMA อุทิศให้กับการจัดการภาพ มันสามารถดำเนินการการทำงานดังต่อไปนี้:
•   เติมบางส่วนหรือทั้งหมดของภาพปลายทางด้วยสีเฉพาะ
•   คัดลอกบางส่วนหรือทั้งหมดของภาพต้นทางไปยังบางส่วนหรือทั้งหมดของภาพปลายทาง
•   คัดลอกบางส่วนหรือทั้งหมดของภาพต้นทางไปยังบางส่วนหรือทั้งหมดของภาพปลายทางด้วย a pixel format conversion
•   ผสมบางส่วนและ/หรือ two complete source images ด้วยรูปแบบพิกเซลที่แตกต่างกันและคัดลอกผลลัพธ์บางส่วนหรือทั้งหมดไปยัง
     บางส่วนหรือทั้งหมดของภาพปลายทางด้วยรูปแบบสีที่แตกต่างกัน.

ทุก the classical color coding schemes ถูกรองรับจาก 4-bit จนถึง 32-bit ต่อ pixel ด้วย indexed or direct color mode. The DMA2D มี dedicated memories ของมันเองสำหรับ CLUTs (color look-up tables).
Title: Re: STM32F7 9 Chrom-ART Accelerator™ controller (DMA2D)
Post by: tha on November 04, 2022, 09:01:51 AM
9.2 DMA2D main features

The main DMA2D features คือ:
•   Single AHB master bus architecture.
•   AHB slave programming interface รองรับ 8/16/32-bit accesses (ยกเว้นสำหรับ CLUT accesses ซึ่งเป็น 32-bit).
•   User programmable working area size
•   User programmable offset สำรับ sources and destination areas
•   User programmable sources and destination addresses บน the whole memory space
•   มากถึง 2 sources ที่มีการทำงานผสม
•   Alpha value สามารถถูกแก้ไข (source value, fixed value or modulated value)
•   User programmable source and destination color format
•   มากถึง 11 color formats ที่รองรับจาก 4-bit จนถึง 32-bit ต่อ pixel ด้วย indirect or direct color coding
•   2 internal memories สำหรับ CLUT storage ใน indirect color mode
•   Automatic CLUT loading หรือ CLUT programming โดยทาง the CPU
•   User programmable CLUT size
•   Internal timer เพื่อควบคุม AHB bandwidth
•   4 operating modes: register-to-memory, memory-to-memory, memory-to-memory with pixel format
     conversion, and memory-to-memory with pixel format conversion และการผสม
•   Area filling ด้วย a fixed color
•   คัดลอกจาก an area ไปยังที่อื่นๆ
•   คัดลอกด้วย pixel format conversion ระหว่าง source and destination images
•   คัดลอกจาก two sources ด้วยรูปแบบสีที่เป็นอิสระและการผสม
•   ทิ้งและระงับค้างไว้ DMA2D operations
•   Watermark interrupt บน a user programmable destination line
•   Interrupt generation บน bus error หรือ access conflict
•   Interrupt generation บน process completion
Title: Re: STM32F7 9 Chrom-ART Accelerator™ controller (DMA2D)
Post by: tha on November 04, 2022, 10:04:39 AM
9.3 DMA2D functional description

9.3.1 General description

The DMA2D controller ดำเนินการ direct memory transfer. ในฐานะที่เป็น an AHB master, มันสามารถใช้การควบคุมของ the AHB bus matrix เพื่อเริ่มต้น AHB transactions.

The DMA2D สามารถทำงานในโหมดต่อไปนี้:
•   Register-to-memory
•   Memory-to-memory
•   Memory-to-memory with Pixel Format Conversion
•   Memory-to-memory with Pixel Format Conversion and Blending

The AHB slave port ถูกใช้เพื่อโปรแกรม the DMA2D controller.

The block diagram of the DMA2D ถูกแสดงใน Figure 29: DMA2D block diagram.

(https://i.imgur.com/fJ6aO43.png)
Title: Re: STM32F7 9 Chrom-ART Accelerator™ controller (DMA2D)
Post by: tha on November 04, 2022, 10:34:42 AM
9.3.2 DMA2D control

The DMA2D controller ถูกกำหนดค่าผ่านทาง the DMA2D Control Register (DMA2D_CR) ซึ่งอนุญาตให้เลือก:

The user application สามารถดำเนินการการทำงานต่อไปนี้:
•   เลือก the operating mode
•   เปิดใช้งาน/ปิดใช้งาน the DMA2D interrupt
•   สตาร์ท/ระงับค้างไว้/ละทิ้ง ongoing data transfers
Title: Re: STM32F7 9 Chrom-ART Accelerator™ controller (DMA2D)
Post by: tha on November 04, 2022, 10:58:08 AM
9.3.3 DMA2D foreground and background FIFOs

The DMA2D foreground (FG) FG FIFO และ background (BG) FIFO ดึง the input data ที่จะถูกคัดลอกและ/หรือประมวลผล.

The FIFOs ดึง the pixels สอดคล้องกันกับ the color format ที่กำหนดใน pixel format converter (PFC) โดยเฉพาะของพวกมัน.

พวกมันถูกโปรแกรมผ่านทางชุดของ control registers:
•   DMA2D foreground memory address register (DMA2D_FGMAR)
•   DMA2D foreground offset register (DMA2D_FGOR)
•   DMA2D background memory address register (DMA2D_BGMAR)
•   DMA2D background offset register (DMA2D_BGBOR)
•   DMA2D number of lines register (จำนวนของ lines และ pixel ต่อ lines) (DMA2D_NLR)

เมื่อ the DMA2D ทำงานใน register-to-memory mode, จะไม่มี the FIFOs ถูกทำให้ทำงาน.

เมื่อ the DMA2D ทำงานใน memory-to-memory mode (ไม่มี pixel format conversion และไม่มี blending operation), มีเพียง the FG FIFO ที่ถูกทำให้ทำงงานและทำหน้าที่เป็น a buffer.

เมื่อ the DMA2D ทำงานใน memory-to-memory operation ที่มี pixel format conversion (ไม่มี blending operation), the BG FIFO ไม่ถูกทำให้ทำงาน.
Title: Re: STM32F7 9 Chrom-ART Accelerator™ controller (DMA2D)
Post by: tha on November 04, 2022, 11:37:13 AM
9.3.4 DMA2D foreground and background pixel format converter (PFC)

DMA2D foreground pixel format converter (PFC) และ background pixel format converter ดำเนินการ the pixel format conversion เพื่อสร้าง a 32-bit ต่อ pixel value. The PFC สามารถแก้ไข the alpha channel ได้อีกด้วย.

ขั้นตอนแรกของ the converter จะแปลง the color format. รูปแบบสีเริ่มแรกของ the foreground pixel and background pixels ถูกกำหนดค่าผ่านทาง the CM[3:0] bits ของ the DMA2D_FGPFCCR and DMA2D_BGPFCCR, ตามลำดับ.

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

(https://i.imgur.com/i6fOgsO.png)
Title: Re: STM32F7 9 Chrom-ART Accelerator™ controller (DMA2D)
Post by: tha on November 04, 2022, 02:20:26 PM
The color format ถูกโค๊ดดังต่อไปนี้:
•   Alpha value field: ความโปร่งใส
    0xFF value ตรงกันกับพิกเซลทึบแสงและ 0x00 ตรงกันกับค่าโปร่งใส.
•   R field สำหรับสีแดง
•   G field สำหรับสีเขียว
•   B field สำหรับสีน้ำเงิน
•   L field: ความสว่าง
    ฟิลด์นี้เป็นดัชนีชี้ไปยัง a CLUT เพื่อดึงส่วนประกอบ สาม/สี่ RGB/ARGB.

ถ้ารูปแบบเริ่มแรกเป็น direct color mode (ARGB/RGB), จากนั้นการขยายเป็น 8-bit ต่อ channel ถูกดำเนินการโดยการคัดลอก the MSBs ลงใน the LSBs. นี้ทำให้แน่ใจว่าเป็นเส้นตรงที่สมบูรณ์แบบของการแปลง.

ถ้ารูปแบบเริ่มแรกเป็น indirect color mode (L/AL), a CLUT ถูกต้องการและแต่ละ pixel format converter จะถูกสัมพันธ์กันกับ a 256 รายการ 32-bit CLUT.

ถ้า the original format ไม่ได้รวม an alpha channel เอาไว้, the alpha value จะถูกเซ็ตโดยอัตโนมัติเป็น 0xFF (ทึบแสง).

สำหรับ the specific alpha mode A4 and A8, ไม่มี color information ถูกจัดเก็บและไม่ได้ถูกดัชนีชี้. The color ที่จะถูกใช้สำหรับ the image generation ถูกคงที่และถูกกำหนดใน the DMA2D_FGCOLR สำหรับ foreground pixels และใน the DMA2D_BGCOLR register สำหรับ background pixels.

ลำดับของ the fields ใน the system memory ถูกกำหนดใน Table 36: Data order in memory.

(https://i.imgur.com/14LnNDw.png)
Title: Re: STM32F7 9 Chrom-ART Accelerator™ controller (DMA2D)
Post by: tha on November 04, 2022, 02:56:10 PM
The 24-bit RGB888 ที่วางแนวบน 32-bit ถูกรองรับผ่านทาง the ARGB8888 mode.

ทันทีที่ the 32-bit value ถูกสร้าง, the alpha channel สามารถถูกแก้ไขสอดคล้องกับ the AM[1:0] field ของ the DMA2D_FGPFCCR/DMA2D_BGPFCCR registers ดังแสดงใน Table 37: Alpha mode configuration.

The alpha channel สามารถเป็น:
•   เก็บไว้ตามที่มันเป็น (ไม่มีการแก้ไข),
•   ถูกแทนที่โดย the ALPHA[7:0] value of DMA2D_FGPFCCR/DMA2D_BGPFCCR,
•   หรือถูกแทนที่โดย the original alpha value ที่คูณโดย the ALPHA[7:0] value ของ DMA2D_FGPFCCR/DMA2D_BGPFCCR
     ที่หารโดย 255.

(https://i.imgur.com/bl71p84.png)
Title: Re: STM32F7 9 Chrom-ART Accelerator™ controller (DMA2D)
Post by: tha on November 05, 2022, 07:12:47 AM
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.

(https://i.imgur.com/nkCVNWe.png)

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

(https://i.imgur.com/bKgtiSr.png)
Title: Re: STM32F7 9 Chrom-ART Accelerator™ controller (DMA2D)
Post by: tha on November 05, 2022, 07:43:00 AM
9.3.6 DMA2D blender

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

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

(https://i.imgur.com/Q78afS3.png)

ไม่มี configuration register ถูกต้องการโดย the blender. The blender usage ขึ้นอยู่กับ the DMA2D operating mode ที่กำหนดใน MODE[1:0] field ของ the DMA2D_CR register.
Title: Re: STM32F7 9 Chrom-ART Accelerator™ controller (DMA2D)
Post by: tha on November 05, 2022, 08:50:18 AM
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

(https://i.imgur.com/exeG5Zk.png)
Title: Re: STM32F7 9 Chrom-ART Accelerator™ controller (DMA2D)
Post by: tha on November 05, 2022, 09:18:30 AM
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

(https://i.imgur.com/ouUOkQ6.png)

The RGB888 ที่วางแนวบน 32-bit ถูกรองรับผ่านทาง the ARGB8888 mode.
Title: Re: STM32F7 9 Chrom-ART Accelerator™ controller (DMA2D)
Post by: tha on November 05, 2022, 10:09:27 AM
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).
Title: Re: STM32F7 9 Chrom-ART Accelerator™ controller (DMA2D)
Post by: tha on November 05, 2022, 10:52:55 AM
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.
Title: Re: STM32F7 9 Chrom-ART Accelerator™ controller (DMA2D)
Post by: tha on November 05, 2022, 01:07:12 PM
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
Title: Re: STM32F7 9 Chrom-ART Accelerator™ controller (DMA2D)
Post by: tha on November 05, 2022, 01:27:00 PM
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.
Title: Re: STM32F7 9 Chrom-ART Accelerator™ controller (DMA2D)
Post by: tha on November 05, 2022, 01:50:26 PM
Memory-to-memory

ใน memory-to-memory mode, the DMA2D ไม่ดำเนินการ graphical data transformation ใดๆ. The foreground input FIFO ทำหน้าที่เป็น a buffer และ the data จะถูกส่งถ่ายจาก the source memory location ที่กำหนดใน DMA2D_FGMAR ไปยัง the destination memory location ที่ชี้โดย DMA2D_OMAR.

The color mode ที่โปรแกรมใน the CM[3:0] bits of the DMA2D_FGPFCCR register กำหนดจำนวนของ bits ต่อ pixel สำหรับทั้ง input and output.

ขนาดของ the area ที่จะถูกส่งถ่ายถูกกำหนดโดย the DMA2D_NLR and DMA2D_FGOR registers สำหรับ the source, และโดย DMA2D_NLR and DMA2D_OOR registers สำหรับ the destination.
Title: Re: STM32F7 9 Chrom-ART Accelerator™ controller (DMA2D)
Post by: tha on November 05, 2022, 02:25:04 PM
Memory-to-memory with PFC

ในโหมดนี้, the DMA2D ดำเนินการ a pixel format conversion ของ the source data และเก็บพวกมันใน the destination memory location.

ขนาดของ the area ที่จะถูกส่งถ่ายถูกกำหนดโดย the DMA2D_NLR and DMA2D_FGOR registers สำหรับ the source, และโดย DMA2D_NLR and DMA2D_OOR registers สำหรับ the destination.

Data ถูกดึงจาก the location ที่กำหนดใน the DMA2D_FGMAR register และถูกประมวลผลโดย the foreground PFC. The original pixel format ถูกกำหนดค่าผ่านทาง the DMA2D_FGPFCCR register.

ถ้า the original pixel format เป็น direct color mode, ดังนั้น the color channels จะถูกขยายเป็น 8 bits ทั้งหมด.

ถ้า the pixel format เป็น indirect color mode, the associated CLUT ต้องถูกโหลดลงใน the CLUT memory.
Title: Re: STM32F7 9 Chrom-ART Accelerator™ controller (DMA2D)
Post by: tha on November 05, 2022, 02:41:33 PM
The CLUT loading สามารถถูกทำโดยอัตโนมัติโดยลำดับข้างล่างต่อไปนี้ :
1.   เซ็ต the CLUT address ลงใน the DMA2D_FGCMAR.
2.   เซ็ต the CLUT size ใน the CS[7:0] bits of the DMA2D_FGPFCCR register.
3.   เซ็ต the CLUT format (24 or 32 bits) ใน the CCM bit of the DMA2D_FGPFCCR register.
4.   สตาร์ท the CLUT loading โดยการเซ็ต the START bit of the DMA2D_FGPFCCR register.

ทันทีที่ the CLUT loading เสร็จสมบูรณ์, the CTCIF flag of the DMA2D_IFR register จะถูกทำให้พุ่งขึ้น, และ an interrupt จะถูกสร้างถ้า the CTCIE bit ถูกเซ็ตใน DMA2D_CR. The automatic CLUT loading process ไม่สามารถทำงานขนานไปกับ classical DMA2D transfers ได้.

The CLUT สามารถถูกเติมโดย the CPU หรือโดย master อื่นใดๆผ่านทาง the APB port. การเข้าถึงไปยัง the CLUT จะไม่สามารถทำได้เมื่อ a DMA2D transfer กำลังดำเนินการอยู่และใช้ the CLUT(indirect color format).
Title: Re: STM32F7 9 Chrom-ART Accelerator™ controller (DMA2D)
Post by: tha on November 05, 2022, 03:03:59 PM
ควบคู่ไปกับ the color conversion process, the alpha value สามารถถูกเพิ่มหรือเปลี่ยนแปลงได้ขึ้นอยู่กับ the value ที่โปรแกรมใน the DMA2D_FGPFCCR register. ถ้า the original image ไม่มี an alpha channel, a default alpha value of 0xFF จะถูกเพิ่มโดยอัตโนมัติเพื่อให้ได้ a fully opaque pixel. The alpha value สามารถถูกแก้ไขได้ตาม the AM[1:0] bits of the DMA2D_FGPFCCR register:
•   มันสามารถถูกไม่เปลี่ยนแปลง.
•   มันสามารถถูกแทนที่โดย the value ที่กำหนดใน the ALPHA[7:0] value of the DMA2D_FGPFCCR register.
•   มันสามารถถูกแทนที่โดย the original value ที่คูณด้วย the ALPHA[7:0] value of the DMA2D_FGPFCCR register ที่หารด้วย
     255.

The resulting 32-bit data ถูกเข้าระหัสโดย the OUT PFC ลงใน the format ที่ระบุโดย the CM[2:0] field of the DMA2D_OPFCCR register. The output pixel format ไม่สามารรถเป็น the indirect mode เนื่องจากไม่มี CLUT generation process ถูกรองรับ.

The processed data ถูกเขียนลงใน the destination memory location ที่ชี้โดย DMA2D_OMAR.
Title: Re: STM32F7 9 Chrom-ART Accelerator™ controller (DMA2D)
Post by: tha on November 06, 2022, 08:58:30 AM
Memory-to-memory with PFC and blending

ในโหมดนี้, 2 sources ถูกดึงมาใน the foreground FIFO และ background FIFO จาก the memory locations ที่กำหนดโดย DMA2D_FGMAR and DMA2D_BGMAR.

The two pixel format converters ต้องถูกกำหนดค่าตามที่อธิบายใน the memory-to-memory mode. configurations ของพวกมันสามารถแตกต่างกันเนื่องจากแต่ละ pixel format converter เป็นอิสระและมี CLUT memory เป็นของพวกมันเอง.

เมื่อแต่ละ pixel ถูกแปลงเป็น 32 bits แล้วโดย PFCs ที่เกี่ยวข้องของพวกมัน, พวกมันถูกผสมตามสมการข้างล่าง:

(https://i.imgur.com/cpDOr1N.png)

The resulting 32-bit pixel value ถูกเข้าระหัสโดย the output PFC ตาม the specified output format, และ the data จะถูกเขียนลงใน the destination memory location ที่ชี้โดย DMA2D_OMAR.
Title: Re: STM32F7 9 Chrom-ART Accelerator™ controller (DMA2D)
Post by: tha on November 06, 2022, 09:36:29 AM
Configuration error detection

The DMA2D เช็คว่า the configuration ถูกต้องก่อนการส่งถ่ายใดๆ. The configuration error interrupt flag ถูกเซ็ตโดย hardware เมื่อ a wrong configuration ถูกตรวจพบเมื่อ a new transfer/automatic loading สตาร์ท. An interrupt จากนั้นจะถูกสร้างถ้า the CEIE bit of the DMA2D_CR ถูกเซ็ต.

The wrong configurations ที่สามารถถูกตรวจพบได้ถูกแสดงรายการไว้ด้านล่าง:
•   Foreground CLUT automatic loading: MA bits of DMA2D_FGCMAR ไม่ถูกวางแนวเดียวกันกับ CCM of
     DMA2D_FGPFCCR.
•   Background CLUT automatic loading: MA bits of DMA2D_BGCMAR ไม่ถูกวางแนวเดียวกันกับ CCM of
     DMA2D_BGPFCCR
•   Memory transfer (ยกเว้นใน register-to-memory mode): MA bits of DMA2D_FGMAR ไม่ถูกวางแนวเดียวกันกับ CM of
     DMA2D_FGPFCCR
•   Memory transfer (ยกเว้นใน register-to-memory mode): CM bits of DMA2D_FGPFCCR ไม่ถูกต้อง
•   Memory transfer (ยกเว้นใน register-to-memory mode): PL bits of DMA2D_NLR เป็นคี่ในขณะที่ CM of
     DMA2D_FGPFCCR เป็น A4 or L4
•   Memory transfer (ยกเว้นใน register-to-memory mode): LO bits of DMA2D_FGOR เป็นคี่ในขณะที่ CM of
     DMA2D_FGPFCCR เป็น A4 or L4
•   Memory transfer (เฉพาะใน blending mode): MA bits of DMA2D_BGMAR ไม่ถูกวางแนวเดียวกันกับ the CM of
     DMA2D_BGPFCCR
•   Memory transfer: (เฉพาะใน blending mode) CM bits of DMA2D_BGPFCCR ไม่ถูกต้อง
•   Memory transfer (เฉพาะใน blending mode): PL bits of DMA2D_NLR เป็นคี่ในขณะที่ CM of DMA2D_BGPFCCR เป็น A4
     or L4
•   Memory transfer (เฉพาะใน blending mode): LO bits of DMA2D_BGOR เป็นคี่ในขณะที่ CM of DMA2D_BGPFCCR เป็น
     A4 or L4
•   Memory transfer (ยกเว้นใน memory to memory mode): MA bits of DMA2D_OMAR ไม่ถูกวางแนวเดียวกันกับ CM bits of
     DMA2D_OPFCCR.
•   Memory transfer (ยกเว้นใน memory to memory mode): CM bits of DMA2D_OPFCCR ไม่ถูกต้อง
•   Memory transfer: NL bits of DMA2D_NLR = 0
•   Memory transfer: PL bits of DMA2D_NLR = 0
Title: Re: STM32F7 9 Chrom-ART Accelerator™ controller (DMA2D)
Post by: tha on November 06, 2022, 10:25:04 AM
9.3.12 DMA2D transfer control (start, suspend, abort and completion)

ทันทีที่ the DMA2D ถูกกำหนดค่า, the transfer สามารถถูกเริ่มโดยการเซ็ต the START bit of the DMA2D_CR register. ทันทีที่ the transfer เสร็จสมบูรณ์, the START bit จะถูกรีเซ็ตโดยอัตโนมัติและ the TCIF flag of the DMA2D_ISR register จะถูกทำให้พุ่งขึ้น. An interrupt สามารถถูกสร้างถ้า the TCIE bit of the DMA2D_CR ถูกเซ็ต.

The user application สามารถระงับค้างไว้ the DMA2D ณ เวลาใดก็ได้โดยการเซ็ต the SUSP bit of the DMA2D_CR register. The transaction จากนั้นสามารถถูกยกเลิกโดยการเซ็ต the ABORT bit of the DMA2D_CR register หรือสามารถถูกรีสตาร์ทโดยการรีเซ็ต the SUSP bit of the DMA2D_CR register.

The user application สามารถยกเลิก an ongoing transaction ณ เวลาใดก็ได้โดยการเซ็ต the ABORT bit of the DMA2D_CR register. ในกรณีนี้, the TCIF flag ไม่ถูกทำให้พุ่งขึ้น.

Automatic CLUT transfers สามารถถูกยกเลิกหรือถูกระงับค้างไว้โดยการใช้ the ABORT or the SUSP bit of the DMA2D_CR register.
Title: Re: STM32F7 9 Chrom-ART Accelerator™ controller (DMA2D)
Post by: tha on November 06, 2022, 01:25:45 PM
9.3.13 Watermark

A watermark สามารถถูกโปรแกรมเพื่อสร้าง an interrupt เมื่อ the last pixel ของ a given line ถูกเขียนไปยัง the destination memory area แล้ว.

The line number ถูกกำหนดใน the LW[15:0] field of the DMA2D_LWR register.

เมื่อ the last pixel ของ line นี้ถูกส่งถ่ายแล้ว, the TWIF flag of the DMA2D_ISR register จะถูกทำให้พุ่งขึ้นและ an interrupt จะถูกสร้างถ้า the TWIE bit of the DMA2D_CR ถูกเซ็ต.
Title: Re: STM32F7 9 Chrom-ART Accelerator™ controller (DMA2D)
Post by: tha on November 06, 2022, 02:01:41 PM
9.3.14 Error management

สองประเภทของ errors สามารถถูกทริก:
•   AHB master port errors ที่ส่งสัญญาณโดย the TEIF flag of the DMA2D_ISR register.
•   ความขัดแย้งที่เกิดจาก CLUT access (CPU พยายามเข้าถึง the CLUT ในขณะที่ a CLUT loading หรือ a DMA2D transfer กำลัง
     ดำเนินการอยู่) ที่ส่งสัญญาณโดย the CAEIF flag of the DMA2D_ISR register.

ทั้งสอง flags สัมพันธ์กันกับ interrupt enable flag ของพวกมันเองใน the DMA2D_CR register เพื่อสร้าง an interrupt ถ้าจำเป็น (TEIE and CAEIE).
Title: Re: STM32F7 9 Chrom-ART Accelerator™ controller (DMA2D)
Post by: tha on November 06, 2022, 02:17:05 PM
9.3.15 AHB dead time

เพื่อจำกัด the AHB bandwidth usage, a dead time ระหว่างสองการเข้าถึง AHB ที่ติดต่อกันสามารถถูกโปรแกรม.

คุณลักษณะนี้สามารถถูกเปิดใช้งานได้โดยการเซ็ต the EN bit in the DMA2D_AMTCR register.

The dead time value ถูกเก็บไว้ใน the DT[7:0] field of the DMA2D_AMTCR register. ค่านี้แสดงถึงจำนวนขั้นต่ำที่รับประกันของ cycles ระหว่าง two consecutive transactions บน the AHB bus.

การอัฟเดตของ the dead time value ในขณะที่ the DMA2D กำลังรันจะถูกนำมาพิจารณาสำหรับ the next AHB transfer.
Title: Re: STM32F7 9 Chrom-ART Accelerator™ controller (DMA2D)
Post by: tha on November 06, 2022, 02:22:33 PM
9.4 DMA2D interrupts

An interrupt สามารถถูกสร้างบน the following events:
•   Configuration error
•   CLUT transfer complete
•   CLUT access error
•   Transfer watermark ถูกถึง
•   Transfer complete
•   Transfer error

interrupt enable bits ที่แยกกันมีให้ใช้งานเพื่อความยืดหยุ่น.

(https://i.imgur.com/QIXzFZe.png)
Title: Re: STM32F7 9 Chrom-ART Accelerator™ controller (DMA2D)
Post by: tha on November 07, 2022, 07:32:55 AM
9.5 DMA2D registers

9.5.1 DMA2D control register (DMA2D_CR)

Address offset: 0x0000
Reset value: 0x0000 0000

(https://i.imgur.com/VkWfMSW.png)

Bits 31:18 Reserved, must be kept at reset value

Bits 17:16 MODE[1:0]: DMA2D mode
     บิตเหล่านี้ถูกเซ็ตและถูกเคลียร์โดย software. พวกมันไม่สามารถถูกแก้ไขในขณะที่ a transfer กำลังดำเนินการอยู่.
     00: Memory-to-memory (FG fetch only)
     01: Memory-to-memory พร้อมด้วย PFC (FG fetch เท่านั้น พร้อมด้วย FG PFC active)
     10: Memory-to-memory พร้อมด้วยการผสม (FG and BG fetch พร้อด้วย PFC และการผสม)
     11: Register-to-memory (ไม่มี FG และไม่มี BG, เฉพาะ output stage ที่ทำงาน)

Bits 15:14 Reserved, must be kept at reset value

Bit 13 CEIE: Configuration Error Interrupt Enable
     บิตนี้ถูกเซ็ตและถูกเคลียร์โดย software.
     0: CE interrupt disable
     1: CE interrupt enable

Bit 12 CTCIE: CLUT transfer complete interrupt enable
     This bit is set and cleared by software.
     0: CTC interrupt disable
     1: CTC interrupt enable

Bit 11 CAEIE: CLUT access error interrupt enable
     This bit is set and cleared by software.
     0: CAE interrupt disable
     1: CAE interrupt enable

Bit 10 TWIE: Transfer watermark interrupt enable
     This bit is set and cleared by software.
     0: TW interrupt disable
     1: TW interrupt enable

Bit 9 TCIE: Transfer complete interrupt enable
     This bit is set and cleared by software.
     0: TC interrupt disable
     1: TC interrupt enable

Bit 8 TEIE: Transfer error interrupt enable
     This bit is set and cleared by software.
     0: TE interrupt disable
     1: TE interrupt enable
Title: Re: STM32F7 9 Chrom-ART Accelerator™ controller (DMA2D)
Post by: tha on November 07, 2022, 08:42:58 AM
Bits 7:3 Reserved, must be kept at reset value

Bit 2 ABORT: Abort
     บิตนี้สามารถถูกใช้เพื่อยกเลิก the current transfer. บิตนี้ถูกเซ็ตโดย software และถูกรีเซ็ตโดยอัตโนมัติโดย hardware เมื่อ the
     START bit ถูกรีเซ็ต.
     0: ไม่มีการยกเลิกการส่งถ่ายถูกร้องขอ
     1: การยกเลิกการส่งถ่ายถูกร้องขอ

Bit 1 SUSP: Suspend
     บิตนี้สามารถถูกใช้เพื่อระงับค้างไว้ the current transfer. บิตนี้ถูกเซ็ตและรีเซ็ตโดย software. มันถูกรีเซ็ตโดยอัตโนมัติโดย
     hardware เมื่อ the START bit ถูกรีเซ็ต.
     0: Transfer ไม่ถูกระงับค้างไว้
     1: Transfer ถูกระงับค้างไว้

Bit 0 START: Start
     บิตนี้สามารถถูกใช้เพื่อเริ่ม the DMA2D ตาม the parameters ที่โหลดลงใน the various configuration registers.
     บิตนี้ถูกรีเซ็ตโดยอัตโนมัติโดย the following events:
        –   ที่ the end of the transfer
        –   เมื่อ the data transfer ถูกยกเลิกโดย the user application โดยการเซ็ต the ABORT bit in DMA2D_CR
        –   เมื่อ a data transfer error เกิดขึ้น
        –   เมื่อ the data transfer ไม่สตาร์ทเนื่องจาก a configuration error หรือ another transfer operation กำลังดำเนินการอยู่
             แล้ว (automatic CLUT loading).
Title: Re: STM32F7 9 Chrom-ART Accelerator™ controller (DMA2D)
Post by: tha on November 07, 2022, 10:04:26 AM
9.5.2 DMA2D Interrupt Status Register (DMA2D_ISR)

Address offset: 0x0004
Reset value: 0x0000 0000

(https://i.imgur.com/NfZPF8N.png)

Bits 31:6 Reserved, must be kept at reset value

Bit 5 CEIF: Configuration error interrupt flag
     บิตนี้ถูกเซ็ตเมื่อ the START bit of DMA2D_CR, DMA2DFGPFCCR หรือ DMA2D_BGPFCCR ถูกเซ็ตและ a wrong
     configuration ได้ถูกโปรแกรมไว้แล้ว.

Bit 4 CTCIF: CLUT transfer complete interrupt flag
      บิตนี้ถูกเซ็ตเมื่อ the CLUT คัดลอกจาก a system memory area ไปยัง the internal DMA2D memory เสร็จสมบูรณ์.

Bit 3 CAEIF: CLUT access error interrupt flag
     บิตนี้ถูกเซ็ตเมื่อ the CPU เข้าถึง the CLUT ในขณะที่ the CLUT กำลังถูกคัดลอกโดยอัตโนมัติจาก a system memory ไปยัง the
     internal DMA2D.

Bit 2 TWIF: Transfer watermark interrupt flag
     บิตนี้ถูกเซ็ตเมื่อ the last pixel of the watermarked line ถูกส่งถ่ายแล้ว.

Bit 1 TCIF: Transfer complete interrupt flag
     บิตนี้ถูกเซ็ตเมื่อ a DMA2D transfer operation เสร็จสมบูรณ์ (data transfer เท่านั้น).

Bit 0 TEIF: Transfer error interrupt flag
     บิตนี้ถูกเซ็ตเมื่อ an error เกิดขึ้นในระหว่าง a DMA transfer (data transfer หรือ automatic CLUT loading).
Title: Re: STM32F7 9 Chrom-ART Accelerator™ controller (DMA2D)
Post by: tha on November 07, 2022, 10:21:58 AM
9.5.3 DMA2D interrupt flag clear register (DMA2D_IFCR)

Address offset: 0x0008
Reset value: 0x0000 0000

(https://i.imgur.com/EVRPtm5.png)

Bits 31:6 Reserved, must be kept at reset value

Bit 5 CCEIF: Clear configuration error interrupt flag
     การโปรแกรมบิตนี้เป็น 1 จะเคลียร์ the CEIF flag ใน the DMA2D_ISR register

Bit 4 CCTCIF: Clear CLUT transfer complete interrupt flag
     Programming this bit to 1 clears the CTCIF flag in the DMA2D_ISR register

Bit 3 CAECIF: Clear CLUT access error interrupt flag
     Programming this bit to 1 clears the CAEIF flag in the DMA2D_ISR register

Bit 2 CTWIF: Clear transfer watermark interrupt flag
     Programming this bit to 1 clears the TWIF flag in the DMA2D_ISR register

Bit 1 CTCIF: Clear transfer complete interrupt flag
     Programming this bit to 1 clears the TCIF flag in the DMA2D_ISR register

Bit 0 CTEIF: Clear Transfer error interrupt flag
     Programming this bit to 1 clears the TEIF flag in the DMA2D_ISR register
Title: Re: STM32F7 9 Chrom-ART Accelerator™ controller (DMA2D)
Post by: tha on November 07, 2022, 11:05:59 AM
9.5.4 DMA2D foreground memory address register (DMA2D_FGMAR)

Address offset: 0x000C
Reset value: 0x0000 0000

(https://i.imgur.com/AkaAcXk.png)

Bits 31:0 MA[31: 0]: Memory address
     Address of the data ที่ใช้สำหรับ the foreground image. register นี้สามารถถูกเขียนเฉพาะเมื่อ data transfers ถูกปิดใช้งาน.
     ทันทีที่ the data transfer สตาร์ทแล้ว, register นี้จะอ่านได้เพียงอย่างเดียว.
     The address alignment ต้องตรงกันกับ the image format ที่เลือก อย่างเช่น a 32-bit ต่อ pixel format ต้องถูกวางแนว 32-
     bit, a 16-bit ต่อ pixel format ต้องถูกวางแนว 16-bit และ a 4-bit ต่อ pixel format ต้องถูกวางแนว 8-bit.
Title: Re: STM32F7 9 Chrom-ART Accelerator™ controller (DMA2D)
Post by: tha on November 07, 2022, 11:19:30 AM
9.5.5 DMA2D foreground offset register (DMA2D_FGOR)

Address offset: 0x0010
Reset value: 0x0000 0000

(https://i.imgur.com/HgjePBJ.png)

Bits 31:14 Reserved, must be kept at reset value

Bits 13:0 LO[13: 0]: Line offset
     Line offset ที่ใช้สำหรับ the foreground แสดงเป็น pixel. ค่านี้ถูกใช้เพื่อสร้าง the address. มันถูกเพิ่มที่ the end ของแต่ละ line
     เพื่อกำหนด the starting address of the next line.
     บิตเหล่านี้สามารถถูกเขียนเฉาพะเมื่อ data transfers ถูกปิดใช้งาน. ทันทีที่ the data transfer สตาร์ทแล้ว, พวกมันนี้จะอ่านได้เพียง
     อย่างเดียว.
     ถ้า the image format คือ 4-bit per pixel, the line offset ต้องเป็นเลขคู่.
Title: Re: STM32F7 9 Chrom-ART Accelerator™ controller (DMA2D)
Post by: tha on November 07, 2022, 11:26:36 AM
9.5.6 DMA2D background memory address register (DMA2D_BGMAR)

Address offset: 0x0014
Reset value: 0x0000 0000

(https://i.imgur.com/CakrcRk.png)

Bits 31:0 MA[31: 0]: Memory address
     Address of the data ที่ใช้สำหรับ the background image. register นี้สามารถถูกเขียนเฉพาะเมื่อ data transfers ถูกปิดใช้งาน.
     ทันทีที่ the data transfer สตาร์ทแล้ว, register นี้จะอ่านได้เพียงอย่างเดียว.
     The address alignment ต้องตรงกันกับ the image format ที่เลือก อย่างเช่น a 32-bit ต่อ pixel format ต้องถูกวางแนว 32-
     bit, a 16-bit ต่อ pixel format ต้องถูกวางแนว 16-bit และ a 4-bit ต่อ pixel format ต้องถูกวางแนว 8-bit.
Title: Re: STM32F7 9 Chrom-ART Accelerator™ controller (DMA2D)
Post by: tha on November 07, 2022, 11:33:09 AM
9.5.7 DMA2D background offset register (DMA2D_BGOR)

Address offset: 0x0018
Reset value: 0x0000 0000

(https://i.imgur.com/1rVvWDw.png)

Bits 31:14 Reserved, must be kept at reset value

Bits 13:0 LO[13: 0]: Line offset
     Line offset ที่ใช้สำหรับ the background image (แสดงเป็น pixel). ค่านี้ถูกใช้สำหรับ the address generation. มันถูกเพิ่มที่
     the end ของแต่ละ line เพื่อกำหนด the starting address of the next line.
     บิตเหล่านี้สามารถถูกเขียนเฉพาะเมื่อ data transfers ถูกปิดใช้งาน. ทันทีที่ the data transfer สตาร์ทแล้ว, พวกมันนี้จะอ่านได้เพียง
     อย่างเดียว.
     ถ้า the image format คือ 4-bit per pixel, the line offset ต้องเป็นเลขคู่.
Title: Re: STM32F7 9 Chrom-ART Accelerator™ controller (DMA2D)
Post by: tha on November 07, 2022, 02:01:27 PM
9.5.8 DMA2D foreground PFC control register (DMA2D_FGPFCCR)

Address offset: 0x001C
Reset value: 0x0000 0000

(https://i.imgur.com/CnAfdfx.png)

Bits 31:24 ALPHA[7: 0]: Alpha value
     บิตเหล่านี้กำหนด a fixed alpha channel value ซึ่งสามารถแทนที่ the original alpha value หรือถูกคูณโดย the original
     alpha value ตาม the alpha mode ที่เลือกผ่านทาง the AM[1:0] bits.
     บิตเหล่านี้สามารถถูกเขียนเฉพาะเมื่อ data transfers ถูกปิดใช้งาน. ทันทีที่ the data transfer สตาร์ทแล้ว, พวกมันจะอ่านได้เพียง
     อย่างเดียว.

Bits 23:18 Reserved, must be kept at reset value

Bits 17:16 AM[1: 0]: Alpha mode
     บิตเหล่านี้เลือก the alpha channel value ที่จะถูกใช้สำหรับ the foreground image. พวกมันสามารถถูกเขียนเฉพาะเมื่อ data
     transfers ถูกปิดใช้งาน. ทันทีที่ the data transfer สตาร์ทแล้ว, พวกมันจะอ่านได้เพียงอย่างเดียว.
     00: ไม่มีการแก้ไขของ the foreground image alpha channel value
     01: แทนที่ original foreground image alpha channel value โดย ALPHA[7: 0]
     10: แทนที่ original foreground image alpha channel value โดย ALPHA[7:0] ที่คูณด้วย original alpha channel value
     การกำหนดค่าอื่นๆไม่มีความหมาย

Bits 15:8 CS[7: 0]: CLUT size
     บิตเหล่านี้กำหนดขนาดของ the CLUT ที่ใช้สำหรับ the foreground image. ทันทีที่ the CLUT transfer สตาร์ทแล้ว, ฟิลด์นี้จะอ่าน
     ได้เพียงอย่างเดียว.
     จำนวนของ CLUT entries จะเท่ากับ CS[7:0] + 1.

Bits 7:6 Reserved, must be kept at reset value
Title: Re: STM32F7 9 Chrom-ART Accelerator™ controller (DMA2D)
Post by: tha on November 07, 2022, 02:23:48 PM
Bit 5 START: Start
     บิตนี้สามารถถูกเซ็ตเพื่อสตาร์ท the automatic loading of the CLUT. มันจะถูกรีเซ็ตโดยอัตโนมัติ:
        –   ที่ the end of the transfer
        –   เมื่อ the data transfer ถูกยกเลิกโดย the user application โดยการเซ็ต the ABORT bit in DMA2D_CR
        –   เมื่อ a data transfer error เกิดขึ้น
        –   เมื่อ the data transfer ไม่สตาร์ทเนื่องจาก a configuration error หรือ another transfer operation กำลังดำเนินการอยู่
             แล้ว (data transfer หรือ automatic background CLUT transfer).

Bit 4 CCM: CLUT color mode
     บิตนี้กำหนด the color format of the CLUT. มันสามารถถูกเขียนเฉพาะเมื่อ the transfer ถูกปิดใช้งาน, ทันทีที่ the CLUT
     transfer สตาร์ทแล้ว, บิตนี้จะอ่านได้เพียงอย่างเดียว.
     0: ARGB8888
     1: RGB888
     อื่นๆ: ไม่มีความหมาย

Bits 3:0 CM[3: 0]: Color mode
     บิตเหล่านี้กำหนด the color format of the foreground image พวกมันสามารถถูกเขียนเฉพาะเมื่อ data transfers ถูกปิดใช้งาน.
     ทันทีที่ the data transfer สตาร์ทแล้ว, พวกมันจะอ่านได้เพียงอย่างเดียว.
     0000: ARGB8888
     0001: RGB888
     0010: RGB565
     0011: ARGB1555
     0100: ARGB4444
     0101: L8
     0110: AL44
     0111: AL88
     1000: L4
     1001: A8
     1010: A4
     อื่นๆ: ไม่มีความหมาย
Title: Re: STM32F7 9 Chrom-ART Accelerator™ controller (DMA2D)
Post by: tha on November 07, 2022, 02:37:04 PM
9.5.9 DMA2D foreground color register (DMA2D_FGCOLR)

Address offset: 0x0020
Reset value: 0x0000 0000

(https://i.imgur.com/dGBl2F8.png)

Bits 31:24 Reserved, must be kept at reset value

Bits 23:16 RED[7: 0]: Red Value
     บิตเหล่านี้กำหนด the red value สำรับ the A4 or A8 mode of the foreground image. พวกมันสามารถถูกเขียนเฉพาะเมื่อ data
     transfers ถูกปิดใช้งาน. ทันทีที่ the data transfer สตาร์ทแล้ว, พวกมันจะอ่านได้เพียงอย่างเดียว.

Bits 15:8 GREEN[7: 0]: Green Value
     These bits defines the green value for the A4 or A8 mode of the foreground image. They can only be written
     when data transfers are disabled. Once the transfer has started, They are read-only.

Bits 7:0 BLUE[7: 0]: Blue Value
     These bits defines the blue value for the A4 or A8 mode of the foreground image. They can only be written
     when data transfers are disabled. Once the transfer has started, They are read-only.
Title: Re: STM32F7 9 Chrom-ART Accelerator™ controller (DMA2D)
Post by: tha on November 07, 2022, 03:09:53 PM
9.5.10 DMA2D background PFC control register (DMA2D_BGPFCCR)

Address offset: 0x0024
Reset value: 0x0000 0000

(https://i.imgur.com/1AjtBqO.png)

Bits 31:24 ALPHA[7: 0]: Alpha value
     บิตเหล่านี้กำหนด a fixed alpha channel value ซึ่งสามารถแทนที่ the original alpha value หรือถูกคูณโดย the original
     alpha value ตาม the alpha mode ที่เลือกด้วย the AM[1:0] bits. บิตเหล่านี้สามารถถูกเขียนเฉพาะเมื่อ data transfers ถูกปิด
     ใช้งาน. ทันทีที่ the data transfer สตาร์ทแล้ว, พวกมันจะอ่านได้เพียงอย่างเดียว.

Bits 23:18 Reserved, must be kept at reset value

Bits 17:16 AM[1: 0]: Alpha mode
     บิตเหล่านี้เลือก the alpha channel value ที่จะถูกใช้สำหรับ the background image. พวกมันสามารถถูกเขียนเฉพาะเมื่อ data
     transfers ถูกปิดใช้งาน. ทันทีที่ the data transfer สตาร์ทแล้ว, พวกมันจะอ่านได้เพียงอย่างเดียว.
     00: ไม่มีการแก้ไขของ the foreground image alpha channel value
     01: แทนที่ original background image alpha channel value โดย ALPHA[7: 0]
     10: แทนที่ original background image alpha channel value โดย ALPHA[7:0] ที่คูณด้วย original alpha channel value
     การกำหนดค่าอื่นๆไม่มีความหมาย

Bits 15:8 CS[7: 0]: CLUT size
     บิตเหล่านี้กำหนดขนาดของ the CLUT ที่ใช้สำหรับ the BG. ทันทีที่ the CLUT transfer สตาร์ทแล้ว, ฟิลด์นี้จะอ่านได้เพียงอย่าง
     เดียว.
     จำนวนของ CLUT entries จะเท่ากับ CS[7:0] + 1.

Bits 7:6 Reserved, must be kept at reset value

Bit 5 START: Start
     บิตนี้สามารถถูกเซ็ตเพื่อสตาร์ท the automatic loading of the CLUT. มันจะถูกรีเซ็ตโดยอัตโนมัติ:
        –   ที่ the end of the transfer
        –   เมื่อ the data transfer ถูกยกเลิกโดย the user application โดยการเซ็ต the ABORT bit in DMA2D_CR
        –   เมื่อ a data transfer error เกิดขึ้น
        –   เมื่อ the data transfer ไม่สตาร์ทเนื่องจาก a configuration error หรือ another transfer operation กำลังดำเนินการอยู่
             แล้ว (data transfer หรือ automatic foreground CLUT transfer).

Bit 4 CCM: CLUT color mode
     บิตนี้กำหนด the color format of the CLUT. มันสามารถถูกเขียนเฉพาะเมื่อ the transfer ถูกปิดใช้งาน, ทันทีที่ the CLUT
     transfer สตาร์ทแล้ว, บิตนี้จะอ่านได้เพียงอย่างเดียว.
     0: ARGB8888
     1: RGB888
     อื่นๆ: ไม่มีความหมาย

Bits 3:0 CM[3: 0]: Color mode
     บิตเหล่านี้กำหนด the color format of the foreground image พวกมันสามารถถูกเขียนเฉพาะเมื่อ data transfers ถูกปิดใช้งาน.
     ทันทีที่ the data transfer สตาร์ทแล้ว, พวกมันจะอ่านได้เพียงอย่างเดียว.
     0000: ARGB8888
     0001: RGB888
     0010: RGB565
     0011: ARGB1555
     0100: ARGB4444
     0101: L8
     0110: AL44
     0111: AL88
     1000: L4
     1001: A8
     1010: A4
     อื่นๆ: ไม่มีความหมาย
Title: Re: STM32F7 9 Chrom-ART Accelerator™ controller (DMA2D)
Post by: tha on November 07, 2022, 03:29:28 PM
9.5.11 DMA2D background color register (DMA2D_BGCOLR)

Address offset: 0x0028
Reset value: 0x0000 0000

(https://i.imgur.com/IXoD2g8.png)

Bits 31:24 Reserved, must be kept at reset value

Bits 23:16 RED[7: 0]: Red Value
     บิตเหล่านี้กำหนด the red value สำหรับ the A4 or A8 mode of the background. พวกมันสามารถถูกเขียนเฉพาะเมื่อ data
     transfers ถูกปิดใช้งาน. ทันทีที่ the data transfer สตาร์ทแล้ว, พวกมันจะอ่านได้เพียงอย่างเดียว.

Bits 15:8 GREEN[7: 0]: Green Value
     These bits defines the green value for the A4 or A8 mode of the background. They can only be written when
     data transfers are disabled. Once the transfer has started, They are read-only.

Bits 7:0 BLUE[7: 0]: Blue Value
     These bits defines the blue value for the A4 or A8 mode of the background. They can only be written when
     data transfers are disabled. Once the transfer has started, They are read-only.
Title: Re: STM32F7 9 Chrom-ART Accelerator™ controller (DMA2D)
Post by: tha on November 07, 2022, 03:39:14 PM
9.5.12 DMA2D foreground CLUT memory address register
(DMA2D_FGCMAR)


Address offset: 0x002C
Reset value: 0x0000 0000

(https://i.imgur.com/FbA3vpn.png)

Bits 31: 0 MA[31: 0]: Memory Address
     Address of the data ที่ใช้สำหรับ the CLUT address ที่อุทิศให้กับ the foreground image. register นี้สามารถถูกเขียนเฉพาะ
     เมื่อไม่มี transfer กำลังดำเนินการอยู่. ทันทีที่ the CLUT transfer สตาร์ทแล้ว, register นี้จะอ่านได้เพียงอย่างเดียว.
     ถ้า the foreground CLUT format เป็น 32-bit, the address ต้องถูกวางแนว 32-bit.
Title: Re: STM32F7 9 Chrom-ART Accelerator™ controller (DMA2D)
Post by: tha on November 07, 2022, 03:58:24 PM
9.5.13 DMA2D background CLUT memory address register
(DMA2D_BGCMAR)


Address offset: 0x0030
Reset value: 0x0000 0000

(https://i.imgur.com/cGY5BxG.png)

Bits 31: 0 MA[31: 0]: Memory Address
     Address of the data ที่ใช้สำหรับ the CLUT address ที่อุทิศให้กับ the background image. register นี้สามารถถูกเขียนเฉพาะ
     เมื่อไม่มี transfer กำลังดำเนินการอยู่. ทันทีที่ the CLUT transfer สตาร์ทแล้ว, register นี้จะอ่านได้เพียงอย่างเดียว.
     ถ้า the background CLUT format เป็น 32-bit, the address ต้องถูกวางแนว 32-bit.
Title: Re: STM32F7 9 Chrom-ART Accelerator™ controller (DMA2D)
Post by: tha on November 07, 2022, 04:05:22 PM
9.5.14 DMA2D output PFC control register (DMA2D_OPFCCR)

Address offset: 0x0034
Reset value: 0x0000 0000

(https://i.imgur.com/ckHetyI.png)

Bits 31: 3 Reserved, must be kept at reset value

Bits 19:3 Reserved, must be kept at reset value

Bits 2:0 CM[2: 0]: Color mode
     บิตเหล่านี้กำหนด the color format of the output image. บิตเหล่านี้สามารถถูกเขียนเฉพาะเมื่อ data transfers ถูกปิดใช้งาน.
     ทันทีที่ the transfer สตาร์ทแล้ว, พวกมันจะอ่านได้เพียงอย่างเดียว.
     000: ARGB8888
     001: RGB888
     010: RGB565
     011: ARGB1555
     100: ARGB4444
     อื่นๆ: ไม่มีความหมาย
Title: Re: STM32F7 9 Chrom-ART Accelerator™ controller (DMA2D)
Post by: tha on November 07, 2022, 04:13:08 PM
9.5.15 DMA2D output color register (DMA2D_OCOLR)

Address offset: 0x0038
Reset value: 0x0000 0000

(https://i.imgur.com/WzklPND.png)

Bits 31:24 ALPHA[7: 0]: Alpha Channel Value
      บิตเหล่านี้กำหนด the alpha channel of the output color. บิตเหล่านี้สามารถถูกเขียนเฉพาะเมื่อ data transfers ถูกปิดใช้งาน.
      ทันทีที่ the transfer สตาร์ทแล้ว, พวกมันจะอ่านได้เพียงอย่างเดียว.

Bits 23:16 RED[7: 0]: Red Value
     These bits define the red value of the output image. These bits can only be written when data transfers are
     disabled. Once the transfer has started, they are read-only.

Bits 15:8 GREEN[7: 0]: Green Value
     These bits define the green value of the output image. These bits can only be written when data transfers are
     disabled. Once the transfer has started, they are read-only.

Bits 7:0 BLUE[7: 0]: Blue Value
     These bits define the blue value of the output image. These bits can only be written when data transfers are
     disabled. Once the transfer has started, they are read-only.
Title: Re: STM32F7 9 Chrom-ART Accelerator™ controller (DMA2D)
Post by: tha on November 07, 2022, 04:20:20 PM
9.5.16 DMA2D output memory address register (DMA2D_OMAR)

Address offset: 0x003C
Reset value: 0x0000 0000

(https://i.imgur.com/HRKPZ11.png)

Bits 31: 0 MA[31: 0]: Memory Address
     Address of the data ที่ใช้สำหรับ the output FIFO. บิตเหล่านี้สามารถถูกเขียนเฉพาะเมื่อ data transfers ถูกปิดใช้งาน. ทันทีที่
     the transfer สตาร์ทแล้ว, พวกมันจะอ่านได้เพียงอย่างเดียว.
     The address alignment ต้องตรงกันกับ the image format ที่เลือก อย่างเช่น a 32-bit ต่อ pixel format ต้องถูกวางแนว 32-
     bit, a 16-bit ต่อ pixel format ต้องถูกวางแนว 16-bit.
Title: Re: STM32F7 9 Chrom-ART Accelerator™ controller (DMA2D)
Post by: tha on November 07, 2022, 04:27:17 PM
9.5.17 DMA2D output offset register (DMA2D_OOR)

Address offset: 0x0040
Reset value: 0x0000 0000

(https://i.imgur.com/da3g4Vu.png)

Bits 31:14 Reserved, must be kept at reset value

Bits 13:0 LO[13: 0]: Line Offset
     Line offset ที่ใช้สำหรับ the output (แสดงเป็น pixel). ค่านี้ถูกใช้สำหรับ the address generation. มันถูกเพิ่มที่ the end ของ
     แต่ละ line เพื่อกำหนด the starting address of the next line. บิตเหล่านี้สามารถถูกเขียนเฉาพะเมื่อ data transfers ถูกปิดใช้
     งาน. ทันทีที่ the data transfer สตาร์ทแล้ว, พวกมันนี้จะอ่านได้เพียงอย่างเดียว.
Title: Re: STM32F7 9 Chrom-ART Accelerator™ controller (DMA2D)
Post by: tha on November 07, 2022, 05:20:45 PM
9.5.18 DMA2D number of line register (DMA2D_NLR)

Address offset: 0x0044
Reset value: 0x0000 0000

(https://i.imgur.com/YMjRobu.png)

Bits 31:30 Reserved, must be kept at reset value

Bits 29:16 PL[13: 0]: Pixel per lines
     จำนวนของ pixels ต่อ lines of the area ที่จะถูกส่งถ่าย.  บิตเหล่านี้สามารถถูกเขียนเฉพาะเมื่อ data transfers ถูกปิดใช้งาน. ทันทีที่
     the transfer สตาร์ทแล้ว, พวกมันนี้จะอ่านได้เพียงอย่างเดียว.
     ถ้าใดๆของ the input image format เป็น 4-bit per pixel, pixel per lines ต้องเป็นเลขคู่.

Bits 15:0 NL[15: 0]: Number of lines
     จำนวนของ lines of the area ที่จะถูกส่งถ่าย.  บิตเหล่านี้สามารถถูกเขียนเฉพาะเมื่อ data transfers ถูกปิดใช้งาน. ทันทีที่ the
     transfer สตาร์ทแล้ว, พวกมันนี้จะอ่านได้เพียงอย่างเดียว.
Title: Re: STM32F7 9 Chrom-ART Accelerator™ controller (DMA2D)
Post by: tha on November 07, 2022, 05:26:45 PM
9.5.19 DMA2D line watermark register (DMA2D_LWR)

Address offset: 0x0048
Reset value: 0x0000 0000

(https://i.imgur.com/MDKxTRn.png)

Bits 31:16 Reserved, must be kept at reset value

Bits 15:0 LW[15:0]: Line watermark
     บิตเหล่านี้อนุญาตให้กำหนดค่า the line watermark สำหรับ interrupt generation.
     An interrupt จะถูกทำให้พุ่งขึ้น(เป็น 1)เมื่อ the last pixel of the watermarked line ถูกส่งถ่ายแล้ว.
     บิตเหล่านี้สามารถถูกเขียนเฉพาะเมื่อ data transfers ถูกปิดใช้งาน. ทันทีที่ the transfer สตาร์ทแล้ว, พวกมันนี้จะอ่านได้เพียงอย่าง
     เดียว.
Title: Re: STM32F7 9 Chrom-ART Accelerator™ controller (DMA2D)
Post by: tha on November 07, 2022, 05:35:07 PM
9.5.20 DMA2D AHB master timer configuration register (DMA2D_AMTCR)

Address offset: 0x004C
Reset value: 0x0000 0000

(https://i.imgur.com/WsvKPbt.png)

Bits 31:16 Reserved

Bits 15:8 DT[7: 0]: Dead Time
     Dead time value ใน the AHB clock cycle ที่แทรกระหว่างสองการเข้าถึงที่ติดต่อกันบน the AHB master port. บิตเหล่านี้แสดง
     จำนวนที่บประกันต่ำสุดของ cycles ระหว่างสองการเข้าถึง AHB ที่ติดต่อกัน.

Bits 7:1 Reserved

Bit 0 EN: Enable
     เปิดใช้งาน the dead time functionality.
Title: Re: STM32F7 9 Chrom-ART Accelerator™ controller (DMA2D)
Post by: tha on November 07, 2022, 05:40:49 PM
(https://i.imgur.com/cGw7Qty.png)
(https://i.imgur.com/okKQUmP.png)
(https://i.imgur.com/kzCBDKj.png)