Commit Graph

33 Commits

Author SHA1 Message Date
Armando
b282c244cb DMA EOF may happens per multiple dma descriptors, instead of only one.
Closes https://github.com/espressif/esp-idf/pull/11500
2023-09-05 11:18:56 +08:00
Armando
85ce6abdec 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. 2023-09-05 11:18:56 +08:00
Armando
91da3bcdc1 adc: fix adc continuous driver conv_frame_size not bigger than 4092 issue 2023-09-05 11:18:52 +08:00
Armando
cb62457f6d adc: fix esp32 continuous mode sampling freq issue 2022-07-20 16:43:38 +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
Armando
32afe6a498 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-07 11:28:48 +08:00
Armando
1ec46ad3b8 adc: support adc dma driver on all chips 2021-12-23 17:13:46 +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
Michael (XIAO Xufeng)
5425ef4ee4 hal: extract hal component from soc component 2020-09-01 13:25:32 +08:00