I want use ADC on stm32f030k6t6 with two channel, and using DMA to set regular value, I config it in stm32cubemx,but I don't know how to start conversion and wait conversion stop correctly, I need someone help or some example, in LL library, thanks.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
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.
Labels:
- Labels:
-
ADC
-
STM32F0 Series
This discussion is locked. Please start a new topic to ask your question.
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
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
When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Thanks
Imen
