Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
af7e6db
fix(hal): correct PHY selection logic in usb_wrap_ll.h
TinyuZhao Nov 6, 2025
934de85
fix(coex): fixed the espnow send fail when coex enable
zhangyanjiaoesp Nov 12, 2025
9589ab5
feat(gpio): add IO hold support for Deep-sleep for ESP32-P4 ECO5
songruo Nov 5, 2025
ea6ed23
fix(clk): 400MHz CPU should still be selectable on ESP32-P4 less than…
songruo Nov 11, 2025
ea09a11
feat(gpio): ESP32P4 ECO5 GPIO related update
songruo Nov 12, 2025
89d2585
fix(lwip): allow task stack from SPIRAM except for ESP32 ECO2 and below
mahavirj Nov 5, 2025
7adb3a5
fix(esp_system): fix XTAL32K power breaks ADC function on 32k XTAL cl…
esp-wzh Nov 10, 2025
b578253
change(g0): use hw_ver3 to build g0 components test app
Icarus113 Sep 23, 2025
3fd00b4
fix(esp_system): limit CPU clock to 160MHz in ESP32-C5 for flash encr…
mahavirj Nov 12, 2025
051de7d
fix(bt/controller): Fixed some controller bugs
BetterJincheng Nov 10, 2025
f488b9c
feat(wifi): avoid disconnect when set band mode and fix some wifi bugs
QingzhaoYin Nov 13, 2025
f04318c
fix(lcd): fix mipi dsi phy type for p4 version below 3.0
Kainarx Nov 13, 2025
d481ea1
fix(openthread): resolve deadlock issues due to switching_lock
tanyanquan Nov 14, 2025
e2493ad
Merge branch 'bugfix/lwip_stack_in_psram_limitation_v5.5' into 'relea…
Nov 14, 2025
9e06691
feat(esp_hw_support): support unicore auto clock gating for esp32p4 r…
esp-wzh Nov 13, 2025
45d4989
Merge branch 'feat/avoid_disconnect_when_set_bandmode_v5.5' into 'rel…
Nov 14, 2025
54c9981
bugfix(wifi): Re-calibrate FTM for ESP32-C5 (ECO2)
Nov 14, 2025
1c4f1f4
Merge branch 'feature/esp32p4_eco5_io_hold_v5.5' into 'release/v5.5'
suda-morris Nov 14, 2025
01b9a1d
Merge branch 'fix/fix_xtal32k_power_breaks_adc_v5.5' into 'release/v5.5'
Nov 14, 2025
86f9d0c
feat(isp): added shadow reg settings
Icarus113 Oct 17, 2025
be21577
test(usj): Fix usj test
mythbuster5 Oct 28, 2025
8c77a30
fix(esp_hw_support): add dependency of the TOP domain to the RTC_PERI…
esp-wzh Nov 12, 2025
6dfea6c
fix(esp_driver_usb_serial_jtag): check USJ accessibility before read/…
esp-wzh Oct 13, 2025
2162471
test(esp_pm): add test case for USJ printing performance during wake-up
esp-wzh Oct 13, 2025
7b2f4f2
Merge branch 'fix/mipi_dsi_phy_clk_type_v5.5' into 'release/v5.5'
suda-morris Nov 14, 2025
2a8d264
Merge branch 'bugfix/fix_espnow_send_fail_when_coex_enable_v5.5' into…
Nov 17, 2025
ecfb89d
Merge branch 'test/usj_test_v5.5' into 'release/v5.5'
Nov 17, 2025
7d73e80
Merge branch 'fix/fix_some_deadlock_issue_v5.5' into 'release/v5.5'
Nov 17, 2025
4cf811f
Merge branch 'bugfix/ftm_recalib_esp32c5_v5.5' into 'release/v5.5'
Nov 17, 2025
925e34d
Merge branch 'fix/check_usj_status_before_access_v5.5' into 'release/…
Nov 17, 2025
943137e
fix(nvs_sec_provider): Emit warning when `nvs_keys` partition is missing
klew Nov 13, 2025
7bbe3c9
feat(phy): ESP32-C5 ECO2/ECO3 coex and ESP32-C6 track reset
Nov 17, 2025
376f396
Merge branch 'bugfix/esp32c5_encrypted_flash_write_v5.5' into 'releas…
Nov 17, 2025
34c9b4f
Merge branch 'fix/fix_c6_rtc_periph_depends_on_top_v5.5' into 'releas…
Nov 17, 2025
17dd84e
test(ulp): added larger delay in ULP FSM I_WR_REG instruction test
ESP-Marius Nov 17, 2025
588c7a2
bugfix(wifi): Add the termination dialog token in ASAP FTM
Nov 17, 2025
feaa12e
Merge branch 'contrib/github_pr_17831_backport_v5.5' into 'release/v5.5'
Nov 17, 2025
29e9e7e
Merge branch 'feat/support_p4_unicore_auto_clock_gating_v5.5' into 'r…
Nov 17, 2025
a146cfe
Merge branch 'bugfix/bluetooth_chan_map_error_v5.5' into 'release/v5.5'
Nov 17, 2025
f555a1d
Merge branch 'feat/isp_shadow_reg_v5.5' into 'release/v5.5'
suda-morris Nov 17, 2025
5306951
Merge branch 'feat/phy_lib_update_c5eco3_coex_v5.5' into 'release/v5.5'
Nov 17, 2025
4a6a231
Merge branch 'contrib/github_pr_17710_v5.5' into 'release/v5.5'
Nov 18, 2025
8950969
Merge branch 'ci/ulp_fsm_i_wr_reg_v5.5' into 'release/v5.5'
Nov 18, 2025
cc569cb
Merge branch 'bugfix/ftm_terminate_asap_v5.5' into 'release/v5.5'
Nov 18, 2025
80f2f63
fix(adc): fix ESP32P4 V3 build error on 5.5
Bruce297 Nov 19, 2025
a051036
Merge branch 'fix/adc_p4_v3_build_error' into 'release/v5.5'
suda-morris Nov 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/bt/controller/lib_esp32
2 changes: 1 addition & 1 deletion components/efuse/esp32p4/sources.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
set(EFUSE_SOC_SRCS
"esp_efuse_utility.c"
"esp_efuse_fields.c"
"esp_efuse_rtc_calib.c"
)

if(CONFIG_ESP32P4_REV_MIN_FULL GREATER_EQUAL 300)
Expand All @@ -10,6 +11,5 @@ if(CONFIG_ESP32P4_REV_MIN_FULL GREATER_EQUAL 300)
else()
list(APPEND EFUSE_SOC_SRCS
"esp_efuse_table.c"
"esp_efuse_rtc_calib.c"
)
endif()
16 changes: 9 additions & 7 deletions components/esp_driver_gpio/include/driver/gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -383,23 +383,25 @@ esp_err_t gpio_get_drive_capability(gpio_num_t gpio_num, gpio_drive_cap_t *stren
* signal or the IO MUX/GPIO configuration is modified (including input enable, output enable, output value,
* function, and drive strength values). This function can be used to retain the state of GPIOs when the power
* domain of where GPIO/IOMUX belongs to becomes off. For example, chip or system is reset (e.g. watchdog
* time-out, deep-sleep events are triggered), or peripheral power-down in light-sleep.
* time-out, Deep-sleep events are triggered), or peripheral power-down in Light-sleep.
*
* This function works in both input and output modes, and only applicable to output-capable GPIOs.
* If this function is enabled:
* in output mode: the output level of the GPIO will be locked and can not be changed.
* in input mode: the input read value can still reflect the changes of the input signal.
*
* Power down or call `gpio_hold_dis` will disable this function.
*
* Please be aware that,
*
* On ESP32P4, the states of IOs can not be hold after waking up from Deep-sleep.
* 1. USB pads cannot hold at low level after waking up from Deep-sleep. The USB related registers are reset, so the USB pull-up is back.
*
* 2. For ESP32-P4 rev < 3.0, the states of IOs can not be hold after waking up from Deep-sleep.
*
* Additionally, on ESP32/S2/C3/S3/C2, this function cannot be used to hold the state of a digital GPIO during Deep-sleep.
* 3. For ESP32/S2/C3/S3/C2, this function cannot be used to hold the state of a digital GPIO during Deep-sleep.
* Even if this function is enabled, the digital GPIO will be reset to its default state when the chip wakes up from
* Deep-sleep. If you want to hold the state of a digital GPIO during Deep-sleep, please call `gpio_deep_sleep_hold_en`.
*
* Power down or call `gpio_hold_dis` will disable this function.
*
* @param gpio_num GPIO number, only support output-capable GPIOs
*
* @return
Expand Down Expand Up @@ -427,7 +429,7 @@ esp_err_t gpio_hold_en(gpio_num_t gpio_num);
*/
esp_err_t gpio_hold_dis(gpio_num_t gpio_num);

#if SOC_GPIO_SUPPORT_HOLD_IO_IN_DSLP && !SOC_GPIO_SUPPORT_HOLD_SINGLE_IO_IN_DSLP
#if !SOC_GPIO_SUPPORT_HOLD_SINGLE_IO_IN_DSLP
/**
* @brief Enable all digital gpio pads hold function during Deep-sleep.
*
Expand All @@ -451,7 +453,7 @@ void gpio_deep_sleep_hold_en(void);
* @brief Disable all digital gpio pads hold function during Deep-sleep.
*/
void gpio_deep_sleep_hold_dis(void);
#endif //SOC_GPIO_SUPPORT_HOLD_IO_IN_DSLP && !SOC_GPIO_SUPPORT_HOLD_SINGLE_IO_IN_DSLP
#endif //!SOC_GPIO_SUPPORT_HOLD_SINGLE_IO_IN_DSLP

/**
* @brief Set pad input to a peripheral signal through the IOMUX.
Expand Down
6 changes: 3 additions & 3 deletions components/esp_driver_gpio/src/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
#include "esp_err.h"
#include "freertos/FreeRTOS.h"
#include "esp_heap_caps.h"
#include "sdkconfig.h"
#include "driver/gpio.h"
#include "driver/rtc_io.h"
#include "soc/interrupts.h"
#if !CONFIG_FREERTOS_UNICORE
#include "esp_ipc.h"
#endif

#include "soc/soc_caps.h"
#include "soc/gpio_periph.h"
#include "esp_log.h"
Expand Down Expand Up @@ -775,7 +775,7 @@ esp_err_t gpio_hold_dis(gpio_num_t gpio_num)
return ret;
}

#if SOC_GPIO_SUPPORT_HOLD_IO_IN_DSLP && !SOC_GPIO_SUPPORT_HOLD_SINGLE_IO_IN_DSLP
#if !SOC_GPIO_SUPPORT_HOLD_SINGLE_IO_IN_DSLP
void gpio_deep_sleep_hold_en(void)
{
portENTER_CRITICAL(&gpio_context.gpio_spinlock);
Expand All @@ -789,7 +789,7 @@ void gpio_deep_sleep_hold_dis(void)
gpio_hal_deep_sleep_hold_dis(gpio_context.gpio_hal);
portEXIT_CRITICAL(&gpio_context.gpio_spinlock);
}
#endif //SOC_GPIO_SUPPORT_HOLD_IO_IN_DSLP && !SOC_GPIO_SUPPORT_HOLD_SINGLE_IO_IN_DSLP
#endif //!SOC_GPIO_SUPPORT_HOLD_SINGLE_IO_IN_DSLP

#if SOC_GPIO_SUPPORT_FORCE_HOLD
esp_err_t IRAM_ATTR gpio_force_hold_all()
Expand Down
35 changes: 28 additions & 7 deletions components/esp_driver_gpio/test_apps/gpio/main/test_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -884,7 +884,7 @@ TEST_CASE("GPIO_light_sleep_wake_up_test", "[gpio][ignore]")
}
#endif

#if SOC_DEEP_SLEEP_SUPPORTED && SOC_GPIO_SUPPORT_HOLD_IO_IN_DSLP
#if SOC_DEEP_SLEEP_SUPPORTED
// Pick one digital IO for each target to test is enough
static void gpio_deep_sleep_hold_test_first_stage(void)
{
Expand All @@ -902,7 +902,9 @@ static void gpio_deep_sleep_hold_test_first_stage(void)
.pull_up_en = 0,
};
TEST_ESP_OK(gpio_config(&io_conf));
TEST_ESP_OK(gpio_set_level(io_num, 0));

const bool initial_level = gpio_get_level(io_num);
TEST_ESP_OK(gpio_set_level(io_num, !initial_level));

// Enable global persistence
TEST_ESP_OK(gpio_hold_en(io_num));
Expand All @@ -911,6 +913,10 @@ static void gpio_deep_sleep_hold_test_first_stage(void)
// Extra step is required, so that all digital IOs can automatically get held when entering Deep-sleep
gpio_deep_sleep_hold_en();
#endif
vTaskDelay(pdMS_TO_TICKS(200));
TEST_ESP_OK(gpio_set_level(io_num, initial_level));
TEST_ASSERT_EQUAL_INT(!initial_level, gpio_get_level(io_num));
vTaskDelay(pdMS_TO_TICKS(200));

esp_deep_sleep_start();
}
Expand All @@ -921,16 +927,31 @@ static void gpio_deep_sleep_hold_test_second_stage(void)
// Check reset reason is waking up from deepsleep
TEST_ASSERT_EQUAL(ESP_RST_DEEPSLEEP, esp_reset_reason());

// Pin should stay at low level after the deep sleep
TEST_ASSERT_EQUAL_INT(0, gpio_get_level(io_num));
#if !CONFIG_ESP32P4_SELECTS_REV_LESS_V3 // DIG-399
bool level = gpio_get_level(io_num);
// Set level should not take effect since hold is still active (and the INPUT_OUTPUT mode should still be held)
TEST_ESP_OK(gpio_set_level(io_num, 1));
TEST_ASSERT_EQUAL_INT(0, gpio_get_level(io_num));
TEST_ESP_OK(gpio_set_level(io_num, !level));
TEST_ASSERT_EQUAL_INT(level, gpio_get_level(io_num));
#endif

#if !SOC_GPIO_SUPPORT_HOLD_SINGLE_IO_IN_DSLP
gpio_deep_sleep_hold_dis();
#endif
TEST_ESP_OK(gpio_hold_dis(io_num));

gpio_config_t io_conf = {
.intr_type = GPIO_INTR_DISABLE,
.mode = GPIO_MODE_INPUT_OUTPUT,
.pin_bit_mask = (1ULL << io_num),
.pull_down_en = GPIO_PULLDOWN_DISABLE,
.pull_up_en = GPIO_PULLUP_DISABLE,
};
TEST_ESP_OK(gpio_config(&io_conf));

#if !CONFIG_ESP32P4_SELECTS_REV_LESS_V3 // DIG-399
// Check that the hold level after wakeup is the level before entering deep sleep
TEST_ASSERT_EQUAL_INT(!level, gpio_get_level(io_num));
#endif
}

/*
Expand All @@ -942,4 +963,4 @@ static void gpio_deep_sleep_hold_test_second_stage(void)
TEST_CASE_MULTIPLE_STAGES("GPIO_deep_sleep_output_hold_test", "[gpio]",
gpio_deep_sleep_hold_test_first_stage,
gpio_deep_sleep_hold_test_second_stage)
#endif // SOC_DEEP_SLEEP_SUPPORTED && SOC_GPIO_SUPPORT_HOLD_IO_IN_DSLP
#endif // SOC_DEEP_SLEEP_SUPPORTED
1 change: 1 addition & 0 deletions components/esp_driver_gpio/test_apps/gpio/main/test_gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ extern "C" {
#define TEST_GPIO_EXT_IN_IO (3)
#define TEST_GPIO_INPUT_LEVEL_LOW_PIN (1)
#define TEST_GPIO_SIGNAL_IDX (SIG_IN_FUNC250_IDX)
#define TEST_GPIO_DEEP_SLEEP_HOLD_PIN (28)
#elif CONFIG_IDF_TARGET_ESP32H2
#define TEST_GPIO_EXT_OUT_IO (2)
#define TEST_GPIO_EXT_IN_IO (3)
Expand Down
6 changes: 4 additions & 2 deletions components/esp_driver_gpio/test_apps/gpio/main/test_rtcio.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ TEST_CASE("RTCIO_output_hold_test", "[rtcio]")
#endif //SOC_RTCIO_HOLD_SUPPORTED
#endif //SOC_RTCIO_INPUT_OUTPUT_SUPPORTED

#if SOC_DEEP_SLEEP_SUPPORTED && SOC_GPIO_SUPPORT_HOLD_IO_IN_DSLP
#if SOC_DEEP_SLEEP_SUPPORTED
// It is not necessary to test every rtcio pin, it will take too much ci testing time for deep sleep
// Only tests on s_test_map[TEST_RTCIO_DEEP_SLEEP_PIN_INDEX] pin
// The default configuration of these pads is low level
Expand Down Expand Up @@ -268,8 +268,10 @@ static void rtcio_deep_sleep_hold_test_second_stage(void)
int io_num = s_test_map[TEST_RTCIO_DEEP_SLEEP_PIN_INDEX];
// Check reset reason is waking up from deepsleep
TEST_ASSERT_EQUAL(ESP_RST_DEEPSLEEP, esp_reset_reason());
#if !CONFIG_ESP32P4_SELECTS_REV_LESS_V3 // DIG-399
// Pin should stay at high level after the deep sleep
TEST_ASSERT_EQUAL_INT(1, gpio_get_level(io_num));
#endif

gpio_hold_dis(io_num);
}
Expand All @@ -283,4 +285,4 @@ static void rtcio_deep_sleep_hold_test_second_stage(void)
TEST_CASE_MULTIPLE_STAGES("RTCIO_deep_sleep_output_hold_test", "[rtcio]",
rtcio_deep_sleep_hold_test_first_stage,
rtcio_deep_sleep_hold_test_second_stage)
#endif // SOC_DEEP_SLEEP_SUPPORTED && SOC_GPIO_SUPPORT_HOLD_IO_IN_DSLP
#endif // SOC_DEEP_SLEEP_SUPPORTED
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ const int s_test_map[TEST_GPIO_PIN_COUNT] = {
GPIO_NUM_14, //GPIO14
GPIO_NUM_15, //GPIO15
};
#define TEST_RTCIO_DEEP_SLEEP_PIN_INDEX 5 // IO5
#elif CONFIG_IDF_TARGET_ESP32C61 || CONFIG_IDF_TARGET_ESP32C5
// Has no input-only rtcio pins, all pins support pull-up/down
#define RTCIO_SUPPORT_PU_PD(num) 1
Expand Down
3 changes: 3 additions & 0 deletions components/esp_driver_isp/src/isp_bf.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ esp_err_t esp_isp_bf_configure(isp_proc_handle_t proc, const esp_isp_bf_config_t
isp_hal_bf_config(&(proc->hal), NULL);
}

bool valid = isp_ll_shadow_update_bf(proc->hal.hw);
ESP_RETURN_ON_FALSE_ISR(valid, ESP_ERR_INVALID_STATE, TAG, "failed to update bf shadow register");

return ESP_OK;
}

Expand Down
3 changes: 3 additions & 0 deletions components/esp_driver_isp/src/isp_blc.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ esp_err_t esp_isp_blc_configure(isp_proc_handle_t isp_proc, const esp_isp_blc_co
// Configure stretch enable for each channel
isp_ll_blc_enable_stretch(isp_proc->hal.hw, config->stretch.top_left_chan_stretch_en, config->stretch.top_right_chan_stretch_en, config->stretch.bottom_left_chan_stretch_en, config->stretch.bottom_right_chan_stretch_en);

bool valid = isp_ll_shadow_update_blc(isp_proc->hal.hw);
ESP_RETURN_ON_FALSE_ISR(valid, ESP_ERR_INVALID_STATE, TAG, "failed to update blc shadow register");

return ESP_OK;
}

Expand Down
3 changes: 3 additions & 0 deletions components/esp_driver_isp/src/isp_ccm.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,14 @@ esp_err_t esp_isp_ccm_configure(isp_proc_handle_t proc, const esp_isp_ccm_config
ESP_RETURN_ON_FALSE(proc && ccm_cfg, ESP_ERR_INVALID_ARG, TAG, "invalid argument: null pointer");

bool ret = true;
bool valid = false;
portENTER_CRITICAL(&proc->spinlock);
isp_ll_ccm_set_clk_ctrl_mode(proc->hal.hw, ISP_LL_PIPELINE_CLK_CTRL_AUTO);
ret = isp_hal_ccm_set_matrix(&proc->hal, ccm_cfg->saturation, ccm_cfg->matrix);
valid = isp_ll_shadow_update_ccm(proc->hal.hw);
portEXIT_CRITICAL(&proc->spinlock);
ESP_RETURN_ON_FALSE(ret, ESP_ERR_INVALID_ARG, TAG, "invalid argument: ccm matrix contain NaN or out of range");
ESP_RETURN_ON_FALSE(valid, ESP_ERR_INVALID_STATE, TAG, "failed to update ccm shadow register");

return ESP_OK;
}
Expand Down
3 changes: 3 additions & 0 deletions components/esp_driver_isp/src/isp_color.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ esp_err_t esp_isp_color_configure(isp_proc_handle_t proc, const esp_isp_color_co
isp_hal_color_config(&(proc->hal), NULL);
}

bool valid = isp_ll_shadow_update_color(proc->hal.hw);
ESP_RETURN_ON_FALSE_ISR(valid, ESP_ERR_INVALID_STATE, TAG, "failed to update color shadow register");

return ESP_OK;
}

Expand Down
2 changes: 2 additions & 0 deletions components/esp_driver_isp/src/isp_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ esp_err_t esp_isp_new_processor(const esp_isp_processor_cfg_t *proc_config, isp_
isp_ll_set_byte_swap(proc->hal.hw, true);
}

isp_ll_shadow_set_mode(proc->hal.hw, ISP_SHADOW_MODE_UPDATE_ONLY_NEXT_VSYNC);

proc->in_color_format = in_color_format;
proc->out_color_format = out_color_format;
proc->h_res = proc_config->h_res;
Expand Down
3 changes: 3 additions & 0 deletions components/esp_driver_isp/src/isp_sharpen.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ esp_err_t esp_isp_sharpen_configure(isp_proc_handle_t proc, const esp_isp_sharpe
isp_hal_sharpen_config(&(proc->hal), NULL);
}

bool valid = isp_ll_shadow_update_sharpen(proc->hal.hw);
ESP_RETURN_ON_FALSE_ISR(valid, ESP_ERR_INVALID_STATE, TAG, "failed to update sharp shadow register");

return ESP_OK;
}

Expand Down
3 changes: 3 additions & 0 deletions components/esp_driver_isp/src/isp_wbg.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ esp_err_t esp_isp_wbg_set_wb_gain(isp_proc_handle_t isp_proc, isp_wbg_gain_t gai
// Set WBG gain
isp_ll_awb_set_wb_gain(isp_proc->hal.hw, gain);

bool valid = isp_ll_shadow_update_wbg(isp_proc->hal.hw);
ESP_RETURN_ON_FALSE_ISR(valid, ESP_ERR_INVALID_STATE, TAG, "failed to update wbg shadow register");

return ESP_OK;
}

Expand Down
12 changes: 12 additions & 0 deletions components/esp_driver_usb_serial_jtag/src/usb_serial_jtag_vfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,10 @@ static int usb_serial_jtag_rx_char_no_driver(int fd)

static ssize_t usb_serial_jtag_write(int fd, const void * data, size_t size)
{
if (!usb_serial_jtag_is_connected()) {
// TODO: IDF-14303
return -1;
}
const char *data_c = (const char *)data;
/* Even though newlib does stream locking on each individual stream, we need
* a dedicated lock if two streams (stdout and stderr) point to the
Expand Down Expand Up @@ -226,6 +230,10 @@ static void usb_serial_jtag_return_char(int fd, int c)

static ssize_t usb_serial_jtag_read(int fd, void* data, size_t size)
{
if (!usb_serial_jtag_is_connected()) {
// TODO: IDF-14303
return -1;
}
assert(fd == USJ_LOCAL_FD);
char *data_c = (char *) data;
size_t received = 0;
Expand Down Expand Up @@ -349,6 +357,10 @@ static int usb_serial_jtag_wait_tx_done_no_driver(int fd)

static int usb_serial_jtag_fsync(int fd)
{
if (!usb_serial_jtag_is_connected()) {
// TODO: IDF-14303
return -1;
}
_lock_acquire_recursive(&s_ctx.write_lock);
int r = s_ctx.fsync_func(fd);
_lock_release_recursive(&s_ctx.write_lock);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ TEST_CASE("see if fsync appears to work", "[usb_serial_jtag]")
start_us = esp_timer_get_time();
fsync(0);
end_us = esp_timer_get_time();
vTaskDelay(pdMS_TO_TICKS(500));
printf("With data in queue: %d us\n", (int)(end_us - start_us));
TEST_ASSERT_GREATER_THAN_INT(1000, end_us - start_us);
TEST_ASSERT_LESS_THAN_INT(45000, end_us - start_us); //50ms means fsync hit a timeout
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ esp_err_t esp_sleep_sub_mode_force_disable(esp_sleep_sub_mode_t mode);
*/
int32_t* esp_sleep_sub_mode_dump_config(FILE *stream);

#if SOC_GPIO_SUPPORT_HOLD_IO_IN_DSLP && !SOC_GPIO_SUPPORT_HOLD_SINGLE_IO_IN_DSLP
#if !SOC_GPIO_SUPPORT_HOLD_SINGLE_IO_IN_DSLP
/**
* @brief Isolate all digital IOs except those that are held during deep sleep
*
Expand Down
15 changes: 15 additions & 0 deletions components/esp_hw_support/port/esp32p4/private_include/pmu_param.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <esp_types.h>
#include "soc/pmu_struct.h"
#include "hal/pmu_hal.h"
#include "sdkconfig.h"

#ifdef __cplusplus
extern "C" {
Expand Down Expand Up @@ -330,6 +331,7 @@ typedef struct {
} pmu_sleep_digital_config_t;


#if CONFIG_ESP32P4_SELECTS_REV_LESS_V3
#define PMU_SLEEP_DIGITAL_DSLP_CONFIG_DEFAULT(sleep_flags) { \
.syscntl = { \
.dig_pad_slp_sel = 0, \
Expand All @@ -343,6 +345,19 @@ typedef struct {
.lp_pad_hold_all = (sleep_flags & PMU_SLEEP_PD_LP_PERIPH) ? 1 : 0, \
} \
}
#else // !CONFIG_ESP32P4_SELECTS_REV_LESS_V3
#define PMU_SLEEP_DIGITAL_DSLP_CONFIG_DEFAULT(sleep_flags) { \
.syscntl = { \
.dig_pad_slp_sel = 0, \
} \
}

#define PMU_SLEEP_DIGITAL_LSLP_CONFIG_DEFAULT(sleep_flags) { \
.syscntl = { \
.dig_pad_slp_sel = 0, \
} \
}
#endif

typedef struct {
struct {
Expand Down
4 changes: 2 additions & 2 deletions components/esp_hw_support/sleep_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ void esp_sleep_enable_gpio_switch(bool enable)
}
}

#if SOC_GPIO_SUPPORT_HOLD_IO_IN_DSLP && !SOC_GPIO_SUPPORT_HOLD_SINGLE_IO_IN_DSLP
#if !SOC_GPIO_SUPPORT_HOLD_SINGLE_IO_IN_DSLP
IRAM_ATTR void esp_sleep_isolate_digital_gpio(void)
{
gpio_hal_context_t gpio_hal = {
Expand Down Expand Up @@ -182,7 +182,7 @@ IRAM_ATTR void esp_sleep_isolate_digital_gpio(void)
}
}
}
#endif //SOC_GPIO_SUPPORT_HOLD_IO_IN_DSLP && !SOC_GPIO_SUPPORT_HOLD_SINGLE_IO_IN_DSLP
#endif //!SOC_GPIO_SUPPORT_HOLD_SINGLE_IO_IN_DSLP

#if SOC_DEEP_SLEEP_SUPPORTED
void esp_deep_sleep_wakeup_io_reset(void)
Expand Down
Loading