HAL #13: ADC with DMA

  Рет қаралды 40,591

Web learning

Web learning

4 жыл бұрын

In this video I will show how to use the ADC with DMA. I will also show:
* DAC
* STM32CubeIDE
And more..
Enjoy.
/ weblearning
Tip me: paypal.me/weblearning1
My social accounts :
/ weblearning1
/ weblearning1
/ weblearning1
Thanks.

Пікірлер: 45
@thodorispaparrigopoulos8542
@thodorispaparrigopoulos8542 3 жыл бұрын
Finally, someone who explains what they're doing. Thank you!
@vladimirvakhter4655
@vladimirvakhter4655 2 жыл бұрын
The best explanation of the normal and the circular modes of DMA.
@walterrota9096
@walterrota9096 3 жыл бұрын
after all day long trying to understand DMA finally i get it . Thank you. keep up the good work
@Weblearning1
@Weblearning1 3 жыл бұрын
Glad it helped! Maybe subscribe to the channel?
@mickstr5295
@mickstr5295 4 жыл бұрын
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.
@Weblearning1
@Weblearning1 4 жыл бұрын
Thanks. Will try to make one.
@mickstr5295
@mickstr5295 4 жыл бұрын
Appreciated.
@thodorispaparrigopoulos8542
@thodorispaparrigopoulos8542 3 жыл бұрын
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.
@MrHeatification
@MrHeatification 4 жыл бұрын
Keep on doing videos please. Great they are
@Weblearning1
@Weblearning1 4 жыл бұрын
Thanks.
@marrenemcduling5475
@marrenemcduling5475 3 жыл бұрын
Thanks!!! Great video!
@robin48gx
@robin48gx 3 жыл бұрын
Can you make one for simultaneous ADC reads with DMA?
@mrlajel
@mrlajel 2 жыл бұрын
It works well. another tutorial just didn't. thank you.
@vlib4U
@vlib4U 4 жыл бұрын
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
@Weblearning1
@Weblearning1 4 жыл бұрын
Hi. Did you see the video I have uploaded?
@KanagachidambaresanGR
@KanagachidambaresanGR Жыл бұрын
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
@agir4707
@agir4707 4 жыл бұрын
Good video, thanks...
@Weblearning1
@Weblearning1 4 жыл бұрын
Glad you liked it!
@antoniomartos2343
@antoniomartos2343 3 жыл бұрын
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?
@Weblearning1
@Weblearning1 3 жыл бұрын
There are examples in the repository on how to do this.
@bennguyen1313
@bennguyen1313 3 жыл бұрын
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.
@Weblearning1
@Weblearning1 3 жыл бұрын
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.
@luacardoso6825
@luacardoso6825 3 жыл бұрын
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?
@vaishnavivijayakumar1127
@vaishnavivijayakumar1127 3 жыл бұрын
Ya it's possible, u can do software trigger (or timer trigger for synchronisation of adcs and with dma)
@CuriousMotor
@CuriousMotor 4 жыл бұрын
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
@Weblearning1 4 жыл бұрын
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.
@CuriousMotor
@CuriousMotor 4 жыл бұрын
@@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?
@CuriousMotor
@CuriousMotor 4 жыл бұрын
@@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!
@Weblearning1
@Weblearning1 4 жыл бұрын
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.
@adaminsanoff
@adaminsanoff 2 жыл бұрын
Search for Phil’s Lab channel. He is doing it.
@MrRonychakraborty
@MrRonychakraborty 4 жыл бұрын
Nice Video Carry On.
@Weblearning1
@Weblearning1 4 жыл бұрын
Thanks for the good comment. It always helps.
@zhaosinicholas921
@zhaosinicholas921 4 жыл бұрын
thx from China
@Weblearning1
@Weblearning1 4 жыл бұрын
Thanks and I hope all is well.
@pabloolguin818
@pabloolguin818 2 жыл бұрын
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 !!
@Weblearning1
@Weblearning1 Жыл бұрын
Sorry, still in the pipeline to do this video and many others. I hope one day I will get to it.
@djkutilak
@djkutilak 4 жыл бұрын
What is diference with one ADC and multiple channels ?
@Weblearning1
@Weblearning1 4 жыл бұрын
I still need to make a tutorial about this. Follow the channel and you will see when I upload it.
@mychromebook9935
@mychromebook9935 3 жыл бұрын
what was that noise at 1:55 ?
@Weblearning1
@Weblearning1 3 жыл бұрын
Dont know, maybe something from editing.
@dennisyildirim2708
@dennisyildirim2708 4 жыл бұрын
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.
@Weblearning1
@Weblearning1 4 жыл бұрын
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.
@jojo-fp1zv
@jojo-fp1zv 2 жыл бұрын
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]
@ytubeleo
@ytubeleo 2 жыл бұрын
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.
HowTo: STM32CubeProgrammer
7:51
Web learning
Рет қаралды 40 М.
Tutorial On ADC MultiChannel Interrupt method.
28:15
PR TechTalk
Рет қаралды 1,4 М.
DO YOU HAVE FRIENDS LIKE THIS?
00:17
dednahype
Рет қаралды 60 МЛН
OMG🤪 #tiktok #shorts #potapova_blog
00:50
Potapova_blog
Рет қаралды 18 МЛН
stm32 timed multichannel ADC DMA conversions on STM32F030k6
12:06
STM32CubeIDE basics - 10 ADC DMA TIM HAL lab
31:32
STMicroelectronics
Рет қаралды 58 М.
HAL #12: ADC with IT
11:31
Web learning
Рет қаралды 17 М.
STM32 ADC MULTI CHANNEL without DMA || HAL || Poll
9:22
ControllersTech
Рет қаралды 42 М.
HAL: #4 How to - UART Interrupt
7:00
Web learning
Рет қаралды 85 М.
DAC in STM32 || Sine wave || HAL || CubeIDE
16:07
ControllersTech
Рет қаралды 63 М.
Direct Memory Access - DMA - Simplified Explanation
6:06
Zero Codes
Рет қаралды 134 М.
How Do ADCs Work? - The Learning Circuit
10:13
element14 presents
Рет қаралды 124 М.
STM32 ADC multiple channels || DMA || True studio || CubeMx
15:47
ControllersTech
Рет қаралды 67 М.
Skateboarding Down the Steps
0:11
Ryan's World
Рет қаралды 28 МЛН
Меч в камне 🤯
0:26
FATA MORGANA
Рет қаралды 1,5 МЛН
#狼途新品lt75机械键盘 #funny #comedy #memes #baby #icecream
0:15