WTDKP4C5-S1 User Guide

  • WTDKP4C5-S1
  • ESP32-P4
  • ESP32-C5
Update history
Date Version Author Update content
2026-08-21 1.1.0 Pail Added instructions for the ESP32-P4X variant

This tutorial explains how to use the WTDKP4C5-S1 example project on Wireless-Tag's GitHub, including the MIPI-DSI display and camera.

  • 🎯 Smartphone-style UI based on the ESP-Brookesia framework
  • πŸ“± Multiple applications: calculator, 2048 game, and camera
  • πŸ€– AI vision features: face detection and pedestrian detection
  • πŸ–₯️ High-definition display with MIPI DSI support
  • 🌐 Network connectivity with Wi-Fi and BLE support
  • πŸ“· Camera support at a resolution of 1280 Γ— 960

Wireless-Tag GitHub Repository

Hardware Preparation

  • Development board: WTDKP4C5-S1
  • Display: MIPI-DSI display (EK79007)
  • Camera: OV5647

Connect the MIPI-DSI display as follows:

LCD Display WTDKP4C5-S1
MIPI FPC cable MIPI FPC cable
RST LCD pin GPIO27 on the J5 header
PWM pin GPIO26 on the J5 header
5V pin VCC_5V on the J6 header
GND pin GND on the J6 header

Display wiring

Software Environment Setup

1. Install ESP-IDF

Follow the official documentation to install ESP-IDF v5.5 (commit: cbe9388f45dd8f33fc560c9727d429e8e107d476) or the latest version:
ESP-IDF Getting Started Guide

2. Clone the Project

git clone <project-repository-url>
cd WTDKP4C5-S1-1V1

3. Set Up Environment Variables

. ${IDF_PATH}/export.sh

4. Install Project Dependencies

# Install managed component dependencies
idf.py reconfigure

5. Build and Flash

# Configure the project
idf.py menuconfig

# Build the project
idf.py build

# Flash the device
idf.py flash

# View serial output
idf.py monitor

Wi-Fi/BLE

Overview

  • The ESP32-P4 does not have built-in Wi-Fi, so a coprocessor with Wi-Fi/BLE support is required for Wi-Fi connectivity.
  • This development board uses an ESP32-C5 coprocessor connected over SDIO.

Usage

ESP32-P4 Project Configuration

Open menuconfig, navigate to the following option, and select esp32c5 as the slave target:

(Top) β†’ Component config β†’ Wi-Fi Remote β†’ choose slave target

Also enable LV_USE_FREETYPE in menuconfig under:

(Top) β†’ Component config β†’ LVGL configuration β†’ 3rd Party Libraries

Note: Pay attention to the pin configuration.

Configure the ESP32-P4 Chip Revision

Check the module model on the development board. There are two variants: N16R32 and N16R32X.

N16R32

N16R32 module

In menuconfig, navigate to the following option and configure it as shown:

(Top) β†’ Component config β†’ Hardware Settings β†’ Chip revision

Chip revision settings for WTDKP4C5-S1 N16R32

N16R32X

N16R32X module

In menuconfig, navigate to the following option and configure it as shown:

(Top) β†’ Component config β†’ Hardware Settings β†’ Chip revision

Chip revision settings for WTDKP4C5-S1 N16R32X

Clone the ESP32-C5 Project

git clone https://github.com/espressif/esp-hosted-mcu.git
cd esp-hosted-mcu/slave

Build and Flash

# Set the target chip
idf.py set-target esp32c5

# Build the project
idf.py build

# Flash the device
idf.py flash

# View serial output
idf.py monitor

Project Directory Structure

phone_wtdkp4c5_s1_board/
β”œβ”€β”€ main/                           # Main application source code
β”‚   β”œβ”€β”€ main.cpp                    # Application entry point
β”‚   β”œβ”€β”€ CMakeLists.txt              # Main application build configuration
β”‚   └── idf_component.yml           # Component dependency configuration
β”œβ”€β”€ components/                     # Custom components
β”‚   β”œβ”€β”€ apps/                       # Application components
β”‚   β”‚   β”œβ”€β”€ calculator/             # Calculator application
β”‚   β”‚   β”œβ”€β”€ camera/                 # Camera application
β”‚   β”‚   β”œβ”€β”€ game_2048/              # 2048 game
β”‚   β”‚   β”œβ”€β”€ setting/                # Settings application
β”‚   β”œβ”€β”€ human_face_detect/          # Face detection component
β”‚   β”œβ”€β”€ pedestrian_detect/          # Pedestrian detection component
β”‚   β”œβ”€β”€ wtdkp4c5_s1_board/           # Board support package (BSP)
β”œβ”€β”€ CMakeLists.txt                  # Top-level build configuration
β”œβ”€β”€ sdkconfig.defaults              # Default SDK configuration
β”œβ”€β”€ partitions.csv                  # Partition table configuration
└── README.md                       # Project documentation

Core Components

1. Main Application (main/)

  • main.cpp: The application entry point. It initializes the system, display, storage, network, and other modules, then starts the applications.

2. Applications (components/apps/)

  • calculator/: Calculator application supporting basic arithmetic operations
  • camera/: Camera application supporting photo capture and live video preview
  • game_2048/: The classic 2048 number game
  • setting/: System settings application

3. AI Vision Components

  • human_face_detect/: Face detection algorithm implementation
  • pedestrian_detect/: Pedestrian detection algorithm implementation

4. Hardware Abstraction Layer

  • wtdkp4c5_s1_board/: Board-specific BSP providing hardware initialization and driver interfaces

Partition Configuration

Info: Custom Partition Table (partitions.csv)

  • nvs (24KB): Non-volatile storage for configuration data
  • phy_init (4KB): RF calibration data
  • factory (9MB): Application firmware

Development and Debugging

View Logs

idf.py monitor

Info: Performance Monitoring

The application includes memory monitoring and reports memory usage every 5 seconds:

  • SRAM usage
  • PSRAM usage
  • Memory leak warnings

Common Configuration Options

Use idf.py menuconfig to configure:

  • Display parameters
  • Camera resolution
  • Wi-Fi settings

Component Version Requirements

Core Framework Dependencies

Component Required Version Description
ESP-IDF v5.5.0 (commit: cbe9388f45dd8f33fc560c9727d429e8e107d476) ESP32 development framework
espressif/esp-brookesia 0.4.2 Smartphone-style UI framework
lvgl/lvgl 8.4.0 Lightweight graphics library
espressif/esp_lvgl_port 2.6.0 LVGL porting layer

Display and Touch Components

Component Required Version Target Chip Description
espressif/esp_lcd_ek79007 1.0.2 ESP32P4 EK79007 display driver
espressif/esp_lcd_touch 1.1.2 Generic Base touchscreen driver
esp_lcd_touch_gt911 1.1.3 Generic GT911 touch controller

Camera Components

Component Required Version Target Chip Description
espressif/esp_cam_sensor 0.9.0 ESP32P4 Camera sensor driver
espressif/esp_sccb_intf 0.0.5 Generic SCCB interface driver

AI and Deep Learning Components

Component Required Version Target Chip Description
espressif/esp-dl 3.1.0 ESP32S3/P4 ESP deep learning inference framework

Networking and Communication Components

Component Required Version Target Chip Description
espressif/esp_wifi_remote 0.14.2 ESP32P4/H2 Remote Wi-Fi control
espressif/esp_hosted 2.0.13 ESP32P4/H2 ESP hosted mode
espressif/eppp_link 0.3.1 Generic PPP protocol link
esp_serial_slave_link 1.1.0~1 Generic Serial slave link

Tools and Utilities

Component Required Version Description
espressif/cmake_utilities 0.5.3 CMake build utilities
chmorgan/esp-file-iterator 1.0.0 File iterator utility

Version Compatibility

Important: Key Version Requirements

  1. ESP-IDF version: Use the specified v5.5 commit to ensure compatibility with all components.
  2. Target chip: The project primarily targets ESP32P4; some components also support ESP32S3.
  3. Dependencies: Some components depend on each other. Make sure their versions are compatible.

Caution: Component Updates β€” Check dependencies and compatibility before upgrading component versions to avoid incompatibilities.

Install Specific Component Versions

To install a specific component version, specify it in idf_component.yml:

dependencies:
  espressif/esp-brookesia:
    version: "0.4.2"
  espressif/esp_video:
    version: "0.8.0~3"
    rules:
      - if: "target == esp32p4"

Log Output

  • ESP32P4
I (25) boot: ESP-IDF v5.5-dirty 2nd stage bootloader
I (26) boot: compile time Sep  3 2025 16:32:17
I (26) boot: Multicore bootloader
I (27) boot: chip revision: v1.0
I (29) boot: efuse block revision: v0.3
I (33) qio_mode: Enabling default flash chip QIO
I (37) boot.esp32p4: SPI Speed      : 80MHz
I (41) boot.esp32p4: SPI Mode       : QIO
I (44) boot.esp32p4: SPI Flash Size : 16MB
I (48) boot: Enabling RNG early entropy source...
I (53) boot: Partition Table:
I (55) boot: ## Label            Usage          Type ST Offset   Length
I (62) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (68) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (75) boot:  2 factory          factory app      00 00 00010000 00900000
I (82) boot: End of partition table
I (85) esp_image: segment 0: paddr=00010020 vaddr=481a0020 size=34477ch (3426172) map
I (617) esp_image: segment 1: paddr=003547a4 vaddr=30100000 size=00068h (   104) load
I (618) esp_image: segment 2: paddr=00354814 vaddr=4ff00000 size=0b804h ( 47108) load
I (630) esp_image: segment 3: paddr=00360020 vaddr=48000020 size=1921e0h (1647072) map
I (883) esp_image: segment 4: paddr=004f2208 vaddr=4ff0b804 size=0f82ch ( 63532) load
I (896) esp_image: segment 5: paddr=00501a3c vaddr=4ff1b080 size=03940h ( 14656) load
I (901) esp_image: segment 6: paddr=00505384 vaddr=50108080 size=00020h (    32) load
I (908) boot: Loaded app from partition at offset 0x10000
I (908) boot: Disabling RNG early entropy source...
I (922) hex_psram: vendor id    : 0x0d (AP)
I (922) hex_psram: Latency      : 0x01 (Fixed)
I (922) hex_psram: DriveStr.    : 0x00 (25 Ohm)
I (923) hex_psram: dev id       : 0x03 (generation 4)
I (928) hex_psram: density      : 0x07 (256 Mbit)
I (932) hex_psram: good-die     : 0x06 (Pass)
I (936) hex_psram: SRF          : 0x02 (Slow Refresh)
I (941) hex_psram: BurstType    : 0x00 ( Wrap)
I (945) hex_psram: BurstLen     : 0x03 (2048 Byte)
I (950) hex_psram: BitMode      : 0x01 (X16 Mode)
I (954) hex_psram: Readlatency  : 0x04 (14 cycles@Fixed)
I (959) hex_psram: DriveStrength: 0x00 (1/1)
I (963) MSPI DQS: tuning success, best phase id is 0
I (1136) MSPI DQS: tuning success, best delayline id is 17
I esp_psram: Found 32MB PSRAM device
I esp_psram: Speed: 200MHz
I (1299) mmu_psram: .rodata xip on psram
I (1379) mmu_psram: .text xip on psram
I (1380) hex_psram: psram CS IO is dedicated
I (1380) cpu_start: Multicore app
I (1781) esp_psram: SPI SRAM memory test OK
I (1790) cpu_start: Pro cpu start user code
I (1790) cpu_start: cpu freq: 360000000 Hz
I (1790) app_init: Application information:
I (1791) app_init: Project name:     wtdkp4c5_s1_board
I (1795) app_init: App version:      81b17e8-dirty
I (1800) app_init: Compile time:     Sep  3 2025 16:32:14
I (1805) app_init: ELF file SHA256:  d41903034...
I (1809) app_init: ESP-IDF:          v5.5-dirty
I (1814) efuse_init: Min chip rev:     v0.1
I (1818) efuse_init: Max chip rev:     v1.99
I (1822) efuse_init: Chip rev:         v1.0
I (1826) heap_init: Initializing. RAM available for dynamic allocation:
I (1832) heap_init: At 4FF22630 len 00018990 (98 KiB): RAM
I (1837) heap_init: At 4FF3AFC0 len 00004BF0 (18 KiB): RAM
I (1842) heap_init: At 4FF40000 len 00040000 (256 KiB): RAM
I (1848) heap_init: At 501080A0 len 00007F60 (31 KiB): RTCRAM
I (1853) heap_init: At 30100068 len 00001F98 (7 KiB): TCM
I (1858) esp_psram: Adding pool of 27712K of PSRAM memory to heap allocator
I (1865) esp_psram: Adding pool of 55K of PSRAM memory gap generated due to end address alignment of irom to the heap allocator
I (1876) esp_psram: Adding pool of 46K of PSRAM memory gap generated due to end address alignment of drom to the heap allocator
W (1888) spi_flash: GigaDevice detected but related driver is not linked, please check option `SPI_FLASH_SUPPORT_GD_CHIP`
I (1898) spi_flash: detected chip: generic
I (1902) spi_flash: flash io: qio
I (1905) host_init: ESP Hosted : Host chip_ip[18]
I (1909) H_API: ESP-Hosted starting. Hosted_Tasks: prio:23, stack: 5120 RPC_task_stack: 5120
I (1918) H_API: ** add_esp_wifi_remote_channels **
I (1922) transport: Add ESP-Hosted channel IF[1]: S[0] Tx[0x4800d11a] Rx[0x4801f152]
--- 0x4800d11a: transport_drv_sta_tx at /home/qmsd/esp_project/work_example/WTDKP4C5-S1-1V1/build/../managed_components/espressif__esp_hosted/host/drivers/transport/transport_drv.c:248
--- 0x4801f152: esp_wifi_remote_channel_rx at /home/qmsd/esp_project/work_example/WTDKP4C5-S1-1V1/build/../managed_components/espressif__esp_wifi_remote/esp_wifi_remote_net.c:19
I (1930) transport: Add ESP-Hosted channel IF[2]: S[0] Tx[0x4800d05c] Rx[0x4801f152]
--- 0x4800d05c: transport_drv_ap_tx at /home/qmsd/esp_project/work_example/WTDKP4C5-S1-1V1/build/../managed_components/espressif__esp_hosted/host/drivers/transport/transport_drv.c:278
--- 0x4801f152: esp_wifi_remote_channel_rx at /home/qmsd/esp_project/work_example/WTDKP4C5-S1-1V1/build/../managed_components/espressif__esp_wifi_remote/esp_wifi_remote_net.c:19
sdio_mempool_create free:28607220 min-free:28607220 lfb-def:28311552 lfb-8bit:28311552

I (1945) H_SDIO_DRV: sdio_data_to_rx_buf_task started
I (1949) main_task: Started on CPU0
I (1953) main_task: Calling app_main()
I (1959) LVGL: Starting LVGL task
W (1959) ledc: GPIO 26 is not usable, maybe conflict with others
I (1965) WT99P4C5_S1_BOARD: MIPI DSI PHY Powered on
I (1970) WT99P4C5_S1_BOARD: Install MIPI DSI LCD control panel
I (1975) WT99P4C5_S1_BOARD: Install EK79007 LCD control panel
I (1980) ek79007: version: 1.0.2
I (2147) WT99P4C5_S1_BOARD: Display initialized
I (2147) WT99P4C5_S1_BOARD: Display resolution 1024x600
E (2148) lcd_panel: esp_lcd_panel_swap_xy(50): swap_xy is not supported by this panel
W (2152) i2c.master: Please check pull-up resistances whether be connected properly. Otherwise unexpected behavior would happen. For more detailed information, please read docs
I (2168) GT911: I2C address initialization procedure skipped - using default GT9xx setup
I (2176) GT911: TouchPad_ID:0x39,0x31,0x31
I (2179) GT911: TouchPad_Config_Version:89
I (2183) WT99P4C5_S1_BOARD: Setting LCD backlight: 100%
I (2188) app_main: Display ESP-Brookesia phone demo
[WARN] [esp_brookesia_core.cpp:46](getDisplaySize): Display is not set, use default display
[INFO] [esp_brookesia_core.cpp:204](beginCore): Library version: 0.4.1
[WARN] [esp_brookesia_phone_manager.cpp:72](begin): No touch device is set, try to use default touch device
[WARN] [esp_brookesia_phone_manager.cpp:76](begin): Using default touch device(@0x0x484e5d30)
I (2242) EUI_Setting: Load ble_en: 0
I (2243) EUI_Setting: Load brightness: 51
I (2247) EUI_Setting: Load volume: 9
I (2250) EUI_Setting: Load wifi_en: 1
I (2253) WT99P4C5_S1_BOARD: Setting LCD backlight: 51%
I (2259) transport: Attempt connection with slave: retry[0]
I (2260) Game2048: Load score: 1536
W (2264) H_SDIO_DRV: Reset slave using GPIO[13]
I (2269) ov5647: Detected Camera sensor PID=0x5647
I (2271) os_wrapper_esp: GPIO [13] configured
I (2338) app_video: version: 0.8.0
I (2338) app_video: driver:  MIPI-CSI
I (2338) app_video: card:    MIPI-CSI
I (2338) app_video: bus:     esp32p4:MIPI-CSI
I (2341) app_video: width=1280 height=960
I (2361) app_camera_pipeline: new elements[0]:0x490a8d04, internal:1
I (2377) app_camera_pipeline: new elements[1]:0x49308d08, internal:1
I (2393) app_camera_pipeline: new elements[2]:0x49568d0c, internal:1
I (2409) app_camera_pipeline: new elements[3]:0x497c8d10, internal:1
I (2409) app_camera_pipeline: new pipeline 0x484e7ec0, elem_num:4
I (2410) app_camera_pipeline: new elements[0]:0x484e7fd0, internal:1
I (2416) app_camera_pipeline: new elements[1]:0x484e8024, internal:1
I (2422) app_camera_pipeline: new elements[2]:0x484e8078, internal:1
I (2428) app_camera_pipeline: new elements[3]:0x484e80cc, internal:1
I (2434) app_camera_pipeline: new pipeline 0x484e7f48, elem_num:4
I (2442) MEM:    Biggest /     Free /    Total
          SRAM : [240 / 283 / 413] KB
         PSRAM : [5888 / 6067 / 27813] KB
I (3482) sdio_wrapper: SDIO master: Slot 1, Data-Lines: 4-bit Freq(KHz)[40000 KHz]
I (3482) sdio_wrapper: GPIOs: CLK[18] CMD[19] D0[14] D1[15] D2[16] D3[17] Slave_Reset[13]
I (3486) sdio_wrapper: Queues: Tx[20] Rx[20] SDIO-Rx-Mode[1]
Name:
Type: SDIO
Speed: 40.00 MHz (limit: 40.00 MHz)
Size: 0MB
CSD: ver=1, sector_size=0, capacity=0 read_bl_len=0
SCR: sd_spec=0, bus_width=0
TUPLE: DEVICE, size: 3: D9 01 FF
TUPLE: MANFID, size: 4
  MANF: 0092, CARD: 6666
TUPLE: FUNCID, size: 2: 0C 00
TUPLE: FUNCE, size: 4: 00 00 02 32
TUPLE: CONFIG, size: 5: 01 01 00 02 07
TUPLE: CFTABLE_ENTRY, size: 8
  INDX: C1, Intface: 1, Default: 1, Conf-Entry-Num: 1
  IF: 41
  FS: 30, misc: 0, mem_space: 1, irq: 1, io_space: 0, timing: 0, power: 0
  IR: 30, mask: 1,   IRQ: FF FF
  LEN: FFFF
TUPLE: END
I (3564) sdio_wrapper: Function 0 Blocksize: 512
I (3568) sdio_wrapper: Function 1 Blocksize: 512
I (3572) H_SDIO_DRV: Card init success, TRANSPORT_RX_ACTIVE
I (3577) transport: set_transport_state: 1
I (3581) transport: Waiting for esp_hosted slave to be ready
I (3645) H_SDIO_DRV: SDIO Host operating in STREAMING MODE
I (3645) H_SDIO_DRV: Open data path at slave
I (3645) H_SDIO_DRV: Starting SDIO process rx task
I (3672) H_SDIO_DRV: Received ESP_PRIV_IF type message
I (3672) transport: Received INIT event from ESP32 peripheral
I (3673) transport: EVENT: 12
I (3674) transport: Identified slave [esp32c5]
I (3678) transport: EVENT: 11
I (3681) transport: capabilities: 0xd
I (3685) transport: Features supported are:
I (3688) transport:      * WLAN
I (3691) transport:        - HCI over SDIO
I (3695) transport:        - BLE only
I (3698) transport: EVENT: 13
W (3700) transport: === ESP-Hosted Version Warning ===
Version on Host is NEWER than version on co-processor
RPC requests sent by host may encounter timeout errors
or may not be supported by co-processor
W (3718) transport: === ESP-Hosted Version Warning ===
I (3723) transport: ESP board type is : 23

I (3727) transport: Base transport is set-up, TRANSPORT_TX_ACTIVE
I (3733) H_API: Transport active
I (3736) transport: Slave chip Id[12]
I (3740) transport: raw_tp_dir[-], flow_ctrl: low[60] high[80]
I (3745) transport: transport_delayed_init
I (3749) esp_cli: Remove any existing deep_sleep cmd in cli
I (3754) esp_cli: Registering command: crash
I (3758) esp_cli: Registering command: reboot
I (3762) esp_cli: Registering command: mem-dump
I (3767) esp_cli: Registering command: task-dump
I (3771) esp_cli: Registering command: cpu-dump
I (3775) esp_cli: Registering command: heap-trace
I (3780) esp_cli: Registering command: sock-dump
I (3784) esp_cli: Registering command: host-power-save
I (3789) hci_stub_drv: Host BT Support: Disabled
I (3793) H_SDIO_DRV: Received INIT event
I (3797) H_SDIO_DRV: Event type: 0x22
I (3800) H_SDIO_DRV: Write thread started
I (4356) EUI_Setting: wifi_init done
I (4360) RPC_WRAP: ESP Event: wifi station started
I (4371) RPC_WRAP: ESP Event: wifi station started
I (4509) RPC_WRAP: sta mac address is [d0:cf:13:e0:f5:ec]
I (7450) MEM:    Biggest /     Free /    Total
          SRAM : [240 / 280 / 413] KB
         PSRAM : [5888 / 6067 / 27813] KB
I (11519) RPC_WRAP: ESP Event: Station mode: Connected
I (11566) RPC_WRAP: sta mac address is [d0:cf:13:e0:f5:ec]
I (11566) esp_wifi_remote: esp_wifi_internal_reg_rxcb: sta: 0x481694f2
--- 0x481694f2: wifi_sta_receive at /home/qmsd/esp/esp5.5/esp-idf/components/esp_wifi/src/wifi_netif.c:39
I (11567) EUI_Setting: connected to ap SSID:, password:.
I (12441) sntp: Time is not set yet. Connecting to WiFi and getting time over NTP.
I (12441) sntp: Initializing SNTP
I (12441) sntp: Waiting for system time to be set... (1/10)
I (12450) MEM:    Biggest /     Free /    Total
          SRAM : [232 / 278 / 413] KB
         PSRAM : [5888 / 6067 / 27813] KB