STM32 DMA PT 1

แชร์
ฝัง
  • เผยแพร่เมื่อ 9 ก.ย. 2024

ความคิดเห็น • 50

  • @uber-jaianada
    @uber-jaianada 5 ปีที่แล้ว +38

    Dude! your video's are better than the official STmicro channel.

    • @brushhead
      @brushhead 4 ปีที่แล้ว +4

      Quite agree!

    • @johnbaker3745
      @johnbaker3745 7 หลายเดือนก่อน

      absolutly!

  • @ilyas.7209
    @ilyas.7209 3 ปีที่แล้ว +6

    An overview of the registers is very helpful. It gives understanding of what exactly the stuff does and what parameters it has. Finally some clarity without "do it like this and this and it just somehow works", something many other sources have problems with by assuming some things are "obvious" or by "leave these settings at default" without any explanation of what they are or why. Maybe those things are simple and obvious indeed, but only if you ALREADY know them. Your insight closes the gap there. Thanks a lot!

  • @hamiltonhorta5441
    @hamiltonhorta5441 5 ปีที่แล้ว +6

    Great video Eddie, you have a knack for making simple, things that seem very complicated at first glance. I have enjoyed each and every one of your videos.

  • @otenyop
    @otenyop 3 ปีที่แล้ว +4

    Thank you for your Wonderfull and detail videos on STM32s!!! I really appreciate it.

  • @ronfratom7249
    @ronfratom7249 4 ปีที่แล้ว +1

    I like you way of explaining things to bit and pieces that too taking a working project like which bit set what flag ...just loved it

  • @rishabhpathak1367
    @rishabhpathak1367 4 ปีที่แล้ว +2

    MAN!...I watched your video for first time...and you got a new subscriber 💯♥️

  • @XpressCrosSs
    @XpressCrosSs 4 ปีที่แล้ว +4

    i think it is great when sampling a data via adc and performing some dsp(fft,filtering etc.) on it. In this way, cpu clock is not wasted by moving data from peripheral to mem location.

  • @miguellorenzo3726
    @miguellorenzo3726 4 ปีที่แล้ว +5

    Great, clear explanation. Amazing work!

  • @masoudshahbazi9691
    @masoudshahbazi9691 4 ปีที่แล้ว

    Best tutorial on arm i ever see✌

  • @davdavsin
    @davdavsin 4 ปีที่แล้ว +1

    Thanks for another great video

  • @severinmundl5464
    @severinmundl5464 4 ปีที่แล้ว +1

    Amaizing explanation! Tnaks alot!!!!

  • @AdiWasturaka
    @AdiWasturaka 2 ปีที่แล้ว

    holy shit amazing explanation subscribed

  • @Heikki70
    @Heikki70 3 ปีที่แล้ว

    Thanks for the very clear and easy tutorial.

  • @dominogolian7858
    @dominogolian7858 4 ปีที่แล้ว +2

    Man, pls continue with those videos... milion times better than some of the "idndians guys" whitch using cubeMX for blink led... good work man, im learn a lot from u

  • @rafalkowalczyk5027
    @rafalkowalczyk5027 3 ปีที่แล้ว +1

    this crew was good

  • @vinothkannanr2804
    @vinothkannanr2804 4 ปีที่แล้ว

    love the way u teach

  • @truongbom4384
    @truongbom4384 3 ปีที่แล้ว

    it's great, so clear. thanks so much!!!

  • @berkcan2439
    @berkcan2439 4 ปีที่แล้ว +1

    U should never say that in public because sounds like nerd i am soo agree with you :D
    Btw i am learning stm32 from your videos thanks for all

  • @federicocanete2905
    @federicocanete2905 4 ปีที่แล้ว +1

    Thanks man! You're awesome!

  • @fw3mbedded598
    @fw3mbedded598 ปีที่แล้ว

    Thank you

  • @PeetHobby
    @PeetHobby ปีที่แล้ว

    21:36 The external memory control is a peripheral that needs to be increased, I think.

  • @Scherbakov
    @Scherbakov 2 ปีที่แล้ว

    Cool! Thank you!

  • @sabrineguiga218
    @sabrineguiga218 4 ปีที่แล้ว +1

    hello, can you please telle me how can we use CAN bus and DMA?? and if it's possible or not!! thank u.

    • @karankolhe3370
      @karankolhe3370 4 ปีที่แล้ว

      STM32 has dedicated CAN controller so there's no need for DMA in CAN hence they have not given that option

  • @TheChrisey
    @TheChrisey 4 ปีที่แล้ว

    Would the Peripheral Increment Mode be useful for multiplexing ADC using DMA?

  • @therealspixycat
    @therealspixycat 3 ปีที่แล้ว

    It also considers flow control when writing to a low speed device?

  • @dominogolian7858
    @dominogolian7858 4 ปีที่แล้ว

    thx for those videos! :)

  • @thomzz3449
    @thomzz3449 5 ปีที่แล้ว +1

    Nice video. I really needed this explanation about the general working of the DMA. Coming from Arduino with little knowledge about STM32 the DMA is completely new to me.
    Currenty I'm trying to output some audio from an STM32F4 discovery and in a tutorial the DMA was used. I want to make a synthesizer and it seems inefficient to calculate and write to the I2S bus for every audio sample. I'm going to try to pre calculate x samples (not to many because it has to be real time) and put them in the DMA buffer and let it handle the rest. Would this be the way to go about it?

    • @EdwinFairchild
      @EdwinFairchild  5 ปีที่แล้ว

      To tell you the truth I have never done any audio related work. But if you can offload as much to hardware it's always faster then doing it in software

    • @thomzz3449
      @thomzz3449 5 ปีที่แล้ว

      @@EdwinFairchild Ok, thanks for the quick response

  • @zuro8
    @zuro8 3 ปีที่แล้ว

    Thanks for great video! Much better than STM ;) However, there is something that puzzles me. I want to read data from my mems board using DMA and i2c. There are multiple memory addresses for each reading/data I want to extract. Does it mean that for each memory address I have to use separate DMA channel? According to your video I am supposed to use one DMA channel per device. How is that supposed to work if I want to transfer multiple data from different memory addresses?
    Anyway, thanks for your great job. Looking forward to watch more :)

    • @EdwinFairchild
      @EdwinFairchild  3 ปีที่แล้ว +1

      Your i2c receives data on only one register.... Dma is for your i2c not for mem device internal memory...dma has no connection to that . Your device send data to i2c and you read it from i2c register... That's it. You can tell your i2c to read from any address of your devices that is fine but still the device will send the data to your i2c and you can only find that in one register. Don't confuse i2c registers and your men's registers...the mcu has no connection to them.

    • @EdwinFairchild
      @EdwinFairchild  3 ปีที่แล้ว

      If you have trouble understanding let me know I can better explain it. That is if I understood your question correct

    • @zuro8
      @zuro8 3 ปีที่แล้ว

      Thanks for your fast replay. Not everything is clear enough for me so maybe I will describe what I would like to achive. I have mems device conected to i2c bus in slave mode. Device (x-nucleo-iks01a3) is visible and ready to work. Data I want to read is stored in few device memory registers. I am trying to use HAL DMA function HAL_I2C_Mem_Read_DMA which takes as arguments i2c device address and device memory register. Now, lets assume, I have 6 memory registers I want to read from. According to what you said, I have one DMA channel dedicated to whole i2c bus? Is it still this same in case of connecting few devices to i2c bus? Lets assume my DMA is working in normal mode. If I am missing any details let me know. Thanks in advance! :)

    • @EdwinFairchild
      @EdwinFairchild  3 ปีที่แล้ว +1

      ​@@zuro8 I have little knowledge about HAL functions and how they work. But you can use DMA in memory increment mode and call a function to read a certain register in your mems. The dma will transfer the data to the first index of your desired array. Then upon a DMA transfer complete interrupt you can call your function to read the next registers and since DMA is in memory increment mode it will increment the array you set as the memory to store incoming data.... it sounds like a lot but its really not, its just hard to explain in text. However you do have to keep track of which device is currently the active slave so you know what device that data belongs to. You can also just change the array variable you configure in your DMA when talking to a new device so that way each device will have their own data in a separate variable in your code...again i know im explaining it kind of weird

    • @zuro8
      @zuro8 3 ปีที่แล้ว

      @@EdwinFairchild THanks for your replay. I think I will test it during weekend. If I find a good solution then I will let you know :)

  • @EdwinFairchild
    @EdwinFairchild  4 ปีที่แล้ว +1

    dam i was so fat here

  • @anneallison6402
    @anneallison6402 5 ปีที่แล้ว

    I got a question, can you use dma on a function?

    • @EdwinFairchild
      @EdwinFairchild  4 ปีที่แล้ว

      sorry i jusw this question but i dont know what you mean by use DMA on a function

  • @dajianghe
    @dajianghe ปีที่แล้ว

    what is the link to your blog?

  • @carlosgalvez7464
    @carlosgalvez7464 4 ปีที่แล้ว

    Thanks for the great videos, really easy to follow!
    Could you do a video on SPI + DMA? In SPI you are transmitting and receiving at the same time, so I guess you need to setup 2 DMA streams for RX and TX. However, how are these streams synchronized? How do you make sure there are no race conditions? One stream writes into SPI DR and the other one reads from it.

    • @EdwinFairchild
      @EdwinFairchild  4 ปีที่แล้ว

      It sounds more complicated than it really is. If you understand how SPI works and the fact that it serially shifts in the incoming byte as you transmit your own byte , basically when you send bit 0 of your data, then your data shifted to the right and the empty bit 7 gets filled with your new incoming bit and so on and so, the exact moment you are don't transmitting you're entire received byte is already there to read, the stm32 F1 is old but in newer stm32 micros, there is a register with the number of bytes you want to send and that generated an interrupt if you want or not, but either way it's really not as complex as you make it sound with race conditions and stuff. I might make a video on that. I'm just really lazy when it comes to it if I'm honest. I rather write about it on my blog so keep an eye on that.

    • @carlosgalvez7464
      @carlosgalvez7464 4 ปีที่แล้ว

      @@EdwinFairchild Wow that was fast, thanks a lot! :) I'll give it a try and see what I run into, maybe I'm overthinking about non-existing issues. Totally understand the lazyness to make videos, a blog post about it would be great as well! Will definitely keep an eye on it!