You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
I have searched the issue tracker for a similar issue and not found a similar issue.
IDF version.
v5.3.1
Espressif SoC revision.
ESP32-P4 (revision v0.1)
Operating System used.
Linux
How did you build your project?
VS Code IDE
If you are using Windows, please specify command line type.
None
Development Kit.
ESP32-P4 Function EV Board
Power Supply used.
USB
What is the expected behavior?
I tried to run the adc continuous mode example from esp-idf examples making necessary GPIO changes to suit P4. It should continuously read adc samples using the API function adc_continuous_read().
What is the actual behavior?
The function adc_continuous_read() returns values for exactly 1 buffer length (whatever the frame size is. I'm using frame size = 256, so it reads 256 values) and then continuously returns ESP_ERR_TIMEOUT after that. Also, the adc raw values are not accurate. I expect the data to be '0' when the adc input pin is grounded. But it reads values around '280' - '290'.
Steps to reproduce.
This is the code I'm using:
/* Initializtion Function */
void adc_init(adc_continuous_handle_t *out_handle)
{
adc_unit_t adc_unit_num;
adc_channel_t adc_channel;
adc_continuous_handle_t adc_handle = NULL;
adc_continuous_handle_cfg_t handle_config = {
.max_store_buf_size = ADC_MAX_BUFFER_SIZE, // size = 2048
.conv_frame_size = ADC_FRAME_SIZE, // 256
};
ESP_ERROR_CHECK(adc_continuous_new_handle(&handle_config, &adc_handle));
adc_continuous_io_to_channel(ADC_GPIO_NUM, &adc_unit_num, &adc_channel);
/* Need to configure pattern struct as per below for each channel being used
Currently using only 1 channel */
adc_digi_pattern_config_t adc_pattern_config = {
.atten = ADC_ATTEN, // 0dB
.bit_width = ADC_RESOLUTION, // 12 bits
.channel = adc_channel,
.unit = adc_unit_num,
};
adc_continuous_config_t adc_config = {
.pattern_num = NUM_OF_ADC_CHANNELS,
.adc_pattern = &adc_pattern_config,
.sample_freq_hz = ADC_SAMPLE_FREQ, // 48kHz
.conv_mode = ADC_CONVERSION_MODE, // Only ADC 1
.format = ADC_CONVERSION_FORMAT, // Type 2
};
adc_continuous_config(adc_handle, &adc_config);
*out_handle = adc_handle;
}`
rst:0x1 (POWERON),boot:0x30f (SPI_FAST_FLASH_BOOT)
SPI mode:DIO, clock div:1
load:0x4ff33ce0,len:0x1954
load:0x4ff2abd0,len:0xdf0
load:0x4ff2cbd0,len:0x30d4
entry 0x4ff2abda
I (25) boot: ESP-IDF v5.3-dirty 2nd stage bootloader
I (26) boot: compile time Sep 23 2024 16:08:11
I (26) boot: Multicore bootloader
I (30) boot: chip revision: v0.1
I (33) qio_mode: Enabling default flash chip QIO
I (38) boot.esp32p4: SPI Speed : 80MHz
I (43) boot.esp32p4: SPI Mode : QIO
I (48) boot.esp32p4: SPI Flash Size : 16MB
I (52) boot: Enabling RNG early entropy source...
I (58) boot: Partition Table:
I (61) boot: ## Label Usage Type ST Offset Length
I (69) boot: 0 nvs WiFi data 01 02 00009000 00006000
I (76) boot: 1 phy_init RF data 01 01 0000f000 00001000
I (84) boot: 2 factory factory app 00 00 00010000 00800000
I (91) boot: 3 storage Unknown data 01 82 00810000 00700000
I (100) boot: End of partition table
I (103) esp_image: segment 0: paddr=00010020 vaddr=40020020 size=0bd58h ( 48472) map
I (121) esp_image: segment 1: paddr=0001bd80 vaddr=30100000 size=00020h ( 32) load
I (123) esp_image: segment 2: paddr=0001bda8 vaddr=30100020 size=0003ch ( 60) load
I (130) esp_image: segment 3: paddr=0001bdec vaddr=4ff00000 size=0422ch ( 16940) load
I (141) esp_image: segment 4: paddr=00020020 vaddr=40000020 size=1b1e8h (111080) map
I (166) esp_image: segment 5: paddr=0003b210 vaddr=4ff0422c size=0c388h ( 50056) load
I (178) esp_image: segment 6: paddr=000475a0 vaddr=4ff10600 size=02408h ( 9224) load
I (185) boot: Loaded app from partition at offset 0x10000
I (185) boot: Disabling RNG early entropy source...
I (198) hex_psram: vendor id : 0x0d (AP)
I (199) hex_psram: Latency : 0x01 (Fixed)
I (199) hex_psram: DriveStr. : 0x00 (25 Ohm)
I (202) hex_psram: dev id : 0x03 (generation 4)
I (208) hex_psram: density : 0x07 (256 Mbit)
I (213) hex_psram: good-die : 0x06 (Pass)
I (218) hex_psram: SRF : 0x02 (Slow Refresh)
I (224) hex_psram: BurstType : 0x00 ( Wrap)
I (229) hex_psram: BurstLen : 0x03 (2048 Byte)
I (235) hex_psram: BitMode : 0x01 (X16 Mode)
I (240) hex_psram: Readlatency : 0x04 (14 cycles@Fixed)
I (246) hex_psram: DriveStrength: 0x00 (1/1)
I (251) MSPI DQS: tuning success, best phase id is 2
I (434) MSPI DQS: tuning success, best delayline id is 9
I (435) esp_psram: Found 32MB PSRAM device
I (435) esp_psram: Speed: 200MHz
I (438) hex_psram: psram CS IO is dedicated
I (443) cpu_start: Multicore app
I (918) esp_psram: SPI SRAM memory test OK
W (928) clk: esp_perip_clk_init() has not been implemented yet
I (935) cpu_start: Pro cpu start user code
I (935) cpu_start: cpu freq: 360000000 Hz
I (935) app_init: Application information:
I (938) app_init: Project name: adc_test
I (943) app_init: App version: 1
I (947) app_init: Compile time: Sep 23 2024 16:08:11
I (953) app_init: ELF file SHA256: c1cab9c70...
I (959) app_init: ESP-IDF: v5.3-dirty
I (964) efuse_init: Min chip rev: v0.0
I (969) efuse_init: Max chip rev: v0.99
I (973) efuse_init: Chip rev: v0.1
I (978) heap_init: Initializing. RAM available for dynamic allocation:
I (986) heap_init: At 4FF14430 len 00026B90 (154 KiB): RAM
I (992) heap_init: At 4FF3AFC0 len 00004BF0 (18 KiB): RAM
I (998) heap_init: At 4FF40000 len 00040000 (256 KiB): RAM
I (1004) heap_init: At 50108080 len 00007F80 (31 KiB): RTCRAM
I (1010) heap_init: At 3010005C len 00001FA4 (7 KiB): TCM
I (1017) esp_psram: Adding pool of 32768K of PSRAM memory to heap allocator
I (1025) spi_flash: detected chip: generic
I (1029) spi_flash: flash io: qio
I (1033) main_task: Started on CPU0
I (1067) esp_psram: Reserving pool of 32K of internal memory for DMA/internal allocations
I (1068) main_task: Calling app_main()
I (1069) adc_Test: Configuring ADC Interface...
I (1075) gpio: GPIO[21]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (1084) adc_Test: Configuring LCD and LVGL Graphics...
I (1090) adc_Test: LCD Display and LVGL Configuraion success!
I (1096) adc_Test: ADC_Value: 291, Channel:5, i0:
I (1102) adc_Test: ADC_Value: 291, Channel:5, i4:
I (1107) adc_Test: ADC_Value: 291, Channel:5, i8:
I (1112) adc_Test: ADC_Value: 296, Channel:5, i12:
I (1118) adc_Test: ADC_Value: 296, Channel:5, i16:
I (1123) adc_Test: ADC_Value: 294, Channel:5, i20:
I (1129) adc_Test: ADC_Value: 294, Channel:5, i24:
I (1134) adc_Test: ADC_Value: 289, Channel:5, i28:
I (1140) adc_Test: ADC_Value: 292, Channel:5, i32:
I (1145) adc_Test: ADC_Value: 292, Channel:5, i36:
I (1151) adc_Test: ADC_Value: 290, Channel:5, i40:
I (1156) adc_Test: ADC_Value: 290, Channel:5, i44:
I (1162) adc_Test: ADC_Value: 287, Channel:5, i48:
I (1167) adc_Test: ADC_Value: 288, Channel:5, i52:
I (1172) adc_Test: ADC_Value: 288, Channel:5, i56:
I (1178) adc_Test: ADC_Value: 289, Channel:5, i60:
I (1183) adc_Test: ADC_Value: 289, Channel:5, i64:
I (1189) adc_Test: ADC_Value: 291, Channel:5, i68:
I (1194) adc_Test: ADC_Value: 292, Channel:5, i72:
I (1200) adc_Test: ADC_Value: 292, Channel:5, i76:
I (1205) adc_Test: ADC_Value: 289, Channel:5, i80:
I (1211) adc_Test: ADC_Value: 289, Channel:5, i84:
I (1216) adc_Test: ADC_Value: 294, Channel:5, i88:
I (1222) adc_Test: ADC_Value: 294, Channel:5, i92:
I (1227) adc_Test: ADC_Value: 294, Channel:5, i96:
I (1233) adc_Test: ADC_Value: 290, Channel:5, i100:
I (1238) adc_Test: ADC_Value: 290, Channel:5, i104:
I (1244) adc_Test: ADC_Value: 293, Channel:5, i108:
I (1249) adc_Test: ADC_Value: 292, Channel:5, i112:
I (1255) adc_Test: ADC_Value: 292, Channel:5, i116:
I (1260) adc_Test: ADC_Value: 283, Channel:5, i120:
I (1266) adc_Test: ADC_Value: 283, Channel:5, i124:
I (1271) adc_Test: ADC_Value: 292, Channel:5, i128:
I (1277) adc_Test: ADC_Value: 292, Channel:5, i132:
I (1283) adc_Test: ADC_Value: 292, Channel:5, i136:
I (1288) adc_Test: ADC_Value: 286, Channel:5, i140:
I (1294) adc_Test: ADC_Value: 286, Channel:5, i144:
I (1299) adc_Test: ADC_Value: 294, Channel:5, i148:
I (1305) adc_Test: ADC_Value: 295, Channel:5, i152:
I (1310) adc_Test: ADC_Value: 295, Channel:5, i156:
I (1316) adc_Test: ADC_Value: 292, Channel:5, i160:
I (1321) adc_Test: ADC_Value: 292, Channel:5, i164:
I (1327) adc_Test: ADC_Value: 290, Channel:5, i168:
I (1333) adc_Test: ADC_Value: 295, Channel:5, i172:
I (1338) adc_Test: ADC_Value: 295, Channel:5, i176:
I (1344) adc_Test: ADC_Value: 297, Channel:5, i180:
I (1349) adc_Test: ADC_Value: 297, Channel:5, i184:
I (1355) adc_Test: ADC_Value: 289, Channel:5, i188:
I (1360) adc_Test: ADC_Value: 288, Channel:5, i192:
I (1366) adc_Test: ADC_Value: 288, Channel:5, i196:
I (1371) adc_Test: ADC_Value: 296, Channel:5, i200:
I (1377) adc_Test: ADC_Value: 296, Channel:5, i204:
I (1383) adc_Test: ADC_Value: 288, Channel:5, i208:
I (1388) adc_Test: ADC_Value: 289, Channel:5, i212:
I (1394) adc_Test: ADC_Value: 289, Channel:5, i216:
I (1399) adc_Test: ADC_Value: 291, Channel:5, i220:
I (1405) adc_Test: ADC_Value: 291, Channel:5, i224:
I (1410) adc_Test: ADC_Value: 288, Channel:5, i228:
I (1416) adc_Test: ADC_Value: 284, Channel:5, i232:
I (1421) adc_Test: ADC_Value: 284, Channel:5, i236:
I (1427) adc_Test: ADC_Value: 288, Channel:5, i240:
I (1433) adc_Test: ADC_Value: 288, Channel:5, i244:
I (1438) adc_Test: ADC_Value: 290, Channel:5, i248:
I (1444) adc_Test: ADC_Value: 291, Channel:5, i252:
I (1449) adc_Test: ADC_Value: 291, Channel:5, i0:
I (1455) adc_Test: ADC_Value: 292, Channel:5, i4:
I (1460) adc_Test: ADC_Value: 292, Channel:5, i8:
I (1465) adc_Test: ADC_Value: 290, Channel:5, i12:
I (1471) adc_Test: ADC_Value: 291, Channel:5, i16:
I (1476) adc_Test: ADC_Value: 291, Channel:5, i20:
I (1482) adc_Test: ADC_Value: 292, Channel:5, i24:
I (1487) adc_Test: ADC_Value: 292, Channel:5, i28:
I (1493) adc_Test: ADC_Value: 293, Channel:5, i32:
I (1498) adc_Test: ADC_Value: 285, Channel:5, i36:
I (1504) adc_Test: ADC_Value: 285, Channel:5, i40:
I (1509) adc_Test: ADC_Value: 290, Channel:5, i44:
I (1515) adc_Test: ADC_Value: 290, Channel:5, i48:
I (1520) adc_Test: ADC_Value: 288, Channel:5, i52:
I (1526) adc_Test: ADC_Value: 290, Channel:5, i56:
I (1531) adc_Test: ADC_Value: 290, Channel:5, i60:
I (1536) adc_Test: ADC_Value: 293, Channel:5, i64:
I (1542) adc_Test: ADC_Value: 293, Channel:5, i68:
I (1547) adc_Test: ADC_Value: 290, Channel:5, i72:
I (1553) adc_Test: ADC_Value: 291, Channel:5, i76:
I (1558) adc_Test: ADC_Value: 291, Channel:5, i80:
I (1564) adc_Test: ADC_Value: 288, Channel:5, i84:
I (1569) adc_Test: ADC_Value: 288, Channel:5, i88:
I (1575) adc_Test: ADC_Value: 295, Channel:5, i92:
I (1580) adc_Test: ADC_Value: 296, Channel:5, i96:
I (1586) adc_Test: ADC_Value: 296, Channel:5, i100:
I (1591) adc_Test: ADC_Value: 289, Channel:5, i104:
I (1597) adc_Test: ADC_Value: 289, Channel:5, i108:
I (1602) adc_Test: ADC_Value: 297, Channel:5, i112:
I (1608) adc_Test: ADC_Value: 297, Channel:5, i116:
I (1613) adc_Test: ADC_Value: 297, Channel:5, i120:
I (1619) adc_Test: ADC_Value: 292, Channel:5, i124:
I (1625) adc_Test: ADC_Value: 292, Channel:5, i128:
I (1630) adc_Test: ADC_Value: 294, Channel:5, i132:
I (1636) adc_Test: ADC_Value: 290, Channel:5, i136:
I (1641) adc_Test: ADC_Value: 290, Channel:5, i140:
I (1647) adc_Test: ADC_Value: 292, Channel:5, i144:
I (1652) adc_Test: ADC_Value: 292, Channel:5, i148:
I (1658) adc_Test: ADC_Value: 294, Channel:5, i152:
I (1663) adc_Test: ADC_Value: 291, Channel:5, i156:
I (1669) adc_Test: ADC_Value: 291, Channel:5, i160:
I (1675) adc_Test: ADC_Value: 290, Channel:5, i164:
I (1680) adc_Test: ADC_Value: 290, Channel:5, i168:
I (1686) adc_Test: ADC_Value: 284, Channel:5, i172:
I (1691) adc_Test: ADC_Value: 287, Channel:5, i176:
I (1697) adc_Test: ADC_Value: 287, Channel:5, i180:
I (1702) adc_Test: ADC_Value: 291, Channel:5, i184:
I (1708) adc_Test: ADC_Value: 291, Channel:5, i188:
I (1713) adc_Test: ADC_Value: 290, Channel:5, i192:
I (1719) adc_Test: ADC_Value: 292, Channel:5, i196:
I (1725) adc_Test: ADC_Value: 292, Channel:5, i200:
I (1730) adc_Test: ADC_Value: 292, Channel:5, i204:
I (1736) adc_Test: ADC_Value: 292, Channel:5, i208:
I (1741) adc_Test: ADC_Value: 291, Channel:5, i212:
I (1747) adc_Test: ADC_Value: 292, Channel:5, i216:
I (1752) adc_Test: ADC_Value: 292, Channel:5, i220:
I (1758) adc_Test: ADC_Value: 289, Channel:5, i224:
I (1763) adc_Test: ADC_Value: 289, Channel:5, i228:
I (1769) adc_Test: ADC_Value: 294, Channel:5, i232:
I (1775) adc_Test: ADC_Value: 289, Channel:5, i236:
I (1780) adc_Test: ADC_Value: 289, Channel:5, i240:
I (1786) adc_Test: ADC_Value: 292, Channel:5, i244:
I (1791) adc_Test: ADC_Value: 292, Channel:5, i248:
I (1797) adc_Test: ADC_Value: 290, Channel:5, i252:
I (1802) adc_Test: ADC_Value: 287, Channel:5, i0:
I (1808) adc_Test: ADC_Value: 287, Channel:5, i4:
I (1813) adc_Test: ADC_Value: 292, Channel:5, i8:
I (1818) adc_Test: ADC_Value: 292, Channel:5, i12:
I (1824) adc_Test: ADC_Value: 293, Channel:5, i16:
I (1829) adc_Test: ADC_Value: 284, Channel:5, i20:
I (1835) adc_Test: ADC_Value: 284, Channel:5, i24:
I (1840) adc_Test: ADC_Value: 295, Channel:5, i28:
I (1846) adc_Test: ADC_Value: 295, Channel:5, i32:
I (1851) adc_Test: ADC_Value: 288, Channel:5, i36:
I (1857) adc_Test: ADC_Value: 287, Channel:5, i40:
I (1862) adc_Test: ADC_Value: 287, Channel:5, i44:
I (1868) adc_Test: ADC_Value: 285, Channel:5, i48:
I (1873) adc_Test: ADC_Value: 285, Channel:5, i52:
I (1879) adc_Test: ADC_Value: 290, Channel:5, i56:
I (1884) adc_Test: ADC_Value: 292, Channel:5, i60:
I (1890) adc_Test: ADC_Value: 292, Channel:5, i64:
I (1895) adc_Test: ADC_Value: 289, Channel:5, i68:
I (1901) adc_Test: ADC_Value: 289, Channel:5, i72:
I (1906) adc_Test: ADC_Value: 292, Channel:5, i76:
I (1911) adc_Test: ADC_Value: 297, Channel:5, i80:
I (1917) adc_Test: ADC_Value: 297, Channel:5, i84:
I (1922) adc_Test: ADC_Value: 286, Channel:5, i88:
I (1928) adc_Test: ADC_Value: 286, Channel:5, i92:
I (1933) adc_Test: ADC_Value: 288, Channel:5, i96:
I (1939) adc_Test: ADC_Value: 290, Channel:5, i100:
I (1944) adc_Test: ADC_Value: 290, Channel:5, i104:
I (1950) adc_Test: ADC_Value: 290, Channel:5, i108:
I (1955) adc_Test: ADC_Value: 290, Channel:5, i112:
I (1961) adc_Test: ADC_Value: 294, Channel:5, i116:
I (1967) adc_Test: ADC_Value: 295, Channel:5, i120:
I (1972) adc_Test: ADC_Value: 295, Channel:5, i124:
I (1978) adc_Test: ADC_Value: 294, Channel:5, i128:
I (1983) adc_Test: ADC_Value: 294, Channel:5, i132:
I (1989) adc_Test: ADC_Value: 291, Channel:5, i136:
I (1994) adc_Test: ADC_Value: 290, Channel:5, i140:
I (2000) adc_Test: ADC_Value: 290, Channel:5, i144:
I (2005) adc_Test: ADC_Value: 291, Channel:5, i148:
I (2011) adc_Test: ADC_Value: 291, Channel:5, i152:
I (2017) adc_Test: ADC_Value: 289, Channel:5, i156:
I (2022) adc_Test: ADC_Value: 287, Channel:5, i160:
I (2028) adc_Test: ADC_Value: 287, Channel:5, i164:
I (2033) adc_Test: ADC_Value: 292, Channel:5, i168:
I (2039) adc_Test: ADC_Value: 292, Channel:5, i172:
I (2044) adc_Test: ADC_Value: 287, Channel:5, i176:
I (2050) adc_Test: ADC_Value: 291, Channel:5, i180:
I (2055) adc_Test: ADC_Value: 291, Channel:5, i184:
I (2061) adc_Test: ADC_Value: 292, Channel:5, i188:
I (2067) adc_Test: ADC_Value: 292, Channel:5, i192:
I (2072) adc_Test: ADC_Value: 290, Channel:5, i196:
I (2078) adc_Test: ADC_Value: 288, Channel:5, i200:
I (2083) adc_Test: ADC_Value: 288, Channel:5, i204:
I (2089) adc_Test: ADC_Value: 290, Channel:5, i208:
I (2094) adc_Test: ADC_Value: 290, Channel:5, i212:
I (2100) adc_Test: ADC_Value: 292, Channel:5, i216:
I (2105) adc_Test: ADC_Value: 290, Channel:5, i220:
I (2111) adc_Test: ADC_Value: 290, Channel:5, i224:
I (2117) adc_Test: ADC_Value: 290, Channel:5, i228:
I (2122) adc_Test: ADC_Value: 290, Channel:5, i232:
I (2128) adc_Test: ADC_Value: 292, Channel:5, i236:
I (2133) adc_Test: ADC_Value: 292, Channel:5, i240:
I (2139) adc_Test: ADC_Value: 292, Channel:5, i244:
I (2144) adc_Test: ADC_Value: 292, Channel:5, i248:
I (2150) adc_Test: ADC_Value: 292, Channel:5, i252:
I (2155) adc_Test: ADC_Value: 297, Channel:5, i0:
I (2161) adc_Test: ADC_Value: 288, Channel:5, i4:
I (2166) adc_Test: ADC_Value: 288, Channel:5, i8:
I (2172) adc_Test: ADC_Value: 285, Channel:5, i12:
I (2177) adc_Test: ADC_Value: 285, Channel:5, i16:
I (2183) adc_Test: ADC_Value: 290, Channel:5, i20:
I (2188) adc_Test: ADC_Value: 292, Channel:5, i24:
I (2193) adc_Test: ADC_Value: 292, Channel:5, i28:
I (2199) adc_Test: ADC_Value: 289, Channel:5, i32:
I (2204) adc_Test: ADC_Value: 289, Channel:5, i36:
I (2210) adc_Test: ADC_Value: 296, Channel:5, i40:
I (2215) adc_Test: ADC_Value: 291, Channel:5, i44:
I (2221) adc_Test: ADC_Value: 291, Channel:5, i48:
I (2226) adc_Test: ADC_Value: 287, Channel:5, i52:
I (2232) adc_Test: ADC_Value: 287, Channel:5, i56:
I (2237) adc_Test: ADC_Value: 287, Channel:5, i60:
I (2243) adc_Test: ADC_Value: 290, Channel:5, i64:
I (2248) adc_Test: ADC_Value: 290, Channel:5, i68:
I (2254) adc_Test: ADC_Value: 282, Channel:5, i72:
I (2259) adc_Test: ADC_Value: 282, Channel:5, i76:
I (2265) adc_Test: ADC_Value: 294, Channel:5, i80:
I (2270) adc_Test: ADC_Value: 292, Channel:5, i84:
I (2275) adc_Test: ADC_Value: 292, Channel:5, i88:
I (2281) adc_Test: ADC_Value: 287, Channel:5, i92:
I (2286) adc_Test: ADC_Value: 287, Channel:5, i96:
I (2292) adc_Test: ADC_Value: 294, Channel:5, i100:
I (2297) adc_Test: ADC_Value: 296, Channel:5, i104:
I (2303) adc_Test: ADC_Value: 296, Channel:5, i108:
I (2309) adc_Test: ADC_Value: 291, Channel:5, i112:
I (2314) adc_Test: ADC_Value: 291, Channel:5, i116:
I (2320) adc_Test: ADC_Value: 289, Channel:5, i120:
I (2325) adc_Test: ADC_Value: 290, Channel:5, i124:
I (2331) adc_Test: ADC_Value: 290, Channel:5, i128:
I (2336) adc_Test: ADC_Value: 292, Channel:5, i132:
I (2342) adc_Test: ADC_Value: 292, Channel:5, i136:
I (2347) adc_Test: ADC_Value: 289, Channel:5, i140:
I (2353) adc_Test: ADC_Value: 283, Channel:5, i144:
I (2359) adc_Test: ADC_Value: 283, Channel:5, i148:
I (2364) adc_Test: ADC_Value: 288, Channel:5, i152:
I (2370) adc_Test: ADC_Value: 288, Channel:5, i156:
I (2375) adc_Test: ADC_Value: 290, Channel:5, i160:
I (2381) adc_Test: ADC_Value: 289, Channel:5, i164:
I (2386) adc_Test: ADC_Value: 289, Channel:5, i168:
I (2392) adc_Test: ADC_Value: 289, Channel:5, i172:
I (2397) adc_Test: ADC_Value: 289, Channel:5, i176:
I (2403) adc_Test: ADC_Value: 294, Channel:5, i180:
I (2409) adc_Test: ADC_Value: 296, Channel:5, i184:
I (2414) adc_Test: ADC_Value: 296, Channel:5, i188:
I (2420) adc_Test: ADC_Value: 296, Channel:5, i192:
I (2425) adc_Test: ADC_Value: 296, Channel:5, i196:
I (2431) adc_Test: ADC_Value: 293, Channel:5, i200:
I (2436) adc_Test: ADC_Value: 295, Channel:5, i204:
I (2442) adc_Test: ADC_Value: 295, Channel:5, i208:
I (2447) adc_Test: ADC_Value: 295, Channel:5, i212:
I (2453) adc_Test: ADC_Value: 295, Channel:5, i216:
I (2459) adc_Test: ADC_Value: 290, Channel:5, i220:
I (2464) adc_Test: ADC_Value: 290, Channel:5, i224:
I (2470) adc_Test: ADC_Value: 290, Channel:5, i228:
I (2475) adc_Test: ADC_Value: 295, Channel:5, i232:
I (2481) adc_Test: ADC_Value: 295, Channel:5, i236:
I (2486) adc_Test: ADC_Value: 287, Channel:5, i240:
I (2492) adc_Test: ADC_Value: 287, Channel:5, i244:
I (2497) adc_Test: ADC_Value: 287, Channel:5, i248:
I (2503) adc_Test: ADC_Value: 289, Channel:5, i252:
Returns ESP_ERR_TIMEOUT continuously after reading 256 values.
More Information.
I tried running the same code on ESP32-S3 LCD EV Board with ESP-IDF v5.2.2
The code ran successfully without any issues.
The text was updated successfully, but these errors were encountered:
github-actionsbot
changed the title
ADC Continuous mode, ringbuffer time out continuously after 1 buffer read on ESP P4.
ADC Continuous mode, ringbuffer time out continuously after 1 buffer read on ESP P4. (AEGHB-825)
Sep 24, 2024
Answers checklist.
IDF version.
v5.3.1
Espressif SoC revision.
ESP32-P4 (revision v0.1)
Operating System used.
Linux
How did you build your project?
VS Code IDE
If you are using Windows, please specify command line type.
None
Development Kit.
ESP32-P4 Function EV Board
Power Supply used.
USB
What is the expected behavior?
I tried to run the adc continuous mode example from esp-idf examples making necessary GPIO changes to suit P4. It should continuously read adc samples using the API function adc_continuous_read().
What is the actual behavior?
The function adc_continuous_read() returns values for exactly 1 buffer length (whatever the frame size is. I'm using frame size = 256, so it reads 256 values) and then continuously returns ESP_ERR_TIMEOUT after that. Also, the adc raw values are not accurate. I expect the data to be '0' when the adc input pin is grounded. But it reads values around '280' - '290'.
Steps to reproduce.
This is the code I'm using:
Debug Logs.
More Information.
I tried running the same code on ESP32-S3 LCD EV Board with ESP-IDF v5.2.2
The code ran successfully without any issues.
The text was updated successfully, but these errors were encountered: