Commit Graph

1330 Commits

Author SHA1 Message Date
Michael (XIAO Xufeng)
fab98d8996 Merge branch 'fix/twai_tag_not_defined_in_configure_gpio_v4.3' into 'release/v4.3'
fix(twai): fix build error TWAI_TAG used but not defined (v4.3)

See merge request espressif/esp-idf!27834
2023-12-18 01:15:46 +08:00
Jiang Jiang Jian
eb0f7d0648 Merge branch 'bugfix/temp_clk_gate_v4.3' into 'release/v4.3'
fix(temperature_snesor): Put clock gate enable/disable in to sar_periph_ctrl together (backport v4.3)

See merge request espressif/esp-idf!27759
2023-12-14 19:42:01 +08:00
Cao Sen Miao
b3ab5e6f89 fix(temperature_snesor): Put clock gate enable/disable in to sar_periph_ctrl together 2023-12-13 17:05:26 +08:00
wanlei
878fd239d6 fix(twai): fix build error TWAI_TAG used but not defined
bug introduced from efef8401
closes https://github.com/espressif/esp-idf/issues/12760
2023-12-11 16:18:20 +08:00
wanlei
a730188c3e fix(twai): twai example crash using usb-serial-jtag pins
Calling gpio_hal_iomux_func_sel() via gpio_config() may
disconnects/disables any influence from USJ when using USJ pins
2023-12-01 11:21:25 +00:00
muhaidong
481a064d6b change(hal): remove useless code from periph_ll_wifi_bt_module_enable_clk 2023-11-10 14:44:23 +08:00
Armando
40d021e39d fix(adc): rename ADC_ATTEN_DB_11 to ADC_ATTEN_DB_12
By design, it's 12 dB. There're errors among chips, so the actual
attenuation will be 11dB more or less
2023-11-07 14:14:25 +08:00
wanlei
73bbc3c620 fix(spi_master): polling_transmit forgot release bus lock when alloc DMA buffer failed
Close https://github.com/espressif/esp-idf/issues/11845
2023-09-22 10:32:52 +08:00
morris
d31e0fb105 Merge branch 'bugfix/wakeup_io_hold_unhold_in_sleep_v4.3' into 'release/v4.3'
gpio: Fix deep sleep wakeup IOs unable to unhold after wakeup (v4.3)

See merge request espressif/esp-idf!22671
2023-08-11 11:08:08 +08:00
Song Ruo Jing
8cb8c640f4 gpio: Fix IO hold function related problems
1. Fix deep sleep wakeup IOs can not be unhold issue
2. Correct hold related APIs' description
3. Fix gpio_force_hold_all API

docs: Add GPIO wakeup source to sleep_modes doc for ESP32C3
2023-08-08 02:40:46 +00:00
Song Ruo Jing
c3be230487 rtcio: Add a test case to test RTCIO's hold ability after deep sleep wakeup 2023-08-08 02:40:46 +00:00
Cao Sen Miao
0c584425e9 bugfix(temperature_sensor): Fix issue that get the value is negative 2023-08-07 18:48:54 +08:00
Jiang Jiang Jian
f57d0fcc5e Merge branch 'bugfix/tempsensor_wifi_conflict_v4.3' into 'release/v4.3'
temperature_sensor: Fix issue that have conflict with phy / Fix phy pwdet and tsens power cannot be set twice issue (backport v4.3)

See merge request espressif/esp-idf!24968
2023-07-27 23:05:17 +08:00
Cao Sen Miao
60f8d164fa temperature_sensor: Apply new-shared interface in temperature sensor driver 2023-07-26 10:11:07 +08:00
Jiang Jiang Jian
c6a75ac0cd Merge branch 'bugfix/fix_uart_tx_done_hardware_concurrency_v4.3' into 'release/v4.3'
uart: Fix TX side concurrency issues (v4.3)

See merge request espressif/esp-idf!22597
2023-07-25 10:43:44 +08:00
Song Ruo Jing
6a80e30839 uart: Fix two TX concurrency issues
1. Concurrency might cause ESP_ERR_TIMEOUT when calling uart_wait_tx_done
2. Concurrency might cause RTS line being de-assreted during tx transmission for rs485 mode
2023-07-24 11:18:38 +00:00
Cao Sen Miao
35e88d5f8f temperature_sensor: Add new interface and reference counts so that phy and driver can use together 2023-07-24 16:55:05 +08:00
Song Ruo Jing
9e7882ba6d fix(gpio): fix potential crash when processing gpio isr
If CONFIG_SPIRAM_USE_MALLOC is enabled, and cache is disabled when GPIO ISR is triggered,
it would lead to Guru Meditation Error due to "Cache disabled but cached memory region accessed".

Closes https://github.com/espressif/esp-idf/issues/11876
2023-07-19 20:04:14 +08:00
Jiang Jiang Jian
3ce1d93958 Merge branch 'test/add_spi_slave_freq_test_v4.3' into 'release/v4.3'
spi_slave: fix io re-config issue (v4.3)

See merge request espressif/esp-idf!22594
2023-03-30 21:34:25 +08:00
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
wanlei
271c383210 spi_slave: fix io re-config issue 2023-03-03 17:36:04 +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