From adf314288061960a1ec94cbc7ee5c370e4b1cb82 Mon Sep 17 00:00:00 2001 From: Konstantin Kondrashov Date: Tue, 16 May 2023 13:59:19 +0800 Subject: [PATCH] docs: Adds a note that a GPIO level of test app boot is configurable --- docs/en/api-guides/bootloader.rst | 10 ++++++---- docs/zh_CN/api-guides/bootloader.rst | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/docs/en/api-guides/bootloader.rst b/docs/en/api-guides/bootloader.rst index 7c9ac624d2..09c6329653 100644 --- a/docs/en/api-guides/bootloader.rst +++ b/docs/en/api-guides/bootloader.rst @@ -114,13 +114,15 @@ It's possible to write a special firmware app for testing in production, and boo Implementing a dedicated test app firmware requires creating a totally separate ESP-IDF project for the test app (each project in ESP-IDF only builds one app). The test app can be developed and tested independently of the main project, and then integrated at production testing time as a pre-compiled .bin file which is flashed to the address of the main project's test app partition. -To support this functionality in the main project's bootloader, set the configuration item :ref:`CONFIG_BOOTLOADER_APP_TEST` and configure the following two items: +To support this functionality in the main project's bootloader, set the configuration item :ref:`CONFIG_BOOTLOADER_APP_TEST` and configure the following three items: -- :ref:`CONFIG_BOOTLOADER_NUM_PIN_APP_TEST` - GPIO number to boot TEST partition. The selected GPIO will be configured as an input with internal pull-up enabled. To trigger a test app, this GPIO must be pulled low on reset. +- :ref:`CONFIG_BOOTLOADER_NUM_PIN_APP_TEST` - GPIO number to boot test partition. The selected GPIO will be configured as an input with internal pull-up enabled. This GPIO must be pulled low or high (configurable) on reset to trigger this. - Once the GPIO input is released (allowing it to be pulled up) and the device has been reboot, the normally configured application will boot (factory or any OTA app partition slot). + Once the GPIO input is released and the device has been rebooted, the default boot sequence will be enabled again to boot the factory partition or any OTA app partition slot. -- :ref:`CONFIG_BOOTLOADER_HOLD_TIME_GPIO` - this is hold time of GPIO for reset/test mode (by default 5 seconds). The GPIO must be held low continuously for this period of time after reset before a factory reset or test partition boot (as applicable) is performed. +- :ref:`CONFIG_BOOTLOADER_HOLD_TIME_GPIO` - this is the hold time of GPIO for reset/test mode (by default 5 seconds). The GPIO must be held continuously for this period of time after reset before a factory reset or test partition boot (as applicable) is performed. + +- :ref:`CONFIG_BOOTLOADER_APP_TEST_PIN_LEVEL` - configure whether a test partition boot should trigger on a high or low level of the GPIO. If the GPIO has an internal pull-up, then this is enabled before the pin is sampled. Consult the {IDF_TARGET_NAME} datasheet for details on pin internal pull-ups. Rollback -------- diff --git a/docs/zh_CN/api-guides/bootloader.rst b/docs/zh_CN/api-guides/bootloader.rst index 117b76e6a8..5532590209 100644 --- a/docs/zh_CN/api-guides/bootloader.rst +++ b/docs/zh_CN/api-guides/bootloader.rst @@ -114,13 +114,15 @@ ROM 中的 :ref:`first-stage-bootloader` 从 flash 中读取 :ref:`second-stage- 实现该测试应用固件需要为测试应用创建一个完全独立的 ESP-IDF 项目(ESP-IDF 中的每个项目仅构建一个应用)。该测试应用可以独立于主项目进行开发和测试,然后在生成测试时作为一个预编译 .bin 文件集成到主项目的测试应用程序分区的地址。 -为了使主项目的引导加载程序支持这个功能,请设置 :ref:`CONFIG_BOOTLOADER_APP_TEST` 并配置以下两个选项: +要在主项目的引导加载程序中支持这个功能,请设置 :ref:`CONFIG_BOOTLOADER_APP_TEST` 并配置以下三个选项: -- :ref:`CONFIG_BOOTLOADER_NUM_PIN_APP_TEST` - 设置启动 TEST 分区的管脚编号。选中的管脚将被配置为启用了内部上拉的输入。要触发测试应用,必须在重置时将此管脚 拉低。 +- :ref:`CONFIG_BOOTLOADER_NUM_PIN_APP_TEST` - 设置启动 TEST 分区的管脚编号,该管脚将被配置为输入并启用内部上拉。要触发测试应用,必须在重置时将此管脚拉低或拉高(可配置)。 - 当管脚输入被释放(则被拉高)并将设备重新启动后,正常配置的应用程序将启动(工厂或任意 OTA 应用分区槽)。 + 释放管脚输入并重启设备后,将重新启用默认的启动顺序,即启动工厂分区或任意 OTA 应用分区槽。 -- :ref:`CONFIG_BOOTLOADER_HOLD_TIME_GPIO` - 设置 GPIO 电平保持的时间(默认为 5 秒)。设备重置后,管脚在设定的时间内必须持续保持低电平,然后才会执行出厂重置或引导测试分区(如适用)。 +- :ref:`CONFIG_BOOTLOADER_HOLD_TIME_GPIO` - 设置 GPIO 电平保持的时间,默认为 5 秒。设备重置后,管脚电平必须保持该设定的时间,才能执行恢复出厂设置或引导测试分区(如适用)。 + +- :ref:`CONFIG_BOOTLOADER_APP_TEST_PIN_LEVEL` - 配置应在 GPIO 的高电平还是低电平上触发测试分区启动。若 GPIO 有内部上拉,则该功能在采样管脚前就会被启用。关于管脚内部上拉的详细信息,请参考 {IDF_TARGET_NAME} 数据规格书。 回滚 --------