mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
adc: fix esp32s3 continuous mode output bits issue
Prior to this change, esp32s3 ADC continuous mode output resolution is 13 bits. This commit correct the `adc_digi_output_data_t` on esp32s3. Correct output bits should be 12 bits. Corresponding definition in `soc_caps.h` is also updated.
This commit is contained in:
parent
57082d14a5
commit
ce465c0574
@ -161,7 +161,8 @@ typedef struct {
|
||||
typedef struct {
|
||||
union {
|
||||
struct {
|
||||
uint32_t data: 13; /*!<ADC real output data info. Resolution: 13 bit. */
|
||||
uint32_t data: 12; /*!<ADC real output data info. Resolution: 12 bit. */
|
||||
uint32_t reserved12: 1; /*!<Reserved12. */
|
||||
uint32_t channel: 4; /*!<ADC channel index info.
|
||||
If (channel < ADC_CHANNEL_MAX), The data is valid.
|
||||
If (channel > ADC_CHANNEL_MAX), The data is invalid. */
|
||||
|
@ -15,19 +15,19 @@
|
||||
#ifndef _SOC_ADC_CHANNEL_H
|
||||
#define _SOC_ADC_CHANNEL_H
|
||||
|
||||
#define ADC1_GPIO1_CHANNEL ADC1_CHANNEL_0
|
||||
#define ADC1_GPIO0_CHANNEL ADC1_CHANNEL_0
|
||||
#define ADC1_CHANNEL_0_GPIO_NUM 0
|
||||
|
||||
#define ADC1_GPIO2_CHANNEL ADC1_CHANNEL_1
|
||||
#define ADC1_GPIO1_CHANNEL ADC1_CHANNEL_1
|
||||
#define ADC1_CHANNEL_1_GPIO_NUM 1
|
||||
|
||||
#define ADC1_GPIO3_CHANNEL ADC1_CHANNEL_2
|
||||
#define ADC1_GPIO2_CHANNEL ADC1_CHANNEL_2
|
||||
#define ADC1_CHANNEL_2_GPIO_NUM 2
|
||||
|
||||
#define ADC1_GPIO4_CHANNEL ADC1_CHANNEL_3
|
||||
#define ADC1_GPIO3_CHANNEL ADC1_CHANNEL_3
|
||||
#define ADC1_CHANNEL_3_GPIO_NUM 3
|
||||
|
||||
#define ADC1_GPIO5_CHANNEL ADC1_CHANNEL_4
|
||||
#define ADC1_GPIO4_CHANNEL ADC1_CHANNEL_4
|
||||
#define ADC1_CHANNEL_4_GPIO_NUM 4
|
||||
|
||||
#define ADC2_GPIO5_CHANNEL ADC2_CHANNEL_0
|
||||
|
@ -56,7 +56,7 @@
|
||||
/*!< Digital */
|
||||
#define SOC_ADC_DIGI_CONTROLLER_NUM (2)
|
||||
#define SOC_ADC_PATT_LEN_MAX (24) //Two pattern table, each contains 12 items. Each item takes 1 byte
|
||||
#define SOC_ADC_DIGI_MAX_BITWIDTH (13)
|
||||
#define SOC_ADC_DIGI_MAX_BITWIDTH (12)
|
||||
/*!< F_sample = F_digi_con / 2 / interval. F_digi_con = 5M for now. 30 <= interva <= 4095 */
|
||||
#define SOC_ADC_SAMPLE_FREQ_THRES_HIGH 83333
|
||||
#define SOC_ADC_SAMPLE_FREQ_THRES_LOW 611
|
||||
|
Loading…
x
Reference in New Issue
Block a user