Commit Graph

148 Commits

Author SHA1 Message Date
morris
324e9885af fix(driver): allocate driver objects containing atomic variables from internal SRAM
Objects with atomic members must not be allocated to PSRAM, otherwise
the ordering guarantee of atomic accesses is weakened due to a hardware
behavior on ESP32 chips. Explicitly request MALLOC_CAP_INTERNAL |
MALLOC_CAP_8BIT for:

- i2c master bus object (atomic status/trans_idx)
- i3c master bus object (atomic fsm)
- ISP processor and AE/AF/AWB/HIST controllers (atomic fsm)
- JPEG decoder/encoder dma2d transaction descriptors (atomic started)
- PPA transaction storage embedding dma2d_trans_t
- dma2d m2m test transaction embedding dma2d_trans_t
2026-09-03 09:46:22 +08:00
morris
bb48ee0f43 fix(i2c): release platform mutex on intr/pm_lock delete failure
ESP_RETURN_ON_ERROR inside the s_i2c_platform.mutex critical section
returns without releasing the mutex, permanently blocking all I2C
bus operations. Replace with ESP_GOTO_ON_ERROR that jumps to a
cleanup label releasing the mutex before return.
2026-07-13 17:43:13 +08:00
morris
b312cdf341 fix(i2c): remove unused but set variables 2026-07-06 11:11:39 +08:00
Chen Jichang
d1a64bffc0 refactor(clk_tree): use general api to enable the clk 2026-05-15 13:55:37 +08:00
DatanoiseTV
cb462e9a5f fix(i2c_master): yield from ISR when no matching device is found
`i2c_master_isr_handler_default()` may set HPTaskAwoken to pdTRUE via
`xQueueSendFromISR()` (event_queue), `xSemaphoreTakeFromISR()` and
`xSemaphoreGiveFromISR()` on `bus_lock_mux`. When the device list lookup
returns no matching device, the function returned directly, skipping
the `portYIELD_FROM_ISR()` at the bottom of the handler. A higher-
priority task waiting on the bus mux or the event queue would then have
to wait for the next scheduler tick instead of being preempted into
immediately, inflating worst-case event latency.

Replace the early return with a goto to the existing yield check at the
end of the ISR.

Merges https://github.com/espressif/esp-idf/pull/18569
2026-05-12 15:33:52 +08:00
morris
d53e191915 Merge branch 'fix/i2c_fsm_reset_sequence_v6.0' into 'release/v6.0'
fix(i2c): reset master before bus clear on chips without HW FSM reset (v6.0)

See merge request espressif/esp-idf!47507
2026-04-28 16:40:53 +08:00
Chen Chen
ffd6fd9dfd docs(i2c): update i2c_master_probe parameter comment
closes https://github.com/espressif/esp-idf/issues/18442
2026-04-13 15:13:25 +08:00
Chen Chen
a0bb40f208 fix(i2c): reset master before bus clear on chips without HW FSM reset
Reorder s_i2c_hw_fsm_reset() so i2c_ll_reset_register and interrupt
masking run before s_i2c_master_clear_bus(). Avoids ISR firing when
i2c_common_set_pins reconnects GPIOs to a stuck FSM (IDFGH-17497).

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

Made-with: Cursor
2026-04-13 15:12:02 +08:00
igor.udot
e2a8bbe639 ci: update build-test-rules to use common_components 2026-03-20 15:53:26 +08:00
morris
2833a85bed Merge branch 'fix/i2c_slv_addr_check_esp32_v6.0' into 'release/v6.0'
fix(i2c_slave): filter out fake request for esp32 slave device (v6.0)

See merge request espressif/esp-idf!46221
2026-03-19 23:13:57 +08:00
morris
3e8426dc3b Merge branch 'fix/i2c_null_check_v6.0' into 'release/v6.0'
fix(i2c): add NULL check and correct log (v6.0)

See merge request espressif/esp-idf!46686
2026-03-19 23:12:59 +08:00
Hu Rui
a8aeaea6a9 fix(i2c): add NULL check and correct log 2026-03-17 13:23:34 +08:00
Hu Rui
5a753346d8 test(i2c): with malloc comes from PSRAM by default 2026-03-09 14:52:20 +08:00
Chen Chen
cb6c86c1a4 fix(i2c_slave): filter out fake request for esp32
Closes https://github.com/espressif/esp-idf/issues/18268
2026-03-03 15:36:03 +08:00
Chen Chen
b7e82de9d8 refactor(i2c): cleanup I2C definitions in soc_caps.h 2026-01-13 17:29:23 +08:00
wanckl
d3e1a4881f ci(p4): p4 eco5 enable parts of special tests 2025-12-11 15:12:10 +08:00
Chen Chen
c373763022 fix(i2c_master): Add i2c master timeout range check
Closes https://github.com/espressif/esp-idf/issues/17930
2025-12-10 17:58:46 +08:00
Song Ruo Jing
62899cbba6 refactor(gpio): split GPIO HAL into separate component
cleaned up some includes in GPIO peripheral files
2025-12-08 14:33:26 +08:00
morris
72159c2361 Merge branch 'feat/esp_hal_pcnt_v6.0' into 'release/v6.0'
feat(hal): graudate the PCNT hal driver into a new component (v6.0)

See merge request espressif/esp-idf!43444
2025-11-24 22:35:51 +08:00
morris
45fa560e98 Merge branch 'feat/make_p4_rev3_default_v6.0' into 'release/v6.0'
p4: make v3 as default (v6.0)

See merge request espressif/esp-idf!43440
2025-11-21 15:12:44 +08:00
Chen Jichang
cb2cbc652a feat(hal): move i2c_periph.h to hal folder 2025-11-21 11:22:41 +08:00
armando
714b022a43 ci(p4): disable p4 rev3 invalid tests temporarily 2025-11-21 02:48:05 +00:00
morris
e9539d4560 refactor: avoid function calls inside MIN/MAX macros 2025-11-18 15:18:14 +08:00
Chen Chen
23b76aaf92 Merge branch 'refactor/i2c_op_array_type' into 'master'
refactor(i2c_master): Change member type of i2c_operation_job_t

Closes IDFGH-16453

See merge request espressif/esp-idf!42036
2025-10-22 10:29:05 +08:00
Chen Chen
3d73884ae8 refactor(i2c_master): Change member type of i2c_operation_job_t
Closes https://github.com/espressif/esp-idf/issues/17585
2025-10-21 14:52:57 +08:00
morris
f4ba6279f1 fix(i2c): remove notfix(i2c): disable open drian mode on deinit
Closes https://github.com/espressif/esp-idf/issues/17737
2025-10-17 13:08:25 +08:00
morris
e5da8951b3 fix(uart): always add NOP workaround for UART FIFO read on esp32 2025-10-17 13:08:25 +08:00
Chen Chen
260443fe73 Merge branch 'fix/i2c_lp_test' into 'master'
fix(i2c/gpio): Add error checks to the i2c driver & Fix errors in gpio

Closes IDF-13942

See merge request espressif/esp-idf!41527
2025-10-16 13:51:18 +08:00
Wu Zheng Hui
dfeae969a4 Merge branch 'feat/support_esp32p4_eco5_pmu' into 'master'
feat(esp_hw_support): Update esp32p4 eco5 lowpower features support

See merge request espressif/esp-idf!41162
2025-10-15 19:47:43 +08:00
Chen Chen
29f8fcf7b7 fix(i2c/gpio): Add error checks to the i2c driver
Add more checks to i2c driver, as well as fixed some GPIO issues
together with it.
2025-10-15 10:38:59 +08:00
Chen Chen
a8ace9db09 Merge branch 'feat/i2c_slave_reset_tx_fifo' into 'master'
feat(i2c_slave): Add API to perform slave tx buffer reset

Closes IDFGH-15612

See merge request espressif/esp-idf!42091
2025-10-14 19:00:57 +08:00
wuzhenghui
065dd70056 change(esp_hw_support): move ESP_SLEEP_POWER_DOWN_CPU to Kconfig 2025-10-14 16:33:30 +08:00
C.S.M
2523fee9cd fix(i2c): Fix the potential wdt might happen after nack,
Closes https://github.com/espressif/esp-idf/issues/17720
2025-10-13 16:07:22 +08:00
morris
cd41b6a640 refactor: remove unnecessary driver dependencies from build rules 2025-10-11 14:02:29 +08:00
Chen Chen
8b8b5df141 feat(i2c_slave): Add API to perform slave tx buffer reset
Closes https://github.com/espressif/esp-idf/issues/16241
2025-10-09 16:08:19 +08:00
Nebojsa Cvetkovic
298bd047f6 fix(i2c): Don't print developer notes to ESP_LOG,
Closes https://github.com/espressif/esp-idf/pull/13963
2025-09-22 11:55:40 +08:00
C.S.M
5ce39e8878 refactor(i2c): Make i2c hal layer independent 2025-09-15 11:26:48 +08:00
Chen Chen
91d00fbbd7 docs(i2c_master): Fix a typo in description
Closes https://github.com/espressif/esp-idf/issues/17475
2025-08-29 11:22:41 +08:00
C.S.M
23f09d2617 test(i2c): fix i2c test failure 2025-08-20 16:33:00 +08:00
Marek Fiala
9d35d63651 feat(cmake): Update minimum cmake version to 3.22 (whole repository) 2025-08-19 14:44:32 +02:00
Chen Chen
c35ddc1258 change(i2c_master): Change return value when NACK detected 2025-08-19 12:12:52 +08:00
Chen Chen
8361d150de fix(i2c_test_apps): Fix the conflict when including spimem_flash_ll
Update to avoid the conflict that C++ compiler complains about low level C
code
2025-08-18 11:20:16 +08:00
Chen Chen
34d2abf533 refactor(i2c_test_apps): Refactor i2c test apps from C to C++ 2025-08-18 11:20:16 +08:00
Sudeep Mohanty
fe2ee39a99 feat(esp_ringbuf): Place Ring buffer in flash by default
The following updates have been made in this commit:
- The commit places ring buffer code in flash memory by default.
- CONFIG_RINGBUF_PLACE_FUNCTIONS_INTO_FLASH has been removed.
- CONFIG_RINGBUF_IN_IRAM is added and can be used to restore the
  previous memory placement.
2025-08-07 19:56:30 +08:00
Sudeep Mohanty
26c19928a9 feat(freertos): Place FreeRTOS in flash by default
The following updates have been made in this commit:
- The commit places FreeRTOS code in flash memory by default.
- CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH has been removed.
- CONFIG_FREERTOS_IN_IRAM is unhidden and can be used to restore the
  previous memory placement.
- A test has been added for users to conduct performance impact testing
  based on memory placement configurations.
2025-08-07 19:56:30 +08:00
Xiao Xufeng
208fad5616 fix(i2c): make write_buffer const in i2c_master_transmit_multi_buffer_info_t
Fixes https://github.com/espressif/esp-idf/issues/16890
2025-08-06 10:38:48 +08:00
Marius Vikhammer
4065fb20f3 Merge branch 'feature/esp_test_utils_component' into 'master'
change(test_utils): moved test_utils out of unit-test-app project

See merge request espressif/esp-idf!40678
2025-08-01 11:04:37 +08:00
wanckl
cb257ede27 ci(esp32c61): enable multi dut runner for c61 2025-07-22 17:10:55 +08:00
Marius Vikhammer
bf84ab652a change(test_utils): moved test_utils component to tools/test_apps/components/ 2025-07-21 14:05:50 +08:00
Sudeep Mohanty
c8f68c72a7 Merge branch 'feat/remove_global_cmake_vars' into 'master'
change(esptool_py): Make esptool_py component idempotent in the build

Closes IDF-13073

See merge request espressif/esp-idf!39589
2025-07-17 17:13:49 +02:00