STM32F0 Multichannel ADC and DMA
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-06-22 8:21 AM
This discussion is locked. Please start a new topic to ask your question.
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-06-22 8:56 AM
Posted on June 22, 2015 at 17:56
Compare your code with the ADC_DMA_Transfer example in the F0 Cube Nucleo ADC examples. The HAL_ADC_Start after the HAL_ADC_Start_DMA is not required.
Cheers, HalOptions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-06-22 9:28 AM
Posted on June 22, 2015 at 18:28
Thanks, I found the example. It looks like the ADC1 interrupt in this example is disabled. I already tried disabling the ADC IRQ, but this resulted in garbage values in my Buffer.
Tomorrow I will try to leave out the HAL_ADC_Start(). Also, I'm not sure if I got it right. The ADC gets the value for channel 1 e.g., triggers the DMA; the DMA writes ADC1_DR to ADCBuffer[0] and this goes on until the last of the 4 ADC channels and then the DMA IRQ goes off, when it's done with all 4 channels? Is the DMA Interrupt necessary? I don't want to do anything with the values right after the conversion. I just want to have the newest value in my buffer for my functions in main to work with.