Commit Graph
100 Commits
Author SHA1 Message Date
Jiang Jiang Jian 5fc1e1be13 Merge branch 'backport/lp_spi_fix_inline_v5.5' into 'release/v5.5'
fix(ulp/lp_spi): fix stale data in driver (v5.5)

See merge request espressif/esp-idf!51311
2026-08-06 12:02:56 +08:00
Jiang Jiang Jian 8c7d44897e Merge branch 'fix/lp_uart_data_bits_v5.5' into 'release/v5.5'
fix(ulp/lp_core): fix LP UART data_bits validation and add full word-length test coverage (v5.5)

See merge request espressif/esp-idf!48032
2026-08-05 13:56:42 +08:00
Marius Vikhammer ddfd2934ef test(ulp): check LP core apps avoid soft-float helpers
Inspect generated LP core ELF files so accidental floating-point helper linkage is caught in CI.
2026-07-29 14:47:48 +02:00
Sudeep Mohanty d93b5289ab test(ulp/lp_spi): improve test stability and add cleanup
Reset the LP SPI peripheral and GPIOs before and after every SPI case so
each test starts from a known-clean baseline, and gate the master on an
explicit slave-armed handshake so the master cannot clock the bus while
the slave is still in its arm prologue. Verify received data against the
expected pattern with bounded waits instead of merely logging it.

Add a dedicated LP SPI multi-device pytest for esp32p4 that runs the
retagged lp_core_spi cases, and tag the LP I2C case accordingly.
2026-07-29 14:46:32 +02:00
Sudeep Mohanty f5f061601a test(lp_core): add LP UART read_bytes multi-device tests
Made-with: Cursor
2026-07-27 15:35:30 +02:00
Sudeep Mohanty 63e1ee965f fix(lp_core): fix multi-device LP UART test failures on esp32p4
The multi-device LP UART tests were failing on esp32p4 due to several
issues in the test harness:

- LP ROM boot banner: On chips with LP ROM (esp32p4), the LP core emits
  a ROM banner on LP UART during startup, corrupting the first bytes of
  test data. Set skip_lp_rom_boot=true in the ULP config for write, read
  and mismatch tests to suppress this.

- Stale FIFO data: The HP UART RX FIFO could accumulate garbage during
  pin mux setup. Add uart_flush_input() after HP UART driver installation
  and before each read phase. Call lp_core_uart_clear_buf() before LP-side
  read tests to flush the LP UART RX FIFO as well.

- Missing synchronization: The HP reader could start listening before
  the LP transmitter was ready (or vice versa), causing data loss at
  higher baud rates. Add signal exchange (unity_send_signal /
  unity_wait_for_signal) to coordinate LP-to-HP data transfers.

- Short read timeout: The uart_read_bytes() timeout of 10 ms was too
  aggressive for slower baud rates. Increase to 100 ms.

Made-with: Cursor
2026-07-27 15:35:30 +02:00
Sudeep Mohanty 08195c3e36 test(lp_core): use soc_filtered_targets for all LP core pytest parametrization
Several LP core pytest files were either hardcoded to specific chip lists
or using a less-precise SOC capability filter:

- test_lp_core_multi_device: was locked to ['esp32c6'] pending a workaround
  for LP I2C on esp32p4; all three active LP core chips now have
  SOC_LP_I2C_SUPPORTED=1, so switch to soc_filtered_targets.

- test_lp_uart_wakeup_modes: was using SOC_LP_CORE_SUPPORTED which is
  semantically wrong for a UART test; change to SOC_ULP_LP_UART_SUPPORTED.

- LP core example pytests (build_system, interrupt, gpio_intr_pulse_counter,
  lp_timer_interrupt): replace hardcoded ['esp32c5', 'esp32c6', 'esp32p4']
  with soc_filtered_targets('SOC_LP_CORE_SUPPORTED == 1') so that new
  chips automatically get coverage when their SOC cap is enabled.
2026-07-27 15:35:30 +02:00
Sudeep Mohanty c0f555d799 test(lp_core): extend LP UART multi-device test coverage
Refactor the LP UART multi-device tests to use a single parameterised
helper pair (test_lp_uart_write_cfg / test_lp_uart_read_cfg) instead of
one-off functions per config, and extend coverage to:

- write and read tests for 5-, 6-, 7-bit and even-parity configurations
- negative tests: word-length mismatch (FRAM_ERR recovery on LP side,
  garbled receive on HP side)
- LP GPIO Matrix routing tests (SOC_LP_GPIO_MATRIX_SUPPORTED chips only):
  swaps the default TX/RX GPIO numbers so both pins go through the LP GPIO
  Matrix, covering the lp_gpio_connect_in/out_signal() branch of
  lp_uart_config_io() that was previously untested at the data-transfer
  level; the same physical cross-wiring as all other LP UART tests is reused

Add rtc_gpio_deinit() cleanup at the end of single-board LP UART tests
so configured pins are returned to HP/digital mode and do not interfere
with subsequent tests that may reuse the same GPIOs.
2026-07-27 15:35:30 +02:00
Sudeep Mohanty fd466db9f6 fix(lp_core): fix LP UART init parameter validation
Align data_bits, flow_ctrl, and rx_flow_ctrl_thresh checks with uart_param_config().

Made-with: Cursor
2026-07-27 15:35:30 +02:00
Sudeep MohantyandCursor a9ea3ff796 fix(ulp): make LP peripheral default config macros C++ compatible
Use dual-path macros: C keeps fragment-style designated initializers;
C++ uses GNU statement expressions (ESP_LOG_CONFIG_INIT pattern).
Add compile-only C++ regression tests for LP UART/I2C and ULP RISC-V I2C.

Closes https://github.com/espressif/esp-idf/issues/18369

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-30 15:40:36 +02:00
hebinglin ab7f6a6d95 fix(ulp): fix lp uart keep wakeup triggered 2026-06-15 15:18:31 +08:00
hebinglin 604faf8fe2 change(ulp): add HP Core wakeup causes save test cases 2026-06-02 16:58:41 +08:00
Sudeep MohantyandCursor ed852d95c8 fix(ulp_riscv_i2c): Fix spurious pass in RTC I2C multi-device test
The test was passing without real I2C communication due to a GPIO
mismatch (slave on GPIO 6/7 vs RTC I2C master on GPIO 2/3), single-byte
zero-coincidence, unchecked ULP return values, and an insufficient
RTC I2C timeout.

Fix slave GPIOs, increase test length, check I2C return values, add
proper assertions, and set an adequate RTC I2C timeout.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-15 14:55:49 +02:00
Konstantin Kondrashov 325ebb8021 feat(ulp): Improved ULP delay API accuracy and removed floating point operations
Closes https://github.com/espressif/esp-idf/issues/17494
Closes https://github.com/espressif/esp-idf/issues/16891
2026-04-30 15:17:34 +03:00
wanckl 5d37003c47 ci(p4): p4 eco5 enable parts of special tests 2026-04-24 15:09:56 +08:00
Marius Vikhammer fe62bfcc2d fix(esp_hw_support): clear LP core SW interrupt in wake stub before sleep
When ulp_lp_core_wakeup_main_processor() is called, it sets the
PMU_SW_INT_RAW bit on the HP side. The normal sleep path clears this
bit before re-entering sleep, but esp_wake_stub_sleep() did not, leaving
the wakeup cause sticky. This caused the PMU to immediately re-trigger a
wakeup as soon as sleep was requested from the wake stub, producing a
rapid re-wakeup loop that eventually triggered LP_WDT_SYS resets.

Add a test case that verifies the wake stub can return to sleep correctly
across multiple LP core wakeup cycles without the re-wakeup bug.

Closing https://github.com/espressif/esp-idf/issues/18308

Made-with: Cursor
2026-03-27 11:50:35 +08:00
Sudeep Mohanty 660200f05e fix(lp_adc): Update ADC threshold values for LP core LP ADC test 2026-02-09 12:37:17 +01:00
armando 304ba1655b fix check test scripts build issue 2025-11-20 11:33:36 +08:00
armando cdff2570c7 ci(p4): disable p4 rev3 invalid tests temporarily 2025-11-20 11:33:36 +08:00
Marius Vikhammer 17dd84e012 test(ulp): added larger delay in ULP FSM I_WR_REG instruction test
Test is flakey, could possibly be due to the ULP occasionally needing
a bit more time to start up.
2025-11-17 16:23:34 +08:00
Marius Vikhammer 9be2f4f7b0 ci(ulp): reset board between ulp-fsm tests 2025-10-24 11:25:06 +08:00
Meet Patel 9bcf41fa6e 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-16 11:19:32 +05:30
Marius Vikhammer 6e7dab576f Merge branch 'ci/ulp_defaults_config_v5.5' into 'release/v5.5'
ci(ulp): fixed default config not running in CI (v5.5)

See merge request espressif/esp-idf!41611
2025-09-01 14:56:55 +08:00
Marius Vikhammer 19f91cfad9 fix(lp_core): fixed array-bound warning when compiling on P4 with -Os
Closes https://github.com/espressif/esp-idf/issues/17054
2025-08-29 09:57:05 +08:00
Marius Vikhammer 88165f9735 ci(ulp): fixed default config not running in CI 2025-08-29 09:56:38 +08:00
wanckl 7bc929997e ci(esp32c61): enable multi dut runner for c61 2025-07-30 09:32:09 +08:00
Marius Vikhammer da2c5b1228 test(lp_core): re-enabled C5 lp-core test 2025-07-16 08:47:24 +08:00
Sudeep Mohanty a544a33131 change(lp-core): Update LP I2C and LP UART drivers to use raw interrupt status
This commit updates the LP I2C and LP UART drivers to use the raw
interrupt status without enabling the interrupts.
2025-05-19 10:33:10 +02:00
igor.udot daf2d31008 test: format all test scripts 2025-03-05 12:08:48 +08:00
Sudeep Mohanty 800b5f8072 fix(lp_uart): Fixed flaky LP UART unit tests
This commit fixes some flaky LP UART multi device tests. It also adds
code to put the HP core to light sleep for few tests.
2025-02-13 12:28:26 +01:00
igor.udot f742a05b28 feat: supports lp uart wakeup 2025-02-05 14:54:48 +08:00
Song Ruo Jing 486c95557a Merge branch 'bugfix/gpio_8_16_bit_access' into 'master'
feat(gpio): add gpio_config_as_analog() API

Closes IDF-10247 and IDFGH-12754

See merge request espressif/esp-idf!35856
2025-01-10 15:14:19 +08:00
Song Ruo Jing 52c0278361 feat(gpio): add gpio_config_as_analog API 2025-01-08 21:58:12 +08:00
Sudeep Mohanty 24d44e1696 fix(ulp): Added unit tests for ulp binary embed with prefix and misc fixes
This commit:
- Removes the link time symbol name clash detection.
- Extracts symbols of type NOTYPE for global identifiers defined in
  assembly files.
- Makes the prefix argument optional for ulp_add_build_binary_targets().
- Adds a unit test for the ulp binary embed with a prefix feature.
2025-01-08 14:55:58 +08:00
gaoxu cfa487b4e0 ci(adc): enable P4 ADC test and correct ADC performance thresh 2024-12-31 11:28:29 +08:00
Marius Vikhammer 8406735635 fix(lp_core): updated lp rom newlib API addresses 2024-10-24 10:45:55 +08:00
Armando 56af6b5fc4 test(sleep): vad wakeup hp core test 2024-10-16 17:27:27 +08:00
Armando 60c005d1dc test(vad): vad wakeup test 2024-10-16 17:27:27 +08:00
Marius Vikhammer 564d777018 Merge branch 'feature/lp_core_40_mhz' into 'master'
feat(system): support choosing xtal as rtc-fast clock src on P4 and C5

Closes IDF-10203

See merge request espressif/esp-idf!32450
2024-09-20 10:57:15 +08:00
Marius Vikhammer 00eb97725b feat(system): support choosing xtal as rtc-fast clock src on P4 and C5
With xtal as rtc-fast clock source the LP-Core can run at twice the default
clock frequency. 40 MHz as opposed to 20 MHz.
2024-09-19 17:30:44 +08:00
Wu Zheng Hui 6abe40e590 Merge branch 'feature/optimize_esp32p4_active_power_eco1' into 'master'
feat(system): Optimize esp32p4 active state  power consumption

Closes PM-103 and IDF-7688

See merge request espressif/esp-idf!32950
2024-09-11 23:15:29 +08:00
wuzhenghui c41d432397 fix(ulp): fix uart driver delete order in lp uart test case 2024-09-11 10:53:00 +08:00
Sudeep Mohanty 594880dae4 test(lp_adc): Added LP Core unit tests for testing LP ADC
Added a unit test to verify that LP ADC1 works and can be read from the
LP Core.
2024-09-10 08:45:11 +02:00
Marius Vikhammer 692eb01fe1 fix(lp-core): fixed ULP shared mem address being wrong on P4 2024-07-23 14:12:18 +08:00
Marius Vikhammer d70383422b feat(lp-core): add reduced footprint print functions 2024-07-19 09:48:20 +08:00
Marius Vikhammer 92bf402911 Merge branch 'feature/ulp_hp_core_printf_debug' into 'master'
feat(ulp): add option for routing LP-printf to HP console

See merge request espressif/esp-idf!32166
2024-07-18 16:03:27 +08:00
Marius Vikhammer 74a04c140c feat(ulp): add option for routing LP-printf to HP console 2024-07-17 17:16:40 +08:00
Marius Vikhammer 9b387caf19 fix(etm): add ulp etm ll functions 2024-07-16 10:04:18 +08:00
Marius Vikhammer d1132ddfa2 Merge branch 'feature/lp_core_etm' into 'master'
feat(lp-core): added support for using ETM events as wake-up source

Closes IDF-10201 and IDF-6360

See merge request espressif/esp-idf!31810
2024-07-08 12:23:03 +08:00
Marius Vikhammer de2a66ebe0 feat(lp-core): added support for using ETM events as wake-up source 2024-07-08 11:04:34 +08:00