Commit Graph

1310 Commits

Author SHA1 Message Date
Michael (XIAO Xufeng)
6b323359ce Merge branch 'feature/apply_new_version_logic_v4.3' into 'release/v4.3'
all: Apply new version logic (major * 100 + minor) (v4.3)

See merge request espressif/esp-idf!22482
2023-03-07 11:25:42 +08:00
Armando
868c68bf89 adc: fix legacy oneshot driver clock gating issue on c3 2023-03-06 10:50:36 +08:00
KonstantinKondrashov
ab87a1012f version: Fix missed version checks 2023-03-04 04:48:24 +08:00
Jiang Jiang Jian
d8a21db37a Merge branch 'bugfix/twai_listen_only_errata_v4.3' into 'release/v4.3'
twai: Add errata workaround for listen only mode (v4.3)

See merge request espressif/esp-idf!22516
2023-03-03 14:03:26 +08:00
Jiang Jiang Jian
043958e39f Merge branch 'bugfix/fix_gpio_wakeup_related_issues_in_ssc_sleep_test_backport_v4.3' into 'release/v4.3'
sleep: fix gpio wakeup related issues(backport v4.3)

See merge request espressif/esp-idf!22334
2023-02-26 15:51:29 +08:00
Darian Leung
1f6d7fa334 twai: Add errata workaround for listen only mode
This commit adds a workaround for the TWAI listen only mode errata which is
present on the ESP32, ESP32-S2, ESP32-S3, and ESP32-C3. twai_get_status_info()
has also been updated to account for the fact that TEC/REC are frozen in
listen only mode.

Errata Description:

When the TWAI controller is put into listen only mode, it should not influence
the TWAI bus in any way (i.e., should never send a dominant bit). However,
on the targets listed above, the TWAI controller will send dominant bits in an
error frame (i.e., active error frame), even if the controller is set to listen
only mode.

Workaround:

We can force the TWAI controller into the error passive state on startup (by
setting the REC to >= 128). Since the TEC/REC are frozen in listen only mode,
the TWAI controller will remain error passive and only send recessive bits
(i.e., passive error frames), thus will not influence the TWAI bus.

Closes https://github.com/espressif/esp-idf/issues/9157
2023-02-24 20:40:33 +08:00
jingli
805db259b7 sleep: fix gpio wakeup not working properly in some cases
Before this fix, when we call esp_pm_configure after gpio_wakeup_enable,
the configuration of GPIO in sleep state in gpio_wakeup_enable will be
overwritten by esp_pm_configure.
2023-02-13 19:54:17 +08:00
jingli
f556ac1b92 soc_caps: remove SOC_GPIO_SUPPORT_SLP_SWITCH
all esp chips support this feature
2023-02-13 19:54:11 +08:00
KonstantinKondrashov
3dcdcc08eb efuse: Adds major and minor versions and others 2023-02-11 08:06:49 +00:00
Armando
984ee9dd38 adc: no longer support adc2 oneshot mode on esp32c3
Due to HW limitation, we don't support this anymore. On c3, ADC2 under oneshot mode is not stable.

However, you can enable CONFIG_ADC_ONESHOT_FORCE_USE_ADC2_ON_C3 to force use
ADC2.

Refer to errata to know more details:
https://www.espressif.com/sites/default/files/documentation/esp32-c3_errata_en.pdf
2023-02-08 09:04:28 +00:00
Armando
9b4986dd2c adc: no longer support adc2 continuous mode on esp32c3
Due to HW limitation, we don't support this anymore. On c3, ADC2 under continuous  mode is not stable.

However, you can enable CONFIG_ADC_CONTINUOUS_FORCE_USE_ADC2_ON_C3_S3 to force use
ADC2.

Refer to errata to know more details:
https://www.espressif.com/sites/default/files/documentation/esp32-c3_errata_en.pdf
2023-02-08 09:04:28 +00:00
morris
0319c702cf Merge branch 'feature/_spi_slave_reset_trans_queue_api_v4.3' into 'release/v4.3'
spi: limit esp32 dma workaround only on esp32(v4.3)

See merge request espressif/esp-idf!21384
2022-12-14 17:43:27 +08:00
Armando
9061efd3d1 spi: limit esp32 dma workaround only on esp32 2022-12-01 21:00:35 +08:00
wanlei
a6ea6716ce spi_slave: fix slave can't use iomux bus mixed with gpio cs_pin 2022-12-01 20:21:11 +08:00
jingli
24eea75f9c esp_hw_support/sleep: fix current leakage when hold digital io during deep sleep 2022-11-18 03:00:01 +00:00
Song Ruo Jing
b8e62ce4b2 uart: Fix unwanted processing of TX_DONE interrupt immediately after calling uart_wait_tx_done()
In previous transmission(s), the TX_DONE interrupt raw bit may be raised, but never been cleared.
TX_DONE interrrupt status bit should be cleared before enabling it to check the new transmission.
2022-11-09 02:31:15 +00:00
aleks
a6e524418d freemodbus: fix uart_wait_tx_done() reenable tx_done interrupt 2022-11-09 02:31:15 +00:00
jingli
81b98881ac esp_hw_support/sleep: fix cannot pd cpu and rc fast at the same time during light sleep
Since cpu retention dma use rc fast as clk source, so rc_fast_digi
will be enabled when we config to pd cpu. And cpu retention does not
need rc fast keep on during light sleep. So, if we use rc_fast_digi
to determine whether rc fast can be powered down, then cpu and and
rc fast cannot pd at the same time.
2022-11-06 01:34:18 +08:00
Cao Sen Miao
32dca66fb6 I2C: Make I2C clock frequency accurate 2022-11-01 15:48:26 +08:00
morris
1ecf62bf14 Merge branch 'bugfix/fix_spi_bus_lock_concurrency_issue_v4.3' into 'release/v4.3'
spi_bus_lock: fix a concurrency issue (v4.3)

See merge request espressif/esp-idf!20139
2022-09-22 13:34:00 +08:00
Song Ruo Jing
4cd54d6e32 ledc: Fix the usage of ledc_ls_timer_update and ledc_timer_rst
ledc_ls_timer_update is required only when CLK_DIV and DUTY_RES bits are changed.
Calling ledc_timer_rst while re-configure PWM frequency through ledc_set_freq can cause glitch in the signal
2022-09-20 12:04:13 +08:00
Michael (XIAO Xufeng)
5666813ce0 Merge branch 'bugfix/driver_rs485_fix_test_sync_issues_v43' into 'release/v4.3'
driver: uart rs485 fix test sync issues and fail threshold (backport v4.3)

See merge request espressif/esp-idf!19611
2022-09-19 16:16:01 +08:00
Alex Lisitsyn
ec7bab9b19 driver: uart rs485 fix test sync issues and fail threshold (backport v4.3) 2022-09-19 16:16:00 +08:00
Armando
6a1bfa29b0 SPI_BUS_LOCK: fix a concurrency issue
define: lock_bits = (lock->status & LOCK_MASK) >> LOCK_SHIFT;  This `lock_bits` is the Bit 29-20 of the lock->status

1. spi_hdl_1:
   acquire_end_core():
   uint32_t status = lock_status_clear(lock, dev_handle->mask & LOCK_MASK);
   Becuase this is the first `spi_hdl_1`, so after this , lock_bits == 0`b0. status == 0

2. spi_hdl_2:
   acquire_core:
   uint32_t status = lock_status_fetch_set(lock, dev_handle->mask & LOCK_MASK);
   Then here status is 0`b0, but lock_bits == 0`b10. Because this is the `spi_hdl_2`

3. spi_hdl_2:
   `acquire_core` return true, because status == 0. `spi_bus_lock_acquire_start(spi_hdl_2)` then won't block.

4. spi_hdl_2:
   spi_device_polling_end(spi_hdl_2).

5. spi_hdl_1:
   acquire_end_core:
   status is 0, so it cleas the lock->acquiring_dev

6. spi_hdl_2:
   spi_device_polling_end:
   assert(handle == get_acquiring_dev(host)); Fail

Closes https://github.com/espressif/esp-idf/issues/8179
2022-09-14 12:13:24 +08:00
Armando
e1a5315ff7 adc: ignore ADC DMA single read test on esp32s2
This test is only on esp32s2, and using verification adc APIs.
This commit keeps the code, but don't check it on ci
2022-09-09 16:03:10 +08:00
Omar Chebib
4d7f007645 I2C: Fix a bug making the I2C task wait too long on an event
The I2C ISR will now notify the task waiting on an event. Thus, the task can stop waiting on the event queue as soon as possible.
2022-08-18 02:37:43 +00:00
Chen Yi Qun
b6bbb5e0a2 I2C: add conf_update for esp32c3 i2c 2022-08-18 02:37:43 +00:00
Omar Chebib
9fa0c131a4 UART: Fix custom ISR registration function
* Closes https://github.com/espressif/esp-idf/issues/8491
2022-07-14 17:49:52 +08:00
xiongweichao
5cc8262a09 Update the note of the gpio_intr_enable function 2022-07-11 02:45:01 +00:00
Jiang Jiang Jian
1b40e6173e Merge branch 'bugfix/i2c_timeout_issue_v4.3' into 'release/v4.3'
I2C: patch for solving watchdog timeout issue(backport v4.3)

See merge request espressif/esp-idf!18132
2022-06-09 11:10:57 +08:00
Alex Lisitsyn
94c4c3186d driver: fixes context switch while sending cause rts reset before send (backport v4.3) 2022-05-18 02:22:17 +08:00
Cao Sen Miao
75f6279c22 I2C: patch for solving watchdog timeout issue 2022-05-17 16:56:58 +08:00
morris
a818e9ca91 Merge branch 'bugfix/fix_adc_digital_not_reset_issue_v4.3' into 'release/v4.3'
adc: fix adc digital not reset issue (v4.3)

See merge request espressif/esp-idf!17427
2022-04-22 12:43:44 +08:00
Jiang Jiang Jian
1ad55d707b Merge branch 'origin/bugfix/i2c_iram_placement_fix_v4.3' into 'release/v4.3'
i2c: Correct hal functions iram placement and remove IRAM_ATTR for i2c_hw_fsm_reset (backport v4.3)

See merge request espressif/esp-idf!17805
2022-04-22 11:08:17 +08:00
Armando
f8c098658c adc: fix adc digital not reset issue 2022-04-21 19:29:15 +08:00
Michael (XIAO Xufeng)
21daee7dce Merge branch 'bugfix/wrong_gpio_is_deep_sleep_wakeup_valid_gpio_v4.3' into 'release/v4.3'
gpio: fix wrong GPIO_IS_DEEP_SLEEP_WAKEUP_VALID_GPIO macro (backport v4.3)

See merge request espressif/esp-idf!17806
2022-04-21 18:17:20 +08:00
Ivan Grokhotkov
e0f7d6834d
driver: spi_slave: make sure CS helpers are in IRAM if the ISR is
Closes https://github.com/espressif/esp-idf/issues/3870
2022-04-20 12:50:14 +02:00
Cao Sen Miao
671303bbd5 usb_serial_jtag: Add blocking driver to support vfs. 2022-04-19 16:21:20 +08:00
songruo
d6c2bae1bc gpio: fix wrong GPIO_IS_DEEP_SLEEP_WAKEUP_VALID_GPIO macro
Closes https://github.com/espressif/esp-idf/issues/8733

(cherry picked from commit 0d52cb04dc)
2022-04-18 22:29:52 +08:00
songruojing
a7935539b5 i2c: Correct hal functions iram placement and remove IRAM_ATTR for i2c_hw_fsm_reset
Closes https://github.com/espressif/esp-idf/issues/8422
Closes https://github.com/espressif/esp-idf/issues/7249

(cherry picked from commit 1ceb7c8cd6)
2022-04-18 21:07:52 +08:00
Michael (XIAO Xufeng)
eca8b7ca41 spi: fixed crash when calling spi_bus_free when not initialized
introduced in 49a48644e4

Closes: https://github.com/espressif/esp-idf/issues/8642
2022-03-27 02:33:41 +08:00
morris
673d0371ba Merge branch 'bugfix/typo_in_i2c_macro_v4.3' into 'release/v4.3'
I2C: Fix typo in I2C_TIMING_VAL_ERR_STR macro name (backport v4.3)

See merge request espressif/esp-idf!17117
2022-03-24 11:17:46 +08:00
Marius Vikhammer
cd598bd7c0 Merge branch 'bugfix/inline_intrmask_from_isr_v4.3' into 'release/v4.3'
freertos: always inline xPortSetInterruptMaskFromISR and vPortClearInterruptMaskFromISR (v4.3)

See merge request espressif/esp-idf!17326
2022-03-16 13:45:32 +08:00
Marius Vikhammer
491b95925e spi flash: fix cache accessed while disabled issues at -O0
mask_get_id and gpio_hal_iomux_func_sel were called while cache
is disabled, but were not inlined as expected at -0O.
Force these functions to always be inlined.
2022-03-11 09:39:50 +08:00
paul
112bfbe465 I2C: Fix typo in I2C_TIMING_VAL_ERR_STR macro name
* Closes https://github.com/espressif/esp-idf/pull/8012
2022-03-09 06:29:14 +00:00
Omar Chebib
65cfc9e656 UART: Fix custom ISR unit test
On ESP32, UART_INTR_BRK_DET may be triggered after setting the new ISR handler.
Disable these interrrupts.
2022-03-09 04:34:00 +00:00
Omar Chebib
5f27ec9157 UART: fix a bug preventing the user from freeing a previously registered ISR
* Closes https://github.com/espressif/esp-idf/issues/8150
2022-03-09 04:34:00 +00:00
songruojing
f5f7a77895 gpio: Fix the bug that gpio interrupt cannot be triggered on app cpu on ESP32S3
Closes https://github.com/espressif/esp-idf/issues/7885

(cherry picked from commit 91f1159f9c)
2022-02-28 16:10:37 +08:00
songruojing
f817722109 gpio: Bugfix - Move esp_intr_free() out of the critical section in gpio_uninstall_isr_service()
Closes https://github.com/espressif/esp-idf/issues/5571

Fix the bug that if the API was called from one core to free the interrupt source on the other core, it would trigger interrupt watchdog.

(cherry picked from commit 0e8286c57b)
2022-02-28 15:50:40 +08:00
Michael (XIAO Xufeng)
6f99b8da73 Merge branch 'bugfix/gpio_pin_num_fix_v4.3' into 'release/v4.3'
gpio: Fix some gpio pin num errors on esp32s2 and esp32c3 (backport v4.3)

See merge request espressif/esp-idf!17109
2022-02-23 03:28:15 +00:00