9.3.5 DMA2D foreground and background CLUT interfaceThe 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.
