HAL #13: ADC with DMA

Поділитися
Вставка
  • Опубліковано 26 жов 2024

КОМЕНТАРІ • 45

  • @thodorispaparrigopoulos8542
    @thodorispaparrigopoulos8542 3 роки тому +5

    Finally, someone who explains what they're doing. Thank you!

  • @walterrota9096
    @walterrota9096 3 роки тому +2

    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?

  • @vladimirvakhter4655
    @vladimirvakhter4655 3 роки тому +1

    The best explanation of the normal and the circular modes of DMA.

  • @mrlajel
    @mrlajel 2 роки тому +1

    It works well. another tutorial just didn't. thank you.

  • @MrHeatification
    @MrHeatification 5 років тому +12

    Keep on doing videos please. Great they are

  • @mickstr5295
    @mickstr5295 5 років тому +3

    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  5 років тому +2

      Thanks. Will try to make one.

    • @mickstr5295
      @mickstr5295 5 років тому

      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.

  • @vlib4U
    @vlib4U 5 років тому +3

    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 Рік тому +1

    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

  • @luacardoso6825
    @luacardoso6825 3 роки тому +2

    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 роки тому +3

      Ya it's possible, u can do software trigger (or timer trigger for synchronisation of adcs and with dma)

  • @robin48gx
    @robin48gx 3 роки тому +2

    Can you make one for simultaneous ADC reads with DMA?

  • @marrenemcduling5475
    @marrenemcduling5475 4 роки тому +1

    Thanks!!! Great video!

  • @antoniomartos2343
    @antoniomartos2343 4 роки тому +1

    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.

  • @zhaosinicholas921
    @zhaosinicholas921 4 роки тому +1

    thx from China

  • @pabloolguin818
    @pabloolguin818 2 роки тому +1

    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  2 роки тому

      Sorry, still in the pipeline to do this video and many others. I hope one day I will get to it.

  • @MrRonychakraborty
    @MrRonychakraborty 5 років тому +2

    Nice Video Carry On.

    • @Weblearning1
      @Weblearning1  5 років тому

      Thanks for the good comment. It always helps.

  • @djkutilak
    @djkutilak 5 років тому +2

    What is diference with one ADC and multiple channels ?

    • @Weblearning1
      @Weblearning1  5 років тому

      I still need to make a tutorial about this. Follow the channel and you will see when I upload it.

  • @bennguyen1313
    @bennguyen1313 4 роки тому

    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  4 роки тому

      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.

  • @agir4707
    @agir4707 4 роки тому +1

    Good video, thanks...

  • @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 роки тому +1

      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 роки тому +1

      @@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 роки тому +1

      @@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 роки тому +1

      Search for Phil’s Lab channel. He is doing it.

  • @mychromebook9935
    @mychromebook9935 3 роки тому +1

    what was that noise at 1:55 ?

    • @Weblearning1
      @Weblearning1  3 роки тому

      Dont know, maybe something from editing.

  • @dennisyildirim2708
    @dennisyildirim2708 4 роки тому +1

    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 роки тому +1

      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.