Skip to content

Commit

Permalink
Merge branch 'feat/add_p4_example' into 'master'
Browse files Browse the repository at this point in the history
feat(p4): The P4 User Guide document has been updated, and some examples for...

See merge request ae_group/esp-dev-kits!207
  • Loading branch information
Lzw655 committed Jul 19, 2024
2 parents 69d890f + a71ca1f commit 90f53b6
Show file tree
Hide file tree
Showing 46 changed files with 33,463 additions and 9 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
39 changes: 34 additions & 5 deletions docs/en/esp32p4/esp32-p4-function-ev-board/user_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -178,16 +178,41 @@ To connect the LCD, follow these steps:

1. Secure the development board to the LCD adapter board by attaching the short copper standoffs (8 mm in length) to the four standoff posts at the center of the LCD adapter board.
2. Connect the J3 header of the LCD adapter board to the MIPI DSI connector on the ESP32-P4-Function-EV-Board using the LCD ribbon cable (**reverse direction**). Note that the LCD adapter board is already connected to the LCD.
3. Use a DuPont wire to connect the RST_LCD pin of the J6 header of the LCD adapter board to the GPIO22 pin of the J1 header on the ESP32-P4-Function-EV-Board. The RST_LCD pin can be configured via software, with GPIO22 set as the default.
4. It is recommended to power the LCD by connecting a USB cable to the J1 header of the LCD adapter board. If this is not feasible, connect the 5V and GND pins of the LCD adapter board to corresponding pins on the J1 header of the ESP32-P4-Function-EV-Board, provided that the development board has sufficient power supply.
5. Attach the long copper standoffs (20 mm in length) to the four standoff posts on the periphery of the LCD adapter board to allow the LCD to stand upright.
3. Use a DuPont wire to connect the RST_LCD pin of the J6 header of the LCD adapter board to the GPIO27 pin of the J1 header on the ESP32-P4-Function-EV-Board. The RST_LCD pin can be configured via software, with GPIO27 set as the default.
4. Use a DuPont wire to connect the PWM pin of the J6 header of the LCD adapter board to the GPIO26 pin of the J1 header on the ESP32-P4-Function-EV-Board. The PWM pin can be configured via software, with GPIO26 set as the default.
5. It is recommended to power the LCD by connecting a USB cable to the J1 header of the LCD adapter board. If this is not feasible, connect the 5V and GND pins of the LCD adapter board to corresponding pins on the J1 header of the ESP32-P4-Function-EV-Board, provided that the development board has sufficient power supply.
6. Attach the long copper standoffs (20 mm in length) to the four standoff posts on the periphery of the LCD adapter board to allow the LCD to stand upright.

The camera, the camera ribbon cable (**forward direction**), and camera adapter board are pre-connected. To use the camera, connect the camera ribbon cable to the MIPI CSI connector of the development board.
In summary, the LCD adapter board and ESP32-P4-Function-EV-Board are connected via the following pins:

.. list-table::
:widths: 20 20
:header-rows: 1

* - LCD Adapter Board
- ESP32-P4-Function-EV
* - J3 header
- MIPI DSI connector
* - RST_LCD pin of J6 header
- GPIO27 pin of J1 header
* - PWM pin of J6 header
- GPIO26 pin of J1 header
* - 5V pin of J6 header
- 5V pin of J1 header
* - GND pin of J6 header
- GND pin of J1 header

.. note::

- If you power the LCD adapter board by connecting a USB cable to its J1 header, you do not need to connect its 5V and GND pins to the corresponding pins on the development board.
- To use the camera, connect the camera adapter board to the MIPI CSI connector on the development board using the camera ribbon cable (**forward direction**).

Software Setup
^^^^^^^^^^^^^^

Please proceed to `ESP-IDF Get Started <https://docs.espressif.com/projects/esp-idf/en/latest/esp32p4/get-started/index.html>`__, which will quickly help you set up the development environment then flash an application example onto your board.
To set up your development environment and flash an application example onto your board, please follow the instructions in `ESP-IDF Get Started <https://docs.espressif.com/projects/esp-idf/en/latest/esp32p4/get-started/index.html>`__.

You can find examples for ESP32-P4-Function-EV by accessing :project:`Examples <esp32-p4-function-ev-board/examples>`. To configure project options, enter ``idf.py menuconfig`` in the example directory.

Hardware Reference
==================
Expand Down Expand Up @@ -293,5 +318,9 @@ Related Documents
* `Display Datasheet <../../_static/esp32-p4-function-ev-board/camera_display_datasheet/display_datasheet.pdf>`_ (PDF)
* `Datasheet of display driver chip EK73217BCGA <../../_static/esp32-p4-function-ev-board/camera_display_datasheet/display_driver_chip_EK73217BCGA_datasheet.pdf>`_ (PDF)
* `Datasheet of display driver chip EK79007AD <../../_static/esp32-p4-function-ev-board/camera_display_datasheet/display_driver_chip_EK79007AD_datasheet.pdf>`_ (PDF)
* `LCD Adapter Board Schematic <../../_static/esp32-p4-function-ev-board/schematics/esp32-p4-function-ev-board-lcd-subboard-schematics.pdf>`_ (PDF)
* `LCD Adapter Board PCB Layout <../../_static/esp32-p4-function-ev-board/schematics/esp32-p4-function-ev-board-lcd-subboard-pcb-layout.pdf>`_ (PDF)
* `Camera Adapter Board Schematic <../../_static/esp32-p4-function-ev-board/schematics/esp32-p4-function-ev-board-camera-subboard-schematics.pdf>`_ (PDF)
* `Camera Adapter Board PCB Layout <../../_static/esp32-p4-function-ev-board/schematics/esp32-p4-function-ev-board-camera-subboard-pcb-layout.pdf>`_ (PDF)

For further design documentation for the board, please contact us at `[email protected] <[email protected]>`_.
37 changes: 33 additions & 4 deletions docs/zh_CN/esp32p4/esp32-p4-function-ev-board/user_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -178,17 +178,42 @@ ESP32-P4-Function-EV-Board 的包装盒中包含以下可选配件:

1. 用短铜柱将开发板固定在 LCD 屏幕适配板中心的四个螺母柱上。
2. 用屏幕排线(**反向线序**)连接 LCD 屏幕适配板的 J3 排针和开发板的 MIPI DSI 连接器。LCD 屏幕适配板已与 LCD 连接。
3. 用杜邦线将 LCD 屏幕适配板 J6 排针的 RST_LCD 引脚连接到开发板 J1 排针的 GPIO22 引脚。使用时 RST_LCD 由 ESP32-P4 芯片控制,具体引脚可由软件设置,默认为 GPIO22。
4. 推荐使用外接 USB 供电连接 LCD 屏幕适配板 J1 排针对屏幕供电。如果条件不允许,也可以在开发板供电充足的情况下,使用杜邦线将 LCD 屏幕适配板的 5V 与 GND 管脚连接到开发板的 J1 排针的 5V 与 GND 引脚。
5. 将长铜柱固定在 LCD 屏幕适配板四周的四个螺母柱上,可以将 LCD 立放。
3. 用杜邦线将 LCD 屏幕适配板 J6 排针的 RST_LCD 引脚连接到开发板 J1 排针的 GPIO27 引脚。使用时 RST_LCD 由 ESP32-P4 芯片控制,具体引脚可由软件设置,默认为 GPIO27。
4. 用杜邦线将 LCD 屏幕适配板 J6 排针的 PWM 引脚连接到开发板 J1 排针的 GPIO26 引脚。使用时 PWM 由 ESP32-P4 芯片控制,具体引脚可由软件设置,默认为 GPIO26。
5. 推荐使用外接 USB 供电连接 LCD 屏幕适配板 J1 排针对屏幕供电。如果条件不允许,也可以在开发板供电充足的情况下,使用杜邦线将 LCD 屏幕适配板的 5V 与 GND 管脚连接到开发板的 J1 排针的 5V 与 GND 引脚。
6. 将长铜柱固定在 LCD 屏幕适配板四周的四个螺母柱上,可以将 LCD 立放。

摄像头、摄像头排线(**同向线序**)以及摄像头适配板已经连接好。如需使用摄像头,请将摄像头排线连到开发板的 MIPI CSI 连接器。
连接关系如下表所示:

.. list-table::
:widths: 20 20
:header-rows: 1

* - LCD 屏幕适配板
- ESP32-P4-Function-EV
* - J3 排针
- MIPI DSI 连接器
* - J6 排针 RST_LCD 引脚
- J1 排针 GPIO27 引脚
* - J6 排针 PWM 引脚
- J1 排针 GPIO26 引脚
* - J6 排针 5V 引脚
- J1 排针 5V 引脚
* - J6 排针 GND 引脚
- J1 排针 GND 引脚

.. 注解::

- 如果使用外接 USB 供电连接 LCD 屏幕适配板,则不需要连接 5V 和 GND 引脚。
- 如需使用摄像头,请将摄像头排线(**同向线序**)连接至摄像头适配板和开发板的 MIPI CSI 连接器。

软件设置
^^^^^^^^

请前往 `ESP-IDF 快速入门 <https://docs.espressif.com/projects/esp-idf/zh_CN/latest/esp32p4/get-started/index.html>`__,查看如何快速设置开发环境,将应用程序烧录至您的开发板。

开发板应用示例存放在 :project:`Examples <esp32-p4-function-ev-board/examples>` 中,在示例目录下输入 ``idf.py menuconfig`` 即可配置工程选项。

硬件参考
========

Expand Down Expand Up @@ -293,5 +318,9 @@ J1
* `显示屏规格书 <../../_static/esp32-p4-function-ev-board/camera_display_datasheet/display_datasheet.pdf>`_ (PDF)
* `显示屏驱动芯片 EK73217BCGA 规格书 <../../_static/esp32-p4-function-ev-board/camera_display_datasheet/display_driver_chip_EK73217BCGA_datasheet.pdf>`_ (PDF)
* `显示屏驱动芯片 EK79007AD 规格书 <../../_static/esp32-p4-function-ev-board/camera_display_datasheet/display_driver_chip_EK79007AD_datasheet.pdf>`_ (PDF)
* `显示屏适配板原理图 <../../_static/esp32-p4-function-ev-board/schematics/esp32-p4-function-ev-board-lcd-subboard-schematics.pdf>`_ (PDF)
* `显示屏适配板 PCB 布局图 <../../_static/esp32-p4-function-ev-board/schematics/esp32-p4-function-ev-board-lcd-subboard-pcb-layout.pdf>`_ (PDF)
* `摄像头适配板原理图 <../../_static/esp32-p4-function-ev-board/schematics/esp32-p4-function-ev-board-camera-subboard-schematics.pdf>`_ (PDF)
* `摄像头适配板 PCB 布局图 <../../_static/esp32-p4-function-ev-board/schematics/esp32-p4-function-ev-board-camera-subboard-pcb-layout.pdf>`_ (PDF)

有关本开发板的更多设计文档,请联系我们的商务部门 `[email protected] <[email protected]>`_。
17 changes: 17 additions & 0 deletions esp32-p4-function-ev-board/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# ESP32-P4-Function-EV-Board Development Board

## User Guide

* ESP32-P4-Function-EV-Board - [English](../docs/en/esp32p4/esp32-p4-function-ev-board/user_guide.rst) / [中文](../docs/zh_CN/esp32p4/esp32-p4-function-ev-board/user_guide.rst)

## Examples

The following examples are developed under the ESP-IDF **release/v5.3** branch

* [Factory Demo](./examples/factory_demo/) (The code will be updated and released gradually.)
* [LVGL Demos v8](./examples/lvgl_demo_v8/)
* [LVGL Demos v9](./examples/lvgl_demo_v9/)

## Factory Bin

* [Factory Bin](https://dl.espressif.com/AE/esp-dev-kits/p4_factory_v14_012.bin) for ESP32-P4-Function-EV-Board, programmed with the [Factory Demo](./examples/factory_demo/).
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
set(SRCS "")
list(APPEND SRCS
"src/bsp_board_extra.c"
"src/bsp_sub_board.c"
"src/esp32_p4_function_ev_board.c")
if(CONFIG_BSP_DISPLAY_LVGL_VERSION_V8)
list(APPEND SRCS "src/bsp_lvgl_port_v8.c")
elseif(CONFIG_BSP_DISPLAY_LVGL_VERSION_V9)
list(APPEND SRCS "src/bsp_lvgl_port_v9.c" "src/lv_esp_freertos.c")
endif()

set(INCLUDE_DIRS "")
list(APPEND INCLUDE_DIRS "include")
list(APPEND INCLUDE_DIRS "priv_include")

set(SRC_DIRS "")
list(APPEND SRC_DIRS "src/sensor")

foreach(SRC_DIR IN LISTS SRC_DIRS)
file(GLOB_RECURSE SRC ${SRC_DIR}/*.c)
list(APPEND SRCS ${SRC})
list(APPEND INCLUDE_DIRS ${SRC_DIR}/include)
endforeach()

idf_component_register(
SRCS ${SRCS}
INCLUDE_DIRS ${INCLUDE_DIRS}
REQUIRES driver esp_driver_cam esp_lcd esp_driver_ppa esp_driver_isp
PRIV_REQUIRES esp_timer spiffs fatfs esp_psram esp_mm
)

if(CONFIG_BSP_DISPLAY_LVGL_VERSION_V9)
if (CONFIG_LV_OS_CUSTOM)
idf_component_get_property(lvgl_lib lvgl__lvgl COMPONENT_LIB)
target_link_libraries(${lvgl_lib} PUBLIC ${COMPONENT_LIB})
endif()
endif()

target_compile_options(
${COMPONENT_LIB} PRIVATE
-Wno-format
-Wno-int-conversion
-Wno-incompatible-pointer-types
-Wunused-function
-Wno-unused-variable
-Wno-unused-function
-Wno-overflow
-Wno-unused-but-set-variable
-Wno-discarded-qualifiers)
Loading

0 comments on commit 90f53b6

Please sign in to comment.