morris
c96d9d0380
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-08-31 13:48:44 +08:00
morris
73031f7280
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-09 10:27:01 +08:00
morris
d3b252d8ce
fix(i2c): remove unused but set variables
2026-07-03 18:10:15 +08:00
Chen Chen
84ca614368
fix(i2c): fix i2c pd management leak & resource recycle
2026-05-19 17:14:34 +08:00
DatanoiseTV
5e21717fed
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 10:38:55 +08:00
wuzhenghui
d3c5129050
fix(driver): fix retention unsupported mouldes TOP pd test
2026-05-07 12:02:05 +08:00
Chen Chen
c513f95ebb
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-10 11:21:48 +08:00
Hu Rui
9f412d6026
fix(i2c): add NULL check and correct log
2026-03-16 19:13:28 +08:00
Hu Rui
74e7004065
test(i2c): with malloc comes from PSRAM by default
2026-03-06 17:40:31 +08:00
morris
0469db2f83
refactor(rcc): unify the usage of clock control macros for peripherals
...
- Removed conditional definitions for various RCC_ATOMIC macros across
multiple files, replacing them with a unified PERIPH_RCC_ATOMIC() macro.
- Updated instances where specific RCC_ATOMIC macros were used to ensure
consistent usage of PERIPH_RCC_ATOMIC().
- Deleted unused uart_share_hw_ctrl.h file as its functionality is now
integrated into the new structure.
2026-01-23 18:28:13 +08:00
Chen Chen
17d2041821
refactor(i2c): cleanup I2C definitions in soc_caps.h
2026-01-12 17:07:04 +08:00
Michael (XIAO Xufeng)
a3f7bda136
Merge branch 'fix/i2c_redundant_local_level' into 'master'
...
fix(i2c): fix LOG_LOCAL_LEVEL redefinition error when CONFIG_I2C_ENABLE_DEBUG_LOG is enabled
Closes IDFGH-16800
See merge request espressif/esp-idf!43859
2025-12-12 01:54:47 +08:00
Chen Chen
d2a95ea102
fix(i2c_master): Add i2c master timeout range check
...
Closes https://github.com/espressif/esp-idf/issues/17930
2025-12-02 17:00:28 +08:00
Xiao Xufeng
bb504716ad
fix(i2c): fix LOG_LOCAL_LEVEL redefinition error when CONFIG_I2C_ENABLE_DEBUG_LOG is enabled
...
- Move LOG_LOCAL_LEVEL definition before including esp_check.h
- Fixes compilation error: 'LOG_LOCAL_LEVEL' redefined [-Werror]
Closes https://github.com/espressif/esp-idf/issues/17877
2025-11-30 02:00:41 +08:00
morris
aa1fd9c611
refactor: avoid function calls inside MIN/MAX macros
2025-11-17 22:17:54 +08:00
Chen Jichang
4989cc9266
feat(hal): move i2c_periph.h to hal folder
2025-11-13 16:52:47 +08:00
C.S.M
e898c7ef39
fix(i2c): Add check for buffer place when iram safe enabled,
...
Closes https://github.com/espressif/esp-idf/issues/12613
2025-11-07 16:45:38 +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
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
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
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
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
Chen Chen
c35ddc1258
change(i2c_master): Change return value when NACK detected
2025-08-19 12:12:52 +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
C.S.M
0e44dcf2ff
fix(i2c_master): Fix that master multi-read failed,
...
Closes https://github.com/espressif/esp-idf/issues/16231
2025-07-07 15:43:18 +08:00
C.S.M
6c2266473c
fix(i2c): Make i2c nack log as debug level
2025-06-30 14:48:58 +08:00
morris
c63f51dcb3
refactor(drivers)!: remove unnecessary io_loop_back and pull up/down config option
2025-05-23 18:09:53 +08:00
Chen Jichang
4bfd180a94
fix(i2c): only call esp_pm APIs when CONFIG_PM_ENABLE is enabled
2025-05-22 17:27:18 +08:00
C.S.M
34447b6401
fix(i2c): Fix some i2c coverity issue
2025-04-25 15:42:31 +08:00
C.S.M
459b75f81a
fix(i2c): I2C should not clear bus in a nack state
2025-04-23 19:01:08 +08:00
C.S.M
d6760b170a
fix(i2c): Fix that fsm reset cause i2c scl frequency changed on esp32s2,
...
Closes https://github.com/espressif/esp-idf/issues/15724
2025-04-17 18:03:42 +08:00
C.S.M
3158443b03
fix(i2c): Fix i2c customize only read one byte issue
2025-04-01 11:03:54 +08:00
C.S.M
43e83b8324
fix(i2c_master): Fix the stretch happen cause timeout in probe,
...
Closes https://github.com/espressif/esp-idf/issues/15589
2025-03-27 14:51:16 +08:00
C.S.M
90d477c9a6
fix(i2c_master): Fix i2c master race condition issue,
...
Closes https://github.com/espressif/esp-idf/issues/15444
2025-02-27 15:27:58 +08:00
C.S.M
2458734108
feat(i2c): Add config option for i2c isr handler can put in flash
2025-02-10 13:49:21 +08:00
C.S.M
847780da3e
fix(i2c_master): Enhance i2c delete device and bus logic,
...
Closes https://github.com/espressif/esp-idf/issues/15171
2025-01-21 15:56:25 +08:00
C.S.M
ecc6d380ce
feat(i2c): Add api for customize i2c transaction interface for un-standard i2c device
2024-12-30 15:17:25 +08:00
C.S.M
89ba620cfd
feat(i2c_master): Add a new api for adjusting address dynamically,
...
Closes https://github.com/espressif/esp-idf/issues/15011
2024-12-20 13:54:32 +08:00
C.S.M
6b735e01fa
Merge branch 'fix/enhance_i2c_slave_test_stability' into 'master'
...
fix(i2c): Fixed I2C return without release the lock & enhance lp i2c lock souce selection
See merge request espressif/esp-idf!35025
2024-11-22 12:13:01 +08:00
C.S.M
b9183aafee
fix(i2c): Enhance lp clock source and avoid deadlock,
...
Closes https://github.com/espressif/esp-idf/issues/14908 ,
Closes https://github.com/espressif/esp-idf/issues/14906
2024-11-21 14:51:20 +08:00
morris
3fb7461eb0
refactor(i2c): rename some LL functions according to TRM descriptions
2024-11-20 19:16:23 +08:00
C.S.M
0a098f49d4
fix(i2c): Add bus handle check so that it will not be panic when there is no free bus,
...
Closes https://github.com/espressif/esp-idf/issues/14819
2024-11-06 18:48:11 +08:00
C.S.M
d7e090476c
fix(i2c): Fix i2c gpio configuration and move i2c_platform public
2024-10-24 11:38:32 +08:00
C.S.M
3f061bd557
feat(i2c_master): Support i2c sleep retention on esp32c5/p4/c61
2024-10-08 15:55:48 +08:00
C.S.M
fb95332a22
fix(i2c_master): Fix the memory leak in the async transaction
2024-09-26 18:54:43 +08:00
C.S.M
3ccdd8b397
fix(i2c): Fix possible error state in clear the bus,
...
Closes https://github.com/espressif/esp-idf/issues/13647
2024-09-06 14:28:26 +08:00
C.S.M
8aee667873
fix(i2c_master): Fix an I2C issue that slave streth happen but master timeout set seems doesn't work
...
Closes https://github.com/espressif/esp-idf/issues/14129
Closes https://github.com/espressif/esp-idf/issues/14401
2024-08-22 18:28:57 +08:00
C.S.M
4606003655
fix(i2c_master): Fix potential concurrency issue with task and interrupt when nack happens
2024-07-30 13:28:20 +08:00
C.S.M
992d8bc5f2
feat(i2c_master): Add an api for retrieveing handle via port,
...
Closes https://github.com/espressif/esp-idf/issues/13968
2024-06-24 16:06:34 +08:00
C.S.M
8e1698aa05
fix(i2c): Fix i2c not release semaphore in command send loop
2024-06-20 19:22:49 +08:00