Commit Graph

51 Commits

Author SHA1 Message Date
gaoxu
795f3fe377 feat(adc): support ADC continuous mode on ESP32P4 2024-06-03 16:50:39 +08:00
gaoxu
bc98bdc087 refactor(adc): refactor dma ll functions on adc continuous mode 2024-03-12 11:12:48 +08:00
gaoxu
2eccde88f3 fix(adc): workaround to fix adc continuous get less results on c3 2024-02-19 10:34:54 +08:00
laokaiyao
e88d528b81 refactor(dac): remove redundant ll config for dac mode
Closes https://github.com/espressif/esp-idf/issues/12741
2023-12-09 20:14:54 +08:00
laokaiyao
dd4072a80c refactor(hal): use hal utils to calculate clock division 2023-09-20 23:33:25 +08:00
morris
56a376c696 feat(esp_gdma): add hal interface for common operations
GDMA driver will be adapted to more DMA peripherals in the future.
This commit is to extract a minimal interface in the hal layer
2023-07-10 13:45:57 +08:00
laokaiyao
1b22591ea7 i2s: fixed i2s_ll compiling failure under C++ evironment
Closes: https://github.com/espressif/esp-idf/issues/11625
2023-06-23 11:41:43 +08:00
Armando
97c30c7da6 adc: port gh pr to current adc continuous mode driver
DMA EOF may happens per multiple dma descriptors, instead of only one.

Closes https://github.com/espressif/esp-idf/pull/11500
2023-06-05 14:25:53 +08:00
Niklas Gürtler
2a8b9fb636 Fix #10804 by running continuous ADC DMA in endless loop instead of restarting after each run (descriptor chain) to avoid losing samples. Use descriptor error callback for GDMA to check for DMA buffer overrun.
Signed-off-by: Armando <douyiwen@espressif.com>
2023-06-05 12:24:14 +08:00
Armando
73791ff4e0 adc: fix adc continuous driver conv_frame_size not bigger than 4092 issue
Closes https://github.com/espressif/esp-idf/issues/11385
2023-05-22 10:55:28 +08:00
Armando
486c765a93 adc: remove adc_hal_conf.h
Macros inside adc_hal_conf.h are moved to adc_ll.h
2023-02-23 11:48:31 +08:00
Armando
5653018cd1 esp_adc: support selecting clock source for oneshot driver 2023-02-23 11:48:31 +08:00
morris
774a05399b soc: fix wrong APB_CLK_FREQ value on esp32c6 2023-01-28 06:33:23 +00:00
laokaiyao
5333ac81bf adc: support ADC on esp32c6 (driver/test/example) 2022-12-23 11:24:06 +08:00
laokaiyao
e27f3e3128 adc: support ADC on esp32c6 (hal) 2022-12-23 11:24:06 +08:00
Armando
5b523a3313 esp_adc: new esp_adc component and adc drivers 2022-07-15 18:31:00 +08:00
laokaiyao
28b8fc6a7e i2s: update documents for driver-NG 2022-06-15 10:30:04 +08:00
laokaiyao
0fe3bb8ab7 i2s: update examples and unit-tests 2022-06-15 10:29:06 +08:00
laokaiyao
621d0aa942 i2s: Introduced a brand new driver 2022-06-15 10:29:06 +08:00
Armando
49747bb486 adc: create common adc hal layer 2022-05-07 19:20:44 +08:00
laokaiyao
f17edba20b i2s: extract std/pdm/tdm modes
Type structures of these modes are defined. Driver and HAL layer are modified to fit these concepts.
2022-03-22 10:14:45 +08:00
Armando
386363cafd adc: unify adc_ll_num_t and adc_unit_t 2022-03-18 11:36:50 +08:00
Armando
494b996ecc sleep: restore analog calibration registers after waking up from light sleep
Closes https://github.com/espressif/esp-idf/issues/8287
Closes https://github.com/espressif/esp-idf/issues/7921
2022-03-04 12:10:20 +08:00
Armando
4dc0d6b2fe adc: support adc dma driver on all chips 2021-12-16 00:19:15 +00:00
Cao Sen Miao
09487761cf ESP8684: add freertos, hal, esp_system support 2021-11-06 17:33:44 +08:00
Armando
ddd0235783 adc: support adc self-calibration on esp32s3 2021-09-16 15:17:29 +08:00
Armando
c45c6f52f1 adc: support adc efuse-based calibration on esp32s3 2021-09-14 11:42:50 +08:00
Armando
3ce2d85e9e adc: support adc2 working with WiFi 2021-07-28 17:50:14 +08:00
laokaiyao
27d9657b6c driver/adc: support adc single sample on s3 2021-07-15 19:13:50 +08:00
Shu Chen
205cd469e9 esp32h2: update driver/hal/soc components to support esp32h2 2021-07-01 19:53:11 +08:00
morris
9afdf54748 hal: added HAL_ASSERT 2021-06-22 11:28:01 +08:00
morris
6e981af406 gdma: separate tx/rx channel interrupt 2021-05-06 15:06:37 +08:00
Armando
cc6bfcd9ac adc: apply adc power API to adc driver
Closes https://github.com/espressif/esp-idf/issues/6269
Closes https://github.com/espressif/esp-idf/issues/6682
2021-03-26 17:58:00 +08:00
Armando
0e0baee25a adc: add implementation of missed public API
Added ``adc1_pad_get_io_num``, ``adc2_pad_get_io_num`` and
``adc_vref_to_gpio``.
2021-03-26 12:04:46 +08:00
Armando
e9995fe165 adc: add pm_lock to adc driver on esp32c3 2021-03-26 12:04:46 +08:00
Armando
00a3f48bd8 adc: refactor adc single read api on esp32c3 2021-03-26 12:04:46 +08:00
Armando
69a0f8b9bb adc: seperate hal layer and driver layer 2021-03-26 12:04:46 +08:00
Armando
5427c18781 adc: apply gdma api to adc on esp32c3 2021-02-08 11:41:21 +08:00
Michael (XIAO Xufeng)
351ba5ff9e adc: fixed the issue that ADC power is left on after the calibration is done
Also refactor the locks in the adc_common.c file.
2021-02-05 14:17:52 +08:00
Michael (XIAO Xufeng)
2b83418141 adc: add fallback calibration method
Also:
1. Separate static configuration into init phase to improve
performance
2. Add a init code config layer to avoid duplicated configuration
3. Add a HW_CALIBRATION_V1 caps
2021-01-25 20:30:42 +08:00
Michael (XIAO Xufeng)
3d7da2c8ff adc: simplify LL on C3 2021-01-25 15:08:55 +08:00
Armando
d8a4b247b9 adc_digi: update_adc_api_for_5M_freq_limit
The ``adc_digi_config_t`` struct is modified on esp32c3: configuration
of clock divider factors are not provided anymore. The SARADC sampling
frequency is provided instead. In this way, we can handle the frequency
limit better.
2021-01-25 04:51:40 +00:00
fuzhibo
19fb11549b driver(adc): update adc ll and hal driver for esp32c3 2021-01-25 04:51:40 +00:00
Armando
02600309c8 adc: fix some regression issues 2021-01-25 04:51:40 +00:00
Armando
2b737c1927 adc: fix adc invalid data issue by update adc_reset 2021-01-25 04:51:40 +00:00
Armando
b38f4646de adc_digi: add dma drivers 2021-01-25 04:51:40 +00:00
morris
e6d23a35ec gdma: dynamic alloc DMA channels 2021-01-13 10:52:27 +08:00
Armando
2d37bfa126 driver: Add adc_digi single conversion mode
- add lock for single read and continuous read APIs
- update onetime read start singal delay for hardware limitation[*]
- move adc_caps to soc_caps.h
- update license dates

[*] There is a hardware limitation. If the APB clock frequency is high, the
step of this reg signal: ``onetime_start`` may not be captured by the
ADC digital controller (when its clock frequency is too slow). A rough
estimate for this step should be at least 3 ADC digital controller
clock cycle.
2020-12-23 09:53:24 +11:00
Angus Gratton
f09b8ae7a4 driver: Add esp32c3 ADC driver
Based on internal commit 3ef01301fffa552d4be6d81bc9d199c223224305
2020-12-23 09:53:24 +11:00
Michael (XIAO Xufeng)
647dea9395 soc: combine xxx_caps.h into one soc_caps.h
During HAL layer refactoring and new chip bringup, we have several
caps.h for each part, to reduce the conflicts to minimum. But this is
The capabilities headers will be relataive stable once completely
written (maybe after the featues are supported by drivers).

Now ESP32 and ESP32-S2 drivers are relative stable, making it a good
time to combine all these caps.h into one soc_caps.h

This cleanup also move HAL config and pin config into separated files,
to make the responsibilities of these headers more clear. This is
helpful for the stabilities of soc_caps.h because we want to make it
public some day.
2020-10-17 16:10:15 +08:00