Skip to content

Commit

Permalink
Merge branch 'bugfix/fix_legacy_adc_continuous_driver_dma_descriptor_…
Browse files Browse the repository at this point in the history
…not_internal_issue_v5.1' into 'release/v5.1'

adc: fixed legacy adc continuous driver dma descriptor not in internal ram issue (v5.1)

See merge request espressif/esp-idf!25508
  • Loading branch information
suda-morris committed Aug 25, 2023
2 parents 860e047 + 71f2f98 commit 9080a7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/driver/deprecated/adc_dma_legacy.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ esp_err_t adc_digi_initialize(const adc_digi_init_config_t *init_config)
//malloc dma descriptor
uint32_t dma_desc_num_per_frame = (init_config->conv_num_each_intr + DMA_DESCRIPTOR_BUFFER_MAX_SIZE_4B_ALIGNED - 1) / DMA_DESCRIPTOR_BUFFER_MAX_SIZE_4B_ALIGNED;
uint32_t dma_desc_max_num = dma_desc_num_per_frame * INTERNAL_BUF_NUM;
s_adc_digi_ctx->hal.rx_desc = heap_caps_calloc(1, (sizeof(dma_descriptor_t)) * dma_desc_max_num, MALLOC_CAP_DMA);
s_adc_digi_ctx->hal.rx_desc = heap_caps_calloc(1, (sizeof(dma_descriptor_t)) * dma_desc_max_num, MALLOC_CAP_INTERNAL | MALLOC_CAP_DMA);
if (!s_adc_digi_ctx->hal.rx_desc) {
ret = ESP_ERR_NO_MEM;
goto cleanup;
Expand Down

0 comments on commit 9080a7a

Please sign in to comment.