MCUXpresso SDK Documentation

pxp_porter_duff

pxp_porter_duff#

Overview#

This example shows how to use the PXP Porter Duff compositing. In this example, A blue rectangle is in the left up corner of the destination surface (also named PS surface, or s0 in reference mannal). A red rectangle is in the center of the source surface (also named AS surface, or s1 in reference mannal). Every Porter Duff mode result is shown 2 seconds, then switch to the other mode.

Supported Boards#

EVK9-MIMX8ULP
Hardware requirements
  • Micro USB cable

  • MIMX8ULP-EVK/EVK9 board

  • J-Link Debug Probe

  • 5V power supply

  • RK055AHD091(rm68200) panel or RK055MHD091(hx8394) panel

Board settings

Connect the MIPI panel to MIMX8ULP-EVK board J18.

Prepare the Demo
  1. Connect 5V power supply and J-Link Debug Probe to the board, switch SW10 to power on the board.

  2. Connect a micro USB cable between the host PC and the J17 USB port on the target board.

  3. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  4. Build example to generate sdk20-app.bin

  5. Generate flash.bin with imx-mkimage and download it according to Getting Started doc

  6. Open two serials lines provided at J17 USB port. (e.g. /dev/ttyUSB0~3, /dev/ttyUSB2 for A Core, /dev/ttyUSB3 for M Core)

  7. Press the reset button on your board and boot to uboot and let uboot not using diplay peripherals => setenv video_off yes;saveenv then re-power on the board

  8. Let Stop in Uboot.

Steps to configure the panels

RK055MHD091 panel is used by default and the default setting for APP_DISPLAY_EXTERNAL_CONVERTOR is disabled.

When Kconfig is used

Below setting is for kconfig, you can fix below settings in prj.conf under example folder For default panel, you do not need to change anything. For RK055AHD091(rm68200) panel: CONFIG_DEMO_PANEL_RK055AHD091=y

When package is used

Below setting is for mcux_config.h. For RK055AHD091(rm68200) panel: Setting DEMO_PANEL to 0 to choose RK055AHD091 panel.

Running the demo

When the example runs, the screen shows what described in overview. The log below shows the output of the demo in the terminal window:

PXP Porter Duff example start...
LCDIF pixel clock is: 66000000Hz
MIPI DSI tx_esc_clk frequency: 19800000Hz
MIPI DSI DPHY bit clock: 444000000Hz
Currently show PorterDuffSrc mode

Currently show PorterDuffAtop mode

Currently show PorterDuffOver mode

Currently show PorterDuffIn mode

Currently show PorterDuffOut mode

Currently show PorterDuffDst mode

Currently show PorterDuffDstAtop mode

Currently show PorterDuffDstOver mode

Currently show PorterDuffDstIn mode

Currently show PorterDuffDstOut mode

Currently show PorterDuffXor mode

Currently show PorterDuffClear mode
EVKB-IMXRT1050
Hardware requirements
  • Mini/micro USB cable

  • EVKB-IMXRT1050 board

  • Personal Computer

  • RK043FN02H-CT or RK043FN66HS-CT6 LCD board (RK043FN02H-CT and RK043FN66HS-CT6 are compatible)

Board settings
  1. Connect the RK043FN02H-CT or RK043FN66HS-CT6 to board.

Prepare the Demo
  1. Connect a USB cable between the host PC and the OpenSDA USB port on the target board.

  2. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

Running the demo

When the demo runs successfully, press any key in the terminal, the panel shows different porter duff mode result.

MIMXRT1060-EVKB
Hardware requirements
  • Mini/micro USB cable

  • MIMXRT1060-EVKB board

  • Personal Computer

  • RK043FN02H-CT or RK043FN66HS-CT6 LCD board (RK043FN02H-CT and RK043FN66HS-CT6 are compatible)

Board settings
  1. Connect the RK043FN02H-CT or RK043FN66HS-CT6 to board.

Prepare the Demo
  1. Connect a USB cable between the host PC and the OpenSDA USB port on the target board.

  2. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

Running the demo

When the demo runs successfully, press any key in the terminal, the panel shows different porter duff mode result.

MIMXRT1170-EVKB
Hardware requirements
  • Mini/micro USB cable

  • MIMXRT1170-EVKB board

  • Personal Computer

  • RK055MHD091 panel or RK055AHD091 panel or RK055IQH091 panel

Board settings

Connect the panel to J48 Connect 5V power to J43, set J38 to 1-2

Prepare the Demo
  1. Connect a USB cable between the host PC and the OpenSDA USB port on the target board.

  2. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Build the project, the project uses RK055MHD091 by default, to use other panels, set the coresponding panel DEMO_PANEL_xxx(without ‘_SUPPORT’) to y in prj.conf under board example folder before project generation. The supported panels can be found in examples_boards<board>\project_segments\display_support\Kconfig.prjseg. Or change the macro DEMO_PANEL in mcux_config.h of the project, which number represents which panel can be found in display_support.h and mcux_config.h

  4. Download the program to the target board.

  5. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

Running the demo

When the demo runs successfully, press any key in the terminal, the panel shows different porter duff mode result.

MIMXRT1060-EVKC
Hardware requirements
  • Mini/micro USB cable

  • MIMXRT1060-EVKC board

  • Personal Computer

  • RK043FN02H-CT or RK043FN66HS-CT6 LCD board (RK043FN02H-CT and RK043FN66HS-CT6 are compatible)

Board settings
  1. Connect the RK043FN02H-CT or RK043FN66HS-CT6 to board.

Prepare the Demo
  1. Connect a USB cable between the host PC and the OpenSDA USB port on the target board.

  2. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

Running the demo

When the demo runs successfully, press any key in the terminal, the panel shows different porter duff mode result.

EVK-MIMX8ULP
Hardware requirements
  • Micro USB cable

  • MIMX8ULP-EVK/EVK9 board

  • J-Link Debug Probe

  • 5V power supply

  • RK055AHD091(rm68200) panel or RK055MHD091(hx8394) panel

Board settings

Connect the MIPI panel to MIMX8ULP-EVK board J18.

Prepare the Demo
  1. Connect 5V power supply and J-Link Debug Probe to the board, switch SW10 to power on the board.

  2. Connect a micro USB cable between the host PC and the J17 USB port on the target board.

  3. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  4. Build example to generate sdk20-app.bin

  5. Generate flash.bin with imx-mkimage and download it according to Getting Started doc

  6. Open two serials lines provided at J17 USB port. (e.g. /dev/ttyUSB0~3, /dev/ttyUSB2 for A Core, /dev/ttyUSB3 for M Core)

  7. Press the reset button on your board and boot to uboot and let uboot not using diplay peripherals => setenv video_off yes;saveenv then re-power on the board

  8. Let Stop in Uboot.

Steps to configure the panels

RK055MHD091 panel is used by default and the default setting for APP_DISPLAY_EXTERNAL_CONVERTOR is disabled.

When Kconfig is used

Below setting is for kconfig, you can fix below settings in prj.conf under example folder For default panel, you do not need to change anything. For RK055AHD091(rm68200) panel: CONFIG_DEMO_PANEL_RK055AHD091=y

When package is used

Below setting is for mcux_config.h. For RK055AHD091(rm68200) panel: Setting DEMO_PANEL to 0 to choose RK055AHD091 panel.

Running the demo

When the example runs, the screen shows what described in overview. The log below shows the output of the demo in the terminal window:

PXP Porter Duff example start...
LCDIF pixel clock is: 66000000Hz
MIPI DSI tx_esc_clk frequency: 19800000Hz
MIPI DSI DPHY bit clock: 444000000Hz
Currently show PorterDuffSrc mode

Currently show PorterDuffAtop mode

Currently show PorterDuffOver mode

Currently show PorterDuffIn mode

Currently show PorterDuffOut mode

Currently show PorterDuffDst mode

Currently show PorterDuffDstAtop mode

Currently show PorterDuffDstOver mode

Currently show PorterDuffDstIn mode

Currently show PorterDuffDstOut mode

Currently show PorterDuffXor mode

Currently show PorterDuffClear mode
FRDM-IMXRT1152
Hardware requirements
  • Type-C USB cable

  • FRDM-IMXRT1152 board

  • Personal Computer

  • RK055MHD091 panel or RK055AHD091 panel or RK055IQH091 panel

Board settings

Connect the panel to J62

Prepare the Demo
  1. Connect a USB cable between the host PC and the OpenSDA USB port on the target board.

  2. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Build the project, the project uses RK055MHD091 by default, to use other panels, set the coresponding panel DEMO_PANEL_xxx(without ‘_SUPPORT’) to y in prj.conf under board example folder before project generation. The supported panels can be found in examples_boards<board>\project_segments\display_support\Kconfig.prjseg. Or change the macro DEMO_PANEL in mcux_config.h of the project, which number represents which panel can be found in display_support.h and mcux_config.h

  4. Download the program to the target board.

  5. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

Running the demo

When the demo runs successfully, press any key in the terminal, the panel shows different porter duff mode result.

MIMXRT1040-EVK
Hardware requirements
  • Micro USB cable

  • MIMXRT1040-EVK board

  • RK043FN02H-CT or RK043FN66HS-CT6 LCD board

  • Personal Computer

Board settings
  1. Connect the RK043FN02H-CT or RK043FN66HS-CT6 to board.

Prepare the Demo
  1. Connect a USB cable between the host PC and the OpenSDA USB port on the target board.

  2. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Build the project, the project uses RK043FN66HS-CT6 by default, to use other panels, set the coresponding panel to y in prj.conf under board example folder before project generation. The supported panels can be found in examples_boards<board>\project_segments\display_support\Kconfig.prjseg. Or change the macro DEMO_PANEL in mcux_config.h of the project, which number represents which panel can be found in display_support.h and mcux_config.h

  4. Download the program to the target board.

  5. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

Running the demo

When the demo runs successfully, press any key in the terminal, the panel shows different porter duff mode result.

EVK-MIMXRT1064
Hardware requirements
  • Mini/micro USB cable

  • EVK-MIMXRT1064 board

  • Personal Computer

  • RK043FN02H-CT or RK043FN66HS-CT6 LCD board (RK043FN02H-CT and RK043FN66HS-CT6 are compatible)

Board settings
  1. Connect the RK043FN02H-CT or RK043FN66HS-CT6 to board.

Prepare the Demo
  1. Connect a USB cable between the host PC and the OpenSDA USB port on the target board.

  2. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

Running the demo

When the demo runs successfully, press any key in the terminal, the panel shows different porter duff mode result.

MIMXRT1160-EVK
Hardware requirements
  • Mini/micro USB cable

  • MIMXRT1160-EVK board

  • Personal Computer

  • RK055MHD091 panel or RK055AHD091 panel or RK055IQH091 panel

Board settings

Connect the panel to J48 Connect 5V power to J43, set J38 to 1-2

Prepare the Demo
  1. Connect a USB cable between the host PC and the OpenSDA USB port on the target board.

  2. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Build the project, the project uses RK055MHD091 by default, to use other panels, set the coresponding panel to y in prj.conf under board example folder before project generation. The supported panels can be found in examples_boards<board>\project_segments\display_support\Kconfig.prjseg. Or change the macro DEMO_PANEL in mcux_config.h of the project, which number represents which panel can be found in display_support.h and mcux_config.h

  4. Download the program to the target board.

  5. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

Running the demo

When the demo runs successfully, press any key in the terminal, the panel shows different porter duff mode result.

IMX943-EVK
Hardware requirements
  • Micro USB cable

  • IMX943-EVK board

  • J-Link Debug Probe

  • 12V~20V power supply

  • Personal Computer

  • LCD SPEC panel

Board settings

Connect the LCD SPEC panel to J38

Please note this application can’t support running with Linux BSP!
Prepare the Demo
  1. Connect 12V~20V power supply and J-Link Debug Probe to the board, switch SW1(SYS_PWR) to power on the board.

  2. Connect a micro USB cable between the host PC and the J15(FTDI_DEBUG) USB port on the target board.

  3. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  4. Download the program to the target board.

  5. Either re-power up your board or launch the debugger in your IDE to begin running the example

Running the demo

When the example runs, the screen shows what described in overview. The log below shows the output of the demo in the terminal window:

PXP Porter Duff example start...
Currently show PorterDuffSrc mode

Currently show PorterDuffAtop mode

Currently show PorterDuffOver mode

Currently show PorterDuffIn mode

Currently show PorterDuffOut mode

Currently show PorterDuffDst mode

Currently show PorterDuffDstAtop mode

Currently show PorterDuffDstOver mode

Currently show PorterDuffDstIn mode

Currently show PorterDuffDstOut mode

Currently show PorterDuffXor mode

Currently show PorterDuffClear mode