Commit Graph

1568 Commits

Author SHA1 Message Date
morris
854c55c61e Merge branch 'feature/_spi_slave_reset_trans_queue_api_v4.4' into 'release/v4.4'
spi: limit esp32 dma workaround only on esp32(v4.4)

See merge request espressif/esp-idf!21382
2023-02-02 21:39:51 +08:00
morris
46b66530ce gdma: prevent mutli-channels connect to the same peripheral
1. add check in the gdma driver, to prevent multiple channels connecting
   to the same peripheral
2. memory copy DMA ID will occupy the peripheral's DMA ID on some ESP
   targets (e.g. esp32c3/s3). We should search for a free one when
install async memcpy driver.

Closes https://github.com/espressif/esp-idf/issues/10575
2023-02-01 11:10:26 +08:00
morris
2a9759ea24 gdma: correct the dma trigger of uart
GDMA trigger actually is not assigned to UART controller, but for UHCI
controller
2023-02-01 10:56:01 +08:00
morris
e72afc771f Merge branch 'bugfix/fix_slave_gpio_cs_mixed_with_iomux_bus_v4.4' into 'release/v4.4'
spi_slave: fix slave can't use iomux bus mixed with gpio cs_pin (v4.4)

See merge request espressif/esp-idf!21375
2022-12-08 10:58:08 +08:00
Omar Chebib
622fb9e906 CI: check_public_headers script will detect the use of static asserts in headers
When a public header contains _Static_assert or static_assert, check_public_headers.py script will detect it and report it as an issue.
Indeed, public headers shall now use ESP_STATIC_ASSERT.
2022-12-06 19:28:51 +08:00
Armando
b23a2b0a75 spi: limit esp32 dma workaround only on esp32 2022-12-01 20:57:09 +08:00
wanlei
cd08ea1f31 spi_slave: fix slave can't use iomux bus mixed with gpio cs_pin 2022-12-01 20:15:21 +08:00
Cao Sen Miao
9a6a28734b I2C: put some interrupt used functions into IRAM,
closes https://github.com/espressif/esp-idf/issues/10079
2022-12-01 16:20:56 +08:00
morris
1cece7eef0 rmt: fix memory leak in the legacy driver
Closes https://github.com/espressif/esp-idf/issues/10173
2022-11-21 10:00:24 +08:00
morris
a54467fcfb Merge branch 'contrib/github_pr_7144_v4.4' into 'release/v4.4'
Update i2c.c to consider two I2C buses for clear bus counter (GitHub PR) (backport v4.4)

See merge request espressif/esp-idf!20505
2022-11-17 16:35:50 +08:00
Linda
d6ffcfdae8 docs:fix a typo in touch_sensor.h of esp32s2 and esp32s3 2022-11-11 17:40:18 +08:00
Jiang Jiang Jian
86d29d566b Merge branch 'bugfix/fix_current_leakage_when_hold_digital_io_during_deep_sleep_backport_v4.4' into 'release/v4.4'
esp_hw_support/sleep: fix current leakage when hold digital io during deep sleep(backport v4.4)

See merge request espressif/esp-idf!20945
2022-11-11 16:33:43 +08:00
morris
6a2cffe84d Merge branch 'doc/explain_ledc_callback_return_value_v4.4' into 'release/v4.4'
ledc: explain the callback return value (v4.4)

See merge request espressif/esp-idf!20967
2022-11-11 10:10:13 +08:00
morris
8cba2f2ddf ledc: explain the callback return value
Closes https://github.com/espressif/esp-idf/issues/10093
2022-11-10 18:49:51 +08:00
Omar Chebib
3ec5041255 I2C: Fix the reset counter 2022-11-10 02:07:21 +00:00
Eckhard Völlm
647dbdbcaf Update i2c.c
Fix issue with single bus clear counter but two I2C buses (I2C0, I2C1). The previously implemented single (static) counter would impact the second bus either if one bus has counter expiry.
Merges https://github.com/espressif/esp-idf/pull/7144
2022-11-10 02:07:21 +00:00
morris
2a719f245d Merge branch 'bugfix/i2s_tx_auto_clear_not_totally_clean_the_buf_v4.4' into 'release/v4.4'
i2s: fix tx incomplete auto clear (v4.4)

See merge request espressif/esp-idf!20571
2022-11-10 10:05:52 +08:00
morris
79727b3a93 Merge branch 'bugfix/mcpwm_wrong_return_value_v4.4' into 'release/v4.4'
mcpwm: fix wrong return value in the legacy MCPWM driver (4.4)

See merge request espressif/esp-idf!20695
2022-11-09 22:49:42 +08:00
jingli
4b71ebbe49 esp_hw_support/sleep: fix current leakage when hold digital io during deep sleep 2022-11-05 17:51:08 +08:00
morris
79ee98e229 mcpwm: update compare value on both tep and tez
Closes https://github.com/espressif/esp-idf/issues/9904
2022-10-25 13:20:41 +08:00
morris
8b352e1da9 mcpwm: fix wrong return value in the legacy driver
For APIs that not return esp_err_t value, we can't use macros like
ESP_RETURN_ON_xxx
2022-10-20 18:24:58 +08:00
laokaiyao
4853d6319e i2s: fix tx incomplete auto clear
Closes: https://github.com/espressif/esp-idf/issues/9882
2022-10-12 19:53:58 +08:00
Song Ruo Jing
5a969b91a8 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.

Introduced in 4e09d147b11ed8a094b5858642c9f60d658ef656
2022-09-23 16:10:53 +08:00
morris
c407e69246 Merge branch 'refactor/add_description_to_touch_pad_set_meas_time_v4.4' into 'release/v4.4'
touch_sensor: add description to distinguish the API on different target (v4.4)

See merge request espressif/esp-idf!20242
2022-09-22 14:51:41 +08:00
morris
3247fa9374 Merge branch 'bugfix/fix_spi_bus_lock_concurrency_issue_v4.4' into 'release/v4.4'
spi_bus_lock: fix a concurrency issue (v4.4)

See merge request espressif/esp-idf!20138
2022-09-22 13:33:31 +08:00
laokaiyao
5c57f9c884 touch_sensor: add description to distinguish the API on different target
Closes https://github.com/espressif/esp-idf/issues/9067
2022-09-22 10:31:08 +08:00
morris
08fa67fe92 Merge branch 'bugfix/i2s_receive_data_lost_v4.4' into 'release/v4.4'
i2s: fix message queue overflow condition (v4.4)

See merge request espressif/esp-idf!20209
2022-09-21 22:01:12 +08:00
morris
af62cfc8a2 Merge branch 'bugfix/fix_ledc_timer_update_usage_v4.4' into 'release/v4.4'
ledc: Fix the usage of ledc_ls_timer_update and ledc_timer_rst (backport v4.4)

See merge request espressif/esp-idf!20241
2022-09-21 11:40:27 +08:00
songruojing
4bee8a84e2 gpio: fix USB D+ pin cannot disable pullup
Internally, disable usb serial jtag DP pin's pullup when calling gpio_ll_pullup_dis and rtcio_ll_pullup_disable
At usb serial jtag setup/install, re-enable DP pin's pullup

Closes https://github.com/espressif/esp-idf/issues/9495
2022-09-20 15:23:01 +08:00
Song Ruo Jing
9bd20fc2ca 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 11:52:57 +08:00
laokaiyao
2da3035b52 doc: add application notes for i2s 2022-09-19 12:03:08 +08:00
laokaiyao
190502bfec i2s: fix the wrong condition of event queue 2022-09-19 10:18:34 +08:00
Armando
163a4b6b02 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:11:29 +08:00
Armando
2488281d17 test: added adc wifi test thresh for esp32, s2, c3, s3 on v4.4
Due to unit test, we can't specify runners, for adc related tests.
Whereas adc tests are easily influenced by board hw condition, e.g.
pullup/down value.
This commit increases the thresh to 200mV.
2022-09-13 11:56:37 +08:00
Michael (XIAO Xufeng)
f9a630b967 Merge branch 'bugfix/calib_i2c_clk_v4.4' into 'release/v4.4'
I2C: Make I2C clock frequency accurate(backport v4.4)

See merge request espressif/esp-idf!19069
2022-09-11 02:44:26 +08:00
morris
e3c1fde6c4 Merge branch 'bugfix/driver_rs485_fix_test_sync_issues_v44' into 'release/v4.4'
driver: uart rs485 fix test sync issues and fail threshold (backport v4.4)

See merge request espressif/esp-idf!19610
2022-09-06 17:23:46 +08:00
Alex Lisitsyn
7d8636ce0a driver: uart rs485 fix test sync issues and fail threshold (backport v4.4) 2022-09-06 17:23:46 +08:00
Cao Sen Miao
f2ac141ebf temperature_sensor: Fix issue that value is not accurate on ESP32-S3 2022-09-02 16:03:39 +08:00
morris
ca831bbd63 mcpwm: fix multiplication overflow in converting us to compare ticks
Closes https://github.com/espressif/esp-idf/issues/9648
2022-09-01 05:11:23 +00:00
morris
645d5641dd timer: propagate isr register failure
Closes https://github.com/espressif/esp-idf/issues/9651
2022-09-01 05:11:23 +00:00
Cao Sen Miao
22b222b762 I2C: Make I2C clock frequency accurate 2022-08-29 09:07:30 +00:00
laokaiyao
76cdab5f42 i2s: fixed pdm rx sample rate doubled issue
Closes: https://github.com/espressif/esp-idf/issues/8660
2022-08-09 18:28:09 +08:00
Marius Vikhammer
f8729d905e Merge branch 'feature/ulp_riscv_adc_v4.4' into 'release/v4.4'
ulp-riscv: add support for using ADC as well as an example show-casing it. (v4.4)

See merge request espressif/esp-idf!19058
2022-08-09 15:00:50 +08:00
Marius Vikhammer
a968442603 Merge branch 'bugfix/ringbuf_iram_fix_v4.4' into 'release/v4.4'
esp_ringbuf: placement in flash is no longer controlled by... (v4.4)

See merge request espressif/esp-idf!19165
2022-08-09 11:01:52 +08:00
Marius Vikhammer
f8f93d936e ulp-riscv: add support for using ADC as well as an example show-casing it. 2022-08-09 09:21:15 +08:00
Marius Vikhammer
a940064748 esp_ringbuf: placement in flash is no longer controlled by CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH
esp-ringbuf funtion placement is now controlled by its own configs:
CONFIG_RINGBUF_PLACE_FUNCTIONS_INTO_FLASH and CONFIG_RINGBUF_PLACE_ISR_FUNCTIONS_INTO_FLASH

Closes https://github.com/espressif/esp-idf/issues/9198
2022-08-08 07:15:00 +00:00
Omar Chebib
cb411a81a2 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-08 06:10:31 +00:00
Jiang Jiang Jian
9f9021a221 Merge branch 'bugfix/multiple_adc_bugfix_v4.4' into 'release/v4.4'
adc: fix multiple bugs (v4.4)

See merge request espressif/esp-idf!19142
2022-08-04 14:42:53 +08:00
jingli
23d934429c 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-07-28 11:24:40 +08:00
Armando
ad8862fa19 adc: fix esp32s2 continuous mode converted bytes issue
When working in continuous mode, hardware will continuously trigger
ADC to do conversions. On esp32s2, 2 bytes will be generated per
conversion. Prior to this commit, driver assumes 4 bytes per conversion
(on s2). This commit fixed this issue.
2022-07-20 16:43:38 +08:00