Merge branch 'fix/support_union_lp_io_clk_control_v5.3' into 'release/v5.3'

fix(esp_driver_gpio): manage lp_io module clock by driver (v5.3)

See merge request espressif/esp-idf!31359
This commit is contained in:
Jiang Jiang Jian
2024-06-11 10:45:00 +08:00
14 changed files with 154 additions and 80 deletions

View File

@@ -49,11 +49,16 @@ typedef enum {
/**
* @brief Initialize a rtcio pin
* @note If IO is used in LP application, `rtc_gpio_init` must be called at least once
* for the using IO before loading LP core firmware in HP Code.
*
* @param lp_io_num The rtc io pin to initialize
*/
static inline void ulp_lp_core_gpio_init(lp_io_num_t lp_io_num)
{
#if SOC_LP_IO_CLOCK_IS_INDEPENDENT
_rtcio_ll_enable_io_clock(true);
#endif
rtcio_ll_function_select(lp_io_num, RTCIO_LL_FUNC_RTC);
}

View File

@@ -8,6 +8,7 @@
#include <inttypes.h>
#include <sys/time.h>
#include "soc/soc_caps.h"
#include "soc/gpio_num.h"
#include "esp_rom_caps.h"
#include "lp_core_test_app.h"
#include "lp_core_test_app_counter.h"
@@ -24,6 +25,7 @@
#include "unity.h"
#include "esp_sleep.h"
#include "esp_timer.h"
#include "driver/rtc_io.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
@@ -328,6 +330,7 @@ TEST_CASE("LP core gpio tests", "[ulp]")
.lp_timer_sleep_duration_us = LP_TIMER_TEST_SLEEP_DURATION_US,
};
rtc_gpio_init(GPIO_NUM_0);
load_and_start_lp_core_firmware(&cfg, lp_core_main_gpio_bin_start, lp_core_main_gpio_bin_end);
while (!ulp_gpio_test_finished) {