2023-05-31 10:02 PM
in generated code, I don't find dma set memory address, so I add
uint16_t regular_data[2];
......
LL_DMA_ConfigAddresses(DMA1, LL_DMA_CHANNEL_1,
LL_ADC_DMA_GetRegAddr(ADC1, LL_ADC_DMA_REG_REGULAR_DATA), (uint32_t)®ular_data[0],
LL_DMA_DIRECTION_PERIPH_TO_MEMORY);
in main.c, I enable adc and dma:
LL_ADC_Enable(ADC1);
LL_DMA_EnableChannel(DMA1, LL_DMA_CHANNEL_1);
I'm no sure the codea are correct.
2023-06-01 12:49 AM
Hello @eyan.1 and welcome to the Community :)
You can refer to this wiki article on ADC topic, that can help you on how to configure ADC.
Hope this helps you!
Imen