esp-idf/examples/peripherals/ppa/ppa_dsi
2024-08-02 16:34:21 +08:00
..
main change(examples): set the ili9881c version to 0.2.x 2024-08-02 16:34:21 +08:00
CMakeLists.txt feat(ppa): added ppa dsi example 2024-07-16 09:46:34 +08:00
pytest_ppa_dsi.py feat(ppa): added ppa dsi example 2024-07-16 09:46:34 +08:00
README.md feat(ppa): added ppa dsi example 2024-07-16 09:46:34 +08:00
sdkconfig.defaults feat(ppa): added ppa dsi example 2024-07-16 09:46:34 +08:00

Supported Targets ESP32-P4

PPA DSI example

Overview

This example demonstrates how to use the esp_driver_ppa component to process a given image and display it via DSI interface.

The example used image will be first scaled up, rotated at counter-clockwise direction and rotated back, mirrored and mirror back, and scaled down. Then the image will be blended with a whole red image with less transparency. Next the ESP32 word will be color-keyed out. Lastly a frame will be filled around the ESP32.

Usage

The subsections below give only absolutely necessary information. For full steps to configure ESP-IDF and use it to build and run projects, see ESP-IDF Getting Started.

Hardware Required

This example requires:

  • ILI9881C LCD screen

  • ESP32P4 devkit

                                                                GND
                                      ┌─────────────────────────────────────────────────────────┐
                                      │                                                         │
                                      │                                                         │
                                      │                                                         │
                                      │                                                         │
                                      │                                                         │
                                      │                                                         │
                                      │                                                         │
                                      │                                                         │
        ┌───────────────-─────────────┴──────────────────┐                                      │
        │                                                │                           ┌──────────┴───────────┐
        │                                                │      DSI DATA 1P          │                      │
        │                                                ├───────────────────────────┤                      │
        │                                                │                           │                      │
        │                                                │      DSI DATA 1N          │                      │
        │                                                ├───────────────────────────┤                      │
        │                  ESP32-P4                      │                           │                      │
        │                                                │      DSI CLK N            │      ILI9881C        │
        │                                                ├───────────────────────────┤                      │
        │                                                │                           │                      │
        │                                                │      DSI CLK P            │                      │
        │                                                ├───────────────────────────┤                      │
        │                                                │                           │                      │
        │                                                │      DSI DATA 0P          │                      │
        │                                                ├───────────────────────────┤                      │
        │                                                │                           │                      │
        │                                                │      DSI DATA 0N          │                      │
        │                                                ├───────────────────────────┤                      │
        │                                                │                           │                      │
        │                                                │                           └──────────────────────┘
        │                                                │
        │                                                │
        │                                                │
        │                                                │
        │                                                │
        │                                                │
        └────────────────────────────────────────────────┘
    

Set Chip Target

First of all, your target must be supported by both:

  • By your ESP-IDF version: For the full list of supported targets, run:
    idf.py --list-targets
    
  • By this example: For the full list of supported targets, refer to the supported targets table at the top of this README.

After you make sure that your target is supported, go to your example project directory and set the chip target:

idf.py set-target <target>

For example, to set esp32-P4 as the chip target, run:

idf.py set-target esp32p4

Build and Flash

Execute the following command to build the project, flash it to your development board, and run the monitor tool to view the serial output:

idf.py build flash monitor

This command can be reduced to idf.py flash monitor.

If the above command fails, check the log on the serial monitor which usually provides information on the possible cause of the issue.

To exit the serial monitor, use Ctrl + ].

Example Output

If you see the following console output, your example should be running correctly:

I (1555) main_task: Calling app_main()
I (1555) ili9881c: ID1: 0x98, ID2: 0x81, ID3: 0x5c
I (1795) ppa_dsi: JPEG image decoded! Size of the decoded image is: 320px x 240px
start srm operations
start blend operations
start fill operations
I (10085) main_task: Returned from app_main()

Reference