I struggled today with multichannel DMA, do exactly as mentioned in the video. Furthermore, enable regular conversions. In each rank, add the channel you want to read from. Then generate the code. Let's say you want to read from 4 different channels. Your buffer should have size 4. And each time you call start_dma your buffer gets filled with every adc.
Hello Thanks for your easy and fast Learning. Please continue more by Dual ADC with DMA and also injected simultaneous + interleaved mode Best regards Ali
Hi.,., How to share the ADC data via uart so that i can see in some com port. Please help i am trying to sample and store an audio signal. Kanagachidambaresan G R
Hello. First of all great video. Helped me a lot. Second, I would want to know hot to read de DMA buffer and store it into a variable. Could you help me?
Hi, great channel! Here you have a new subscriber. I would like to know how to implement DMA to I2C?. I want to read acceleration from KX132 accelerometer but works only once time, only enter to transfer complete interrupt once time and it never enter again :(. Do you know something about this? I have a post in stackoverflow about this issue if you need more details. Thank you !!
Any thoughts or plans on an example using a TIMER to trigger an ADC scan with DMA ? For example, I've set TIMER4 CH4 to Update Event (Output Compare), and then set the ADC's External Trigger Conversion to : "Timer 4 Trigger Out Event". The ADC's DMA setting is set for Circular. In theory, HAL_ADC_Start_DMA and HAL_TIM_OC_Start , should cause new samples to be DMA'd into memory at the TIMER rate. However this doesn't seem to work.. in the clock configuration, there is an APB1 Timer Clock, APB2 Timer Clock, and ADC Clock.. I assume the APB clock connected to the desired Timer should be used for the timer prescaler settings.. but what should the ADC clock speed be? Also, if the Timer triggers the starts of a SCAN conversion, does that mean the first channel of the scan won't be sampled at the same time as the last channel? Even though all scan channels are being sampled at the rate set by the timer event? There's also another ADC option that might be the problem: "Conversion Data Management : DMA One shot, or DMA Circular" Since I've set the ADC dma settings to circular, not sure what this particular option is adding.
There are so many movies that I can do about the STM32 and other things that I build. I have to start with the simple things. There are always the examples in the repository.
Great video thank you so much! I've been trying to make a guitar pedal, which requires the ADC to copy its value to the DAC. Could you make a video on what setting should one use to do so?
@@Weblearning1 That's just what I was looking for ! Could you please also tell me when do I swap the buffers? My guess is the adc conversion complete call back?
@@Weblearning1 Also I'm a bit confused about how to swap two buffers, is there any sample code/link that you recommend? Because the HAL_ADC_START_DMA uses one buffer and refills it over and over. Any help would be appreciated!
Yes, when it finishes, you just swap the addresses and send a start command again. You give the buffers a name, so you can have buffer1, buffer2 and then swap them in an IF command or SWITCH or whet ever scheme you are using.
Well, I did exactly the same and ended up not having that DAC_Channel_1. Fuckn bullshit.... Mine asks for variables that I've defined, and does not give me the option to pick DAC_Channel_1.... or any other channel.
Please try to follow each step of the video so you want miss anything. if its still not working, try to share a picture and I will try to see if I can help.
Finally, someone who explains what they're doing. Thank you!
after all day long trying to understand DMA finally i get it . Thank you. keep up the good work
Glad it helped! Maybe subscribe to the channel?
The best explanation of the normal and the circular modes of DMA.
It works well. another tutorial just didn't. thank you.
Keep on doing videos please. Great they are
Thanks.
Great help. You deliver the information in a easy to understand way. Thank you. I would love to see some more ADC stuff like multichannel DMA.
Thanks. Will try to make one.
Appreciated.
I struggled today with multichannel DMA, do exactly as mentioned in the video. Furthermore, enable regular conversions. In each rank, add the channel you want to read from. Then generate the code. Let's say you want to read from 4 different channels. Your buffer should have size 4.
And each time you call start_dma your buffer gets filled with every adc.
Hello
Thanks for your easy and fast Learning.
Please continue more by Dual ADC with DMA and also injected simultaneous + interleaved mode
Best regards
Ali
Hi. Did you see the video I have uploaded?
Hi.,., How to share the ADC data via uart so that i can see in some com port. Please help i am trying to sample and store an audio signal.
Kanagachidambaresan G R
Great video thank you so much!
In this video, you employ 1 ADC with DMA. it is possible to use DMA with 3 ADC simultaneously?
Ya it's possible, u can do software trigger (or timer trigger for synchronisation of adcs and with dma)
Can you make one for simultaneous ADC reads with DMA?
Thanks!!! Great video!
Hello. First of all great video. Helped me a lot.
Second, I would want to know hot to read de DMA buffer and store it into a variable. Could you help me?
There are examples in the repository on how to do this.
thx from China
Thanks and I hope all is well.
Hi, great channel! Here you have a new subscriber.
I would like to know how to implement DMA to I2C?. I want to read acceleration from KX132 accelerometer but works only once time, only enter to transfer complete interrupt once time and it never enter again :(. Do you know something about this?
I have a post in stackoverflow about this issue if you need more details.
Thank you !!
Sorry, still in the pipeline to do this video and many others. I hope one day I will get to it.
Nice Video Carry On.
Thanks for the good comment. It always helps.
What is diference with one ADC and multiple channels ?
I still need to make a tutorial about this. Follow the channel and you will see when I upload it.
Any thoughts or plans on an example using a TIMER to trigger an ADC scan with DMA ?
For example, I've set TIMER4 CH4 to Update Event (Output Compare), and then set the ADC's External Trigger Conversion to : "Timer 4 Trigger Out Event". The ADC's DMA setting is set for Circular.
In theory, HAL_ADC_Start_DMA and HAL_TIM_OC_Start , should cause new samples to be DMA'd into memory at the TIMER rate.
However this doesn't seem to work.. in the clock configuration, there is an APB1 Timer Clock, APB2 Timer Clock, and ADC Clock.. I assume the APB clock connected to the desired Timer should be used for the timer prescaler settings.. but what should the ADC clock speed be?
Also, if the Timer triggers the starts of a SCAN conversion, does that mean the first channel of the scan won't be sampled at the same time as the last channel? Even though all scan channels are being sampled at the rate set by the timer event?
There's also another ADC option that might be the problem: "Conversion Data Management : DMA One shot, or DMA Circular"
Since I've set the ADC dma settings to circular, not sure what this particular option is adding.
There are so many movies that I can do about the STM32 and other things that I build. I have to start with the simple things. There are always the examples in the repository.
Good video, thanks...
Glad you liked it!
Great video thank you so much! I've been trying to make a guitar pedal, which requires the ADC to copy its value to the DAC. Could you make a video on what setting should one use to do so?
You can see also the DAC video. All you need to do is use a double buffering and swap the buffers between the ADC and the DAC.
@@Weblearning1 That's just what I was looking for ! Could you please also tell me when do I swap the buffers? My guess is the adc conversion complete call back?
@@Weblearning1 Also I'm a bit confused about how to swap two buffers, is there any sample code/link that you recommend? Because the HAL_ADC_START_DMA uses one buffer and refills it over and over. Any help would be appreciated!
Yes, when it finishes, you just swap the addresses and send a start command again. You give the buffers a name, so you can have buffer1, buffer2 and then swap them in an IF command or SWITCH or whet ever scheme you are using.
Search for Phil’s Lab channel. He is doing it.
what was that noise at 1:55 ?
Dont know, maybe something from editing.
Well, I did exactly the same and ended up not having that DAC_Channel_1. Fuckn bullshit.... Mine asks for variables that I've defined, and does not give me the option to pick DAC_Channel_1.... or any other channel.
Please try to follow each step of the video so you want miss anything. if its still not working, try to share a picture and I will try to see if I can help.
Minute 5:40 ::: you are passing the 'value_adc' wrong to the HAL_ADC_Start_DMA function. It should be (uint32_t*)value_adc or (uint32_t*)&value_adc[0]
Interesting. Newbie-to-STM32 question (sorry): Why is the (unit32_t*) casting required? At 02:05, it appears to be an array of uint16_t. Thanks.