STM32F7 18 LCD-TFT display controller (LTDC)

Started by tha, December 08, 2022, 08:38:41 AM

Previous topic - Next topic

tha

18.7.10 LTDC Interrupt Clear Register (LTDC_ICR)

Address offset: 0x3C
Reset value: 0x0000 0000



Bits 31:4 Reserved, must be kept at reset value.

Bit 3 CRRIF: clears register reload interrupt flag
     0: ไม่มีผลอะไร
     1: เคลียร์ the RRIF flag ใน the LTDC_ISR register

Bit 2 CTERRIF: clears the transfer error interrupt flag
     0: no effect
     1: clears the TERRIF flag in the LTDC_ISR register.

Bit 1 CFUIF: clears the FIFO underrun interrupt flag
     0: no effect
     1: clears the FUDERRIF flag in the LTDC_ISR register.

Bit 0 CLIF: clears the line interrupt flag
     0: no effect
     1: clears the LIF flag in the LTDC_ISR register.

tha

18.7.11 LTDC line interrupt position configuration register (LTDC_LIPCR)

รีจีสเตอร์นี้กำหนดตำแหน่งของ the line interrupt. The line value ที่ถูกโปรแกรมขึ้นอยู่กับ the timings parameters. ดูที่ Figure 112.

Address offset: 0x40
Reset value: 0x0000 0000



Bits 31:11 Reserved, must be kept at reset value.

Bits 10:0 LIPOS[10:0]: line interrupt position
     บิตเหล่านี้กำหนดค่า the line interrupt position.

tha

18.7.12 LTDC current position status register (LTDC_CPSR)

Address offset: 0x44
Reset value: 0x0000 0000



Bits 31:16 CXPOS[15:0]: current X position
     บิตเหล่านี้ส่งคืนกลับ the current X position.

Bits 15:0 CYPOS[15:0]: current Y position
     บิตเหล่านี้ส่งคืนกลับ the current Y position.


tha

18.7.13 LTDC current display status register (LTDC_CDSR)

รีจีสเตอร์นี้ส่งคืนกลับ the status of the current display phase ซึ่งถูกควบคุมโดย the HSYNC, VSYNC, และ horizontal/vertical DE signals.

ตัวอย่าง: ถ้า the current display phase คือ the vertical synchronization, the VSYNCS bit จะถูกเซ็ต (active high). ถ้า the current display phase คือ the horizontal synchronization, the HSYNCS bit จะ active high.

Address offset: 0x48
Reset value: 0x0000 000F



Bits 31:4 Reserved, must be kept at reset value.

Bit 3 HSYNCS: horizontal synchronization display status
     0: active low
     1: active high

Bit 2 VSYNCS: vertical synchronization display status
     0: active low
     1: active high

Bit 1 HDES: horizontal data enable display status
     0: active low
     1: active high

Bit 0 VDES: vertical data enable display status
     0: active low
     1: active high

Note:  The returned status ไม่ได้ขึ้นอยู่กับ the configured polarity ใน the LTDC_GCR register, มันส่งคืนกลับ the current
           active display phase แทน.

tha

18.7.14 LTDC layer x control register (LTDC_LxCR)

Address offset: 0x84 + 0x80 * (x - 1), (x = 1 to 2)
Reset value: 0x0000 0000



Bits 31:5 Reserved, must be kept at reset value.

Bit 4 CLUTEN: color look-up table enable
     บิตนี้ถูกเซ็ตและถูกเคลียร์โดย software.
     0: color look-up table disable
     1: color look-up table enable
     The CLUT มีเป้าหมายเฉพาะสำหรับ L8, AL44 and AL88 pixel format. ดูที่ Color look-up table (CLUT)

Bits 3:2 Reserved, must be kept at reset value.

Bit 1 COLKEN: color keying enable
     This bit is set and cleared by software.
     0: color keying disable
     1: color keying enable

Bit 0 LEN: layer enable
     This bit is set and cleared by software.
     0: layer disable
     1: layer enable

tha

18.7.15 LTDC layer x window horizontal position configuration register
(LTDC_LxWHPCR)


รีจีสเตอร์นี้กำหนด the horizontal position (first and last pixel) ของ the layer 1 or 2 window.

The first visible pixel of a line คือค่าที่โปรแกรมของ AHBP[11:0] bits + 1 ใน the LTDC_BPCR register.

The last visible pixel of a line คือค่าที่โปรแกรมของ AAW[10:0] bits ใน the LTDC_AWCR register.

Address offset: 0x88 + 0x80 * (x - 1), (x = 1 to 2)
Reset value: 0x0000 0000



Bits 31:28 Reserved, must be kept at reset value.

Bits 27:16 WHSPPOS[11:0]: window horizontal stop position
     บิตเหล่านี้กำหนดค่า the last visible pixel of a line of the layer window.
     WHSPPOS[11:0] ต้อง ≥ AHBP[11:0] bits + 1 (ที่โปรแกรมใน LTDC_BPCR register).

Bits 15:12 Reserved, must be kept at reset value.

Bits 11:0 WHSTPOS[11:0]: window horizontal start position
     บิตเหล่านี้กำหนดค่า the first visible pixel of a line of the layer window.
     WHSTPOS[11:0] ต้อง ≤ AAW[11:0] bits (ที่โปรแกรมใน LTDC_AWCR register).

Example:

The LTDC_BPCR register  ถูกกำหนดค่าเป็น 0x000E0005 (AHBP[11:0] คือ 0xE) และ the LTDC_AWCR register ถูกกำหนดค่าเป็น 0x028E01E5 (AAW[11:0] คือ 0x28E). เพื่อกำหนดค่า the horizontal position of a window size of 630x460, ด้วย horizontal start offset of 5 pixels ใน the active data area:
1.   layer window first pixel, WHSTPOS[11:0], ต้องถูกโปรแกรมเป็น 0x14 (0xE+1+0x5)
2.   layer window last pixel, WHSPPOS[11:0], ต้องถูกโปรแกรมเป็น 0x28A.

tha

18.7.16 LTDC layer x window vertical position configuration register
(LTDC_LxWVPCR)


รีจีสเตอร์นี้กำหนด the vertical position (first and last line) of the layer1 or 2 window.

The first visible line of a frame คือค่าที่โปรแกรมของ AVBP[10:0] bits + 1 ใน the register LTDC_BPCR register.

The last visible line of a frame คือค่าที่โปรแกรมของ AAH[10:0] bits ใน the LTDC_AWCR register.

Address offset: 0x8C + 0x80 * (x - 1), (x = 1 to 2)
Reset value: 0x0000 0000



Bits 31:27 Reserved, must be kept at reset value.

Bits 26:16 WVSPPOS[10:0]: window vertical stop position
     บิตเหล่านี้กำหนดค่า the last visible line of the layer window.
     WVSPPOS[10:0] ต้อง ≥ AVBP[10:0] bits + 1 (ที่โปรแกรมใน LTDC_BPCR register).

Bits 15:11 Reserved, must be kept at reset value.

Bits 10:0 WVSTPOS[10:0]: window vertical start position
     บิตเหล่านี้กำหนดค่า the first visible line of the layer window.
     WVSTPOS[10:0] ต้อง ≤ AAH[10:0] bits (ที่โปรแกรมใน LTDC_AWCR register).

Example:

The LTDC_BPCR register ถูกกำหนดค่าเป็น 0x000E0005 (AVBP[10:0] คือ 0x5) และ the LTDC_AWCR register ถูกกำหนดค่าเป็น 0x028E01E5 (AAH[10:0] คือ 0x1E5).

เพื่อกำหนดค่า the vertical position of a window size of 630x460, ด้วย vertical start offset of 8 lines ใน the active data area:
1.   layer window first line: WVSTPOS[10:0] ต้องถูกโปรแกรมเป็น 0xE (0x5 + 1 + 0x8).
2.   layer window last line: WVSTPOS[10:0] ต้องถูกโปรแกรมเป็น 0x1DA.

tha

18.7.17 LTDC layer x color keying configuration register
(LTDC_LxCKCR)


รีจีสเตอร์นี้กำหนด the color key value (RGB), ที่ถูกใช้โดย the color keying.

Address offset: 0x90 + 0x80 * (x - 1), (x = 1 to 2)
Reset value: 0x0000 0000



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

Bits 23:16 CKRED[7:0]: color key red value

Bits 15:8 CKGREEN[7:0]: color key green value

Bits 7:0 CKBLUE[7:0]: color key blue value