STM32F7 9 Chrom-ART Accelerator™ controller (DMA2D)

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

Previous topic - Next topic

tha

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).

tha

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.

tha

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 ที่แยกกันมีให้ใช้งานเพื่อความยืดหยุ่น.



tha

9.5 DMA2D registers

9.5.1 DMA2D control register (DMA2D_CR)

Address offset: 0x0000
Reset value: 0x0000 0000



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

tha

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).

tha

9.5.2 DMA2D Interrupt Status Register (DMA2D_ISR)

Address offset: 0x0004
Reset value: 0x0000 0000



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).

tha

9.5.3 DMA2D interrupt flag clear register (DMA2D_IFCR)

Address offset: 0x0008
Reset value: 0x0000 0000



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

tha

9.5.4 DMA2D foreground memory address register (DMA2D_FGMAR)

Address offset: 0x000C
Reset value: 0x0000 0000



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.