Commit Graph
31 Commits
Author SHA1 Message Date
Meet Patel fd951bfdba Merge branch 'refactor/wdt_soc_supported_guard' into 'master'
refactor(system): wrap WDT code under SOC_WDT_SUPPORTED

Closes IDF-14860

See merge request espressif/esp-idf!46457
2026-03-25 09:47:58 +05:30
Meet Patel c4e2fe2c8b refactor(system): guard WDT with SoC capability macros
Wrap MWDT-related code under SOC_WDT_SUPPORTED so targets without a main
watchdog can compile.

Add SOC_RTC_WDT_SUPPORTED for RTC watchdog usage (bootloader, slow-clock
paths) and regenerate Kconfig.soc_caps.in. Bootloader RWDT setup stays
under SOC_RTC_WDT_SUPPORTED; MWDT flashboot teardown stays under
SOC_WDT_SUPPORTED.

ESP_INT_WDT, ESP_TASK_WDT_EN, and BOOTLOADER_WDT_ENABLE depend on
SOC_WDT_SUPPORTED where applicable. Build xt_wdt.c only when
SOC_XT_WDT_SUPPORTED. Provide no-op panic WDT helpers when
SOC_WDT_SUPPORTED is disabled.
2026-03-24 14:57:43 +05:30
Meet Patel 3cef5673ff Merge branch 'refactor/enable_fsm_and_riscv_ulp_simultaneously' into 'master'
refactor(ulp): Allow both ULP-FSM and ULP-RISCV to enable at build time

Closes IDFGH-11916

See merge request espressif/esp-idf!45751
2026-03-17 19:29:43 +05:30
Meet Patel 5df38b48f4 docs(ulp): Updated the docs for ULP fsm and ULP riscv support
Updated the documentation of ULP, as we have updated kconfig options
and build files to allow selecting both ULP FSM and ULP RISCV
simultaneously at compile time.
2026-03-16 22:09:06 +05:30
Meet Patel 13f894799c feat(ulp): New example to show ulp fsm and riscv used in same app
This example shows how to have both ULP FSM and RISCV enabled in kconfig
simultaneously, and use them one after another at run time. A new
parameter TYPE is passed to ulp_embed_binary() function to specify fsm
or riscv in CMakeLists.txt. This way, both ulp_fsm and ulp_riscv source
files can be compiled by their respective toolchains under the same
project.

The example shows ULP FSM incrementing a counter from 0 to 100, ULP
RISC-V incrementing from 100 to 500 and main CPU incrementing from 500
to 1500.
2026-03-15 14:01:30 +05:30
Meet Patel a3f167f1c4 refactor(ulp): Allow both ULP-FSM and ULP-RISCV to enable at build time
Updated kconfig option type and other supporting changes in build system
to allow enabling both ULP FSM and ULP RISCV simultaneously. Users can
choose at run time which one to initialize and use.
NOTE: Both ULP FSM and ULP RISCV can't be used simultaneously at run
time because they share some common hardware like RTC slow memory space.

Closes https://github.com/espressif/esp-idf/issues/12999
2026-03-15 14:01:30 +05:30
Meet Patel b9210b3474 Merge branch 'contrib/github_pr_18208' into 'master'
fix(ulp): correct LP I2C interrupt wait cycle duration (GitHub PR)

Closes IDFGH-17203

See merge request espressif/esp-idf!45931
2026-02-24 10:35:26 +05:30
Meet Patel 7b30754d33 fix(ulp): correct ULP LP and RISCV interrupt wait cycle duration
Current implementation of interrupt wait cycle calculation depends on a
delay and local counter method, which is inaccurate in achieving precise
timeouts. This commit updates the implementaion to use CPU cycles
instead, as they are more accurate.

Closes https://github.com/espressif/esp-idf/pull/18208
2026-02-19 13:32:31 +05:30
Meet Patel cc4c3380f1 Merge branch 'bugfix/fence_instruction_spinlock' into 'master'
fix(spinlock): Added fence instruction in spinlock acquire and release

Closes IDFCI-3828

See merge request espressif/esp-idf!44815
2026-01-07 17:45:28 +05:30
Meet Patel 4b02a7e320 fix(spinlock): Added fence instruction in spinlock acquire and release
The existing spinlock mechanism possibly has an overlap of memory
operations during multi core execution, as visible in CI testing. When
running the example inter_cpu_critical_section, shared count increment
stops at 299999 instead of reaching 300000, but this only happens
randomly 1 out of 10 times. It is suspected that a memory operation
happens simultaneously from both core, even though spinlock protection
is in place.

To handle this problem, a memory barrier (fence instruction) is added
at critical places during spinlock acquire and release, to ensure that
all memory operations upto that point are completed and synchronised
before proceeding further.
2026-01-06 10:13:00 +05:30
Meet Patel a07b83fcb9 refactor(lp_wdt): Remove reference of JIRA ticket from code
No further actions for this JIRA ticket are pending. The neccessary test
cases have already been added to verify some additional functionalities.
Hence, removing the TODO reference from code for internal JIRA ticket.
2026-01-05 09:54:11 +05:30
Meet Patel 12a1ecc8b7 Merge branch 'bugfix/adc_read_ci_issue2' into 'master'
fix(lp_adc): Fix LP ADC 1-byte read CI issue on ESP32P4

Closes IDFCI-5374 and IDFCI-5375

See merge request espressif/esp-idf!44637
2025-12-30 13:04:57 +05:30
Meet Patel 017ae532c0 fix(lp_adc): Fix LP ADC 1-byte read CI issue on ESP32P4
This is a follow up commit on top of below commit:
c061c781a3

This commit further increases the ADC_TEST_LOW_VAL threshold from 2165
to 2200, because some tests were found to be failing with ADC reading
values such as 2171, 2172, 2182 etc. Suspecting the ADC callibration or
surrounding temperature to cause such fluctuations which need higher
threshold to avoid test failures.
2025-12-29 13:26:14 +05:30
Meet Patel 1099383968 Merge branch 'docs/watchdog_api_doc_changes' into 'master'
docs(watchdogs): Updating API reference guide for Watchdog Timer

Closes IDF-2756 and IDF-2009

See merge request espressif/esp-idf!44202
2025-12-22 11:40:51 +05:30
Meet Patel f131522ca1 Merge branch 'bugfix/adc_read_ci_issue' into 'master'
fix(lp_adc): Fix LP ADC 1-byte read CI issue on ESP32P4

Closes IDFCI-5374 and IDFCI-5375

See merge request espressif/esp-idf!44363
2025-12-22 11:39:15 +05:30
Meet Patel 275f4469d7 docs(watchdogs): Updating API reference guide for Watchdog Timer
Updated the watchdog timer API reference guide to improve explanation
of some existing points.

Also added two new sections in the document:
1. Timeout Stages
2. Common error logs when WDT triggers and possible resolutions
2025-12-18 12:11:34 +05:30
Meet Patel c061c781a3 fix(lp_adc): Fix LP ADC 1-byte read CI issue on ESP32P4
The low power ADC in ESP32P4 sometimes reads the data value as 2160,
2161 or a bit greater than that when running the CI test case named
esp32p4.defaults.test_lp_core -> LP ADC 1 raw read stress test. However,
the test only passes if value stays below the LOW_VAL threshold of 2160.
Hence, updated the LOW_VAL threshold to 2165 keeping some margin,
because ADC readings may differ slightly from board to board, so this
type of small variations in ADC values are expected.
2025-12-18 11:18:39 +05:30
Meet Patel b11ce34971 Merge branch 'contrib/github_pr_17848' into 'master'
Bump up log_v2's max arg count (GitHub PR)

Closes IDFGH-16764

See merge request espressif/esp-idf!43256
2025-11-12 10:02:34 +05:30
Meet Patel b340a1ff15 Merge branch 'bugfix/rtc_wdt_test_app' into 'master'
fix(test_rtc_wdt): Fixed CI test failures for RTC WDT by increasing margin

Closes IDFCI-4816, IDFCI-4835, IDFCI-5863, IDFCI-4799, and IDFCI-4817

See merge request espressif/esp-idf!42959
2025-10-29 12:18:22 +05:30
Meet Patel 4b7a049ad7 fix(test_rtc_wdt): Fixed CI test failures for RTC WDT by increasing margin
The CI tests for RTC WDT test app were failing because we allowed only
20% margin between configured vs actual timeout of wdt. However, the
RC oscillator accuracy on some boards is very poor and it results in
almost 25% difference between configured and actual timeout. Hence,
increased the failure margin from 20% to 30%. Also some boards like
ESP32P4 have known problem and gives timeout after twice the configured
time. Hence, increased the wdt interrupt wait time to three times the
configured value, so we don't miss the interrupts for such boards.
2025-10-28 09:54:54 +05:30
Meet Patel fbe73cce82 Merge branch 'bugfix/esp_event_performance_test_fix' into 'master'
fix(esp_event): Updated minimum events dispatched test pass criteria

Closes IDF-12299

See merge request espressif/esp-idf!42714
2025-10-27 12:04:57 +05:30
Meet Patel 510a7f792e fix(esp_event): Updated minimum events dispatched test pass criteria
For the dual core chips like ESP32H4 that are running on slow CPU
clock frequency (96MHz), the number of events getting dispatched in
the test case called "performance test - no dedicated task" were
falling short of expectation because of extra overhead with locks
etc when runing with a non dedicated task. Even for other chips like
ESP32S3, if the main CPU core is running at 80MHz, the result is same.
Hence, added a consideration for CPU clock frequency when deciding
pass criteria for this test case.
2025-10-23 10:32:19 +05:30
Meet Patel 6491647fcb Merge branch 'feature/rtc_wdt_test_app' into 'master'
feat(rtc_wdt): Added unity app to test rtc watchdog timer functions

Closes IDF-12273

See merge request espressif/esp-idf!42568
2025-10-16 12:55:13 +05:30
Meet Patel 9b86dc25ab feat(rtc_wdt): Added unity app to test rtc watchdog timer functions
Unity based test app configures RTC WDT to verify following features:
1. Verify all 4 stages of RTC WDT are able to trigger timeout and
   invoke the pre-configured interrupt service routine
2. Verify RTC WDT can reset the main SYSTEM or main SYSTEM + RTC
2025-10-15 12:14:19 +05:30
Meet Patel 0f776d31ae Merge branch 'feature/ulp_riscv_pulse_counter_example' into 'master'
feat(ulp_riscv): Add pulse counter example code for ulp riscv

Closes IDF-14106

See merge request espressif/esp-idf!42107
2025-09-30 10:13:21 +05:30
Meet Patel af895be8f6 feat(ulp_riscv): Add pulse counter example code for ulp riscv
Added a pulse counter example code for ulp riscv chips. The example
works by HP core generating high frequency pulses on a GPIO, which
are counted by ULP core to find out the highest possible frequency
of pulses that can be achieved without missing any edges.
2025-09-26 15:59:07 +05:30
Meet Patel b59b3665c5 Merge branch 'refactor/lp_core_i2c_esp32c5_support' into 'master'
refactor(lp_core_i2c): Modify lp_core_i2c header to support ESP32C5

Closes IDF-14065

See merge request espressif/esp-idf!41885
2025-09-16 10:55:43 +05:30
Meet Patel 93cbfcf139 refactor(lp_core_i2c): Modify lp_core_i2c header to support ESP32C5
lp_core_i2c.h header file has sda and scl pins hardcoded to GPIO6 and
GPIO7 which works only for ESP32C6. ESP32C5 uses GPIO2 and GPIO3 for
I2C SDA and SCL. Hence, added LP_I2C_SCL_IO and LP_I2C_SDA_IO macros
under conditional compilation in library header file, so there is no
need to hardcode I2C GPIO pins and any other test apps or examples
that are including the LP I2C header file can also use Macro directly.
2025-09-15 17:30:20 +05:30
Meet Patel 031a2f2f71 Merge branch 'refactor/ulp_riscv_i2c_logs' into 'master'
refactor(ulp_riscv): Modify i2c read/write API for better logging and return error code

Closes IDFGH-16269 and IDFGH-15237

See merge request espressif/esp-idf!41342
2025-08-22 10:35:37 +05:30
Meet Patel f5b7cb6766 refactor(ulp_riscv): Modify ulp i2c read/write functions to return error code
Updated the i2c read/write APIs ulp_riscv_i2c_master_read_from_device
and ulp_riscv_i2c_master_write_to_device in ulp_riscv component to
return error codes back to the application

Closes https://github.com/espressif/esp-idf/issues/15904
2025-08-20 14:16:44 +05:30
Meet Patel 7abc48157e refactor(ulp_riscv): Modify ESP_EARLY_LOG to ESP_LOG and move it outside critical section
Moved the error logs outside critical section for i2c communication errors
like READ fail, WRITE fail etc. in the ulp_riscv_i2c component

Also changed the error log API from ESP_EARLY_LOG to ESP_LOG, so we can support
tag based filtering and enabling/disabling of logs

Closes https://github.com/espressif/esp-idf/issues/17425
2025-08-20 14:16:44 +05:30