5. How to Connect the STM32 and ST-Link v2 for ARM Microcontrollers - Tutorial and First Circuit

แชร์
ฝัง
  • เผยแพร่เมื่อ 22 ม.ค. 2025

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

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

    i love the asmr-like way of sticking wires into the the breadboard. so relaxing.

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

    I binged watched the 50 or so videos in the AVR series that you did (fantastic btw, you're phenomenal at introducing and explaining concepts). Just purchased the ARM interface board from your site, and very excited to see the new videos you're releasing on the topic. Thanks for your tremendous time and effort!

    • @PatrickHoodDaniel
      @PatrickHoodDaniel  9 ปีที่แล้ว

      +Joe Prince Thanks Joe!! The purchase is much appreciated and really helps me keep these videos coming!

  • @petercheung63
    @petercheung63 7 ปีที่แล้ว +3

    nobody do mcu programming as raw as u did. great video.

  • @60058366
    @60058366 9 ปีที่แล้ว

    have never been so excited over a youtube video can't wait for the next. Thank you so much for being so wonderful. Waiting for the next

  • @nebe01
    @nebe01 9 ปีที่แล้ว +7

    Great stuff!, I have been waiting a long time for this video :)

    • @PatrickHoodDaniel
      @PatrickHoodDaniel  9 ปีที่แล้ว +7

      +nebe01 More to come. Thanks for staying around!

    • @davidmaye3580
      @davidmaye3580 9 ปีที่แล้ว

      +Patrick Hood-Daniel Hurry I've ordered my stuff from you, It'll be in the mail soon and I want to get with it! love it, can't wait.

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

    Great video! It was like an electronics lab!
    a) At 5:05, why would the designers of the chip put in 3 VDD power supply pins? ( Pins 1, 32 and 64 ). Why 3 power lines going in?
    Why couldn't they make do with just one power pin?
    b) How come, when I am programming my arduino UNO, that I dont need to use anything remotely similar to the ST-LINK V2 (No middleman )?
    c) At 11:25, you used those 2 resistors to tie them high and low. How did you know what value resistors to use?
    d) At 12:40, you picked pin PC6 to connect to the LED. Why did you pick that pin? Why not pin PA8 or PB15? What made you decide on that pin? Can you please tell me what was your train of thought to pick that pin?
    Is it because the datasheet said that it was an I/O pin? ( Even PA8 is an I/O pin according to the data sheet; why not pick that?)
    Thank you for your replies!

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

      a) Having only 1 power pin limits capabilities of the IC. When toggling multiple pins at high frequencies, a significant amount of power is transferred. This power must be supplied by the power pins. If the IC had only 1 power pin, then all the power for the chip had enter in one side, supply all internal circuitry and supply all outputs going HIGH. At 10kHz, that might be doable , but at 1Mhz+ the VCC on the chip would differ from one side to the other. As a general rule, the more pins one the IC the more power pins is needed to run it properly. BTW the decoupling cap placed on the breadboard is really not a proper way to decouple the IC. It should always be as close at possible to IC (mm-1cm range).

  • @Bits32
    @Bits32 9 ปีที่แล้ว

    waited nearly six months for the next instalment.. hope you finish the series in a single flow this time. 😊😊

    • @PatrickHoodDaniel
      @PatrickHoodDaniel  9 ปีที่แล้ว

      +irshad ahamed Going to try my best. I had some time after the completion of the Vertical Laser System.

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

    Hi, can you explain, in layman’s terms, what the bypass capacitor does in this circuit? I get that capacitors store charge but I don’t understand its purpose here. Thank you

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

      Filtering the peaks and lows, its a common practice to use ceramic 1pico farads caps in the power part of appliances. As you said they also hold a charge so any appliance electric, electronic need to have their capacitors shorted with an insulated screwdriver. Once in my life i serviced a 1000 watts PC power supply and i didnt empty the caps (massive ones) because i was on the phone while pulling the pcb out. i touch traces one with each hand under the pcb and i swear the discharge i took made me stutter on the phone and probably almost killed me. very often for filtering we/they use non-polar caps like these ceramic ones. im not sure electrolytic could do the job since the negative lead cannot take a leak without blowing the cap

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

    I have STM32F103C8T6, and don’t know how to use it 5V devices. For example HC-SR04. Can you help me?

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

    this is awesome

  • @DomiTheDomDom
    @DomiTheDomDom 8 ปีที่แล้ว +7

    In case anyone here is having trouble with a STM32 and ST-Link V2 (using SWD) after this tutorial. It took me forever to get mine to work after watching this. This tutorial says that you don't need to connect VDDA and VSSA since you do not use the analog pins. This is not true for at least some chips and has been causing my issues.
    I simply connected VDDA to 3.3V and VSSA to GND, I know it's analog ground and so it should be connected differently, but I just wanted to try and see if flashing was working this way after reading about this on some forum. This actually fixed it for me and was necessary to get my STM32F103RBT6 working with any of my JTAGs (ULink2, JLink2, ST-Link v2).
    And I thought I killed 4 of these chips soldering them....:(
    Like I said, I think this is only the case with some chips as this tutorial says you don't have to do it and I have no doubt that this guy knows what he's talking about. I'm pretty sure it says it somewhere in the datasheet.
    If any of this Information is at all wrong please let me know. I don't want to mislead anyone here as I'm not an expert on this topic.
    Still a very helpful video.
    Thank you.

    • @matthewhooker2398
      @matthewhooker2398 7 ปีที่แล้ว

      I'm so glad you mentioned this.

    • @PatrickHoodDaniel
      @PatrickHoodDaniel  7 ปีที่แล้ว +1

      Sorry I just got to this question. A reply to this question led me here. It is a very good idea to connect those pins. I don't just because I haven't needed to , but the datasheet for my chip states that it must be connected. I have only used those pins when I started doing my ADC coding. Thanks for the tip.

    • @PatrickHoodDaniel
      @PatrickHoodDaniel  7 ปีที่แล้ว

      Me too.

  • @carlosalbert7667
    @carlosalbert7667 9 หลายเดือนก่อน +1

    Why is power needed in all 3 pins? Is this necessary? Might be explained in ST datasheet..

    • @PatrickHoodDaniel
      @PatrickHoodDaniel  8 หลายเดือนก่อน

      The datasheet does talk about this requirement and what internal features use these power pins. For instance, the ADC power also powers the higher speeds of the chip.

  • @traveladventure427
    @traveladventure427 8 ปีที่แล้ว

    Hello! Please help. I have a stm32f100c8 MCU. For programming with ST-link-V2 must be connected with pin 34 TMS SWDIO, then 37 pin TCK to SWCLK, then all conclusions and ground all power pins + to connect at 3, 7 volts. And also to SWDIO and SWCLK to connect the resistors, respectively. Or please tell me where you can read about it. Thank you.

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

    There are no pull-up/down resistors on the SWCLK/SWDIO pins in the STM32-Nucleo schematic.
    Are you sure these are absolutely necessary?
    Also, you didn't say what value resistor used there?
    I'm assuming a 4k7 or even 10k will do the trick?

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

      Not necessary. You will see that I don't use them later on. Thanks for this clarification.

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

      @@PatrickHoodDaniel Thanks for the response.
      I saw something in the datasheet about internal/embedded pull-up/downs in the MCU, but then it does recommend a 100K pull-up on the SWDIO.

  • @redberries8039
    @redberries8039 6 ปีที่แล้ว +1

    Why are those capacitors being added and where should I look to find out more about that sort of thing? thanks

    • @redberries8039
      @redberries8039 6 ปีที่แล้ว

      ...and the resistors ...I guess I need a good practical book to refer too? ...??

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

      Is to remove the noise in the power line, we want to inject clean noise. Is called "decoupling capacitor" google that and you should get a good explanation. Is also called a bypass capacitor.

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

      Regarding the capacitors, using STM32F030 series chips as an example, download the datasheet for the chip (e.g. STM32F030R8) and search for "Power Supply Scheme". In the case of STM32F030, you should find something like this: "Each power supply pair (VDD/VSS, VDDA/VSSA etc.) must be decoupled with filtering ceramic
      capacitors as shown above. These capacitors must be placed as close as possible to, or below, the appropriate pins on the underside of the PCB to ensure the good functionality of the device." That doesn't really educate us on the fundamentals, but it gives guidance on using the capacitors for that specific chip.

  • @kursadturkmenoglu9593
    @kursadturkmenoglu9593 6 ปีที่แล้ว +7

    I dont believe man, people are watching stupid game videos and this video is watched only 71000 :/ excellant work

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

      Mr Bozkurt this world may be ruled by the few that educate themselves.

  • @karastom2304
    @karastom2304 8 ปีที่แล้ว

    Thanks so much, very good explanation, I have question about STNRG and STULX is there is some videos can help me to get start using STNRG and STULX.

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

    GREAT TUTORIAL!

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

    Can we use st link for all kinds of arm Microcontroller, as a arm programmer.

  • @mikelemon5109
    @mikelemon5109 8 ปีที่แล้ว +3

    Why would you connect power to all ports? isn't just one enough to power the whole chip?

    • @carlosalbert7667
      @carlosalbert7667 9 หลายเดือนก่อน

      Wondering exactly the same..

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

    I tried this process on several stm32f405rgt6 chips. Added the capacitors to vdd and vss pins and pull down pull ups to the swd sck pins. I still get an error when I try to connect the st-link. Any ideas why this is happening? BTW I tried pulling down reset and still no luck. I'd greatly appreciate your help.

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

      Another comment mentioned not connecting the Vdda, Vssa (analog source, ground) was causing issues, which is stated in the datasheet, therefore don't leave these floating and see if it works

  • @IopsisMusic
    @IopsisMusic 8 ปีที่แล้ว

    Is there a way to program the ARM microcontroller without solder it to the STM32 board? I mean, if I want to develop a product based in the ARM architecture I suppose that I have to use one microcontroller for prototyping right? just like you do in this video, but in the moment I assemble my product, how can I program the rest of ARM microcontrollers? should I give the code to the PCBA manufacturer in order to program all the ARMs that will be built in every piece?, sorry for my English tho.

  • @ivane.1763
    @ivane.1763 2 ปีที่แล้ว +1

    Nice video! Can I make same board and coIDE to programm STM32F103C6T6A? tnx in advace

    • @PatrickHoodDaniel
      @PatrickHoodDaniel  2 ปีที่แล้ว +1

      Yes, you can, but I would recommend using the STM32CubeIDE instead like I do in my current videos.

    • @ivane.1763
      @ivane.1763 2 ปีที่แล้ว

      @@PatrickHoodDaniel ok, thanks! :)

  • @rjjaictin847
    @rjjaictin847 6 ปีที่แล้ว

    Can you program it with a ftdi breakout?

  • @amtpdb1
    @amtpdb1 9 ปีที่แล้ว

    Where do you find the information to tell you that the value of the needed resistor is 22 ohms and what points you to the value of the capacitors that you used?
    Thanks for the video.

    • @PatrickHoodDaniel
      @PatrickHoodDaniel  9 ปีที่แล้ว

      I use the existing schematics for stmicro boards to determine the resistor values and the need for them. The capacitor values and use is from the development of many projects and general electronics education.

    • @amtpdb1
      @amtpdb1 9 ปีที่แล้ว

      +Patrick Hood-Daniel Thanks for the information and taking the time to answer.
      Have a nice day.

  • @temirkhanamanbaev42
    @temirkhanamanbaev42 9 ปีที่แล้ว

    Thanks man, cool video. WAITING!!!

    • @PatrickHoodDaniel
      @PatrickHoodDaniel  9 ปีที่แล้ว

      +Temirkhan Amanbaev Thanks. working on the next one currently.

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

    why did you choose pin 37 ?

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

    if anyone is reading my comment what is the value of the resistors, please?

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

      Hey Hosam, Here is an easy way to determine the value of the resistor without needing to memorize the color codes. www.digikey.com/en/resources/conversion-calculators/conversion-calculator-resistor-color-code-4-band

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

      @@PatrickHoodDaniel thanks a lot

  • @montassargh2840
    @montassargh2840 9 ปีที่แล้ว

    Thank you !! I've been waiting for similar video for a while :D thumbs up (y)

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

    Really Great Work, many thanks. Can this basic circuit work for the STM32F4 (cortex M4) chips?

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

    I'm interested in following your videos using M4 microcontroller. I'd like to make my own board but I'm curious to know how you soldered the micro on the PCB.

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

      I know im late but you can draw the schematics of your design using an electronics CAD like Altium designer and then send them to a company which actually creates your board and sends it back to you. You can even choose the color of your PCB

  • @electronelectron618
    @electronelectron618 7 ปีที่แล้ว +1

    how are you ?
    and thank you for these valuable tutorials .
    where can I buy the breakout board used in this course to follow this course?

    • @PatrickHoodDaniel
      @PatrickHoodDaniel  7 ปีที่แล้ว

      Thanks for the kind words. You can find all of the required components for this course here: newbiehack.com/Categories/ARM

    • @electronelectron618
      @electronelectron618 7 ปีที่แล้ว

      great thanks i will order from the web site thank again.
      Patrick i would like to support and continue in this series but i
      would like to know are you going to continue in this series and will you
      talk about advanced interfacing like acelerometer and wifi module etc..
      with the arm and topics like interrupts

    • @PatrickHoodDaniel
      @PatrickHoodDaniel  7 ปีที่แล้ว

      Thanks for the question. I just replied to that question on the other video. Let me know if you have any further questions.

  • @sannymunn1471
    @sannymunn1471 8 ปีที่แล้ว

    I am pretty new to electronics, is it possible to use ST-link v2 for arm cortex a35?

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

    thx for this video!! where can i buy a board like urs ??

  • @yungnut4247
    @yungnut4247 6 ปีที่แล้ว +1

    Do you really have to wire all of the VSS and VDD pins? I would imagine that they are connected inside of the chip. Or are they not? I have a feeling they are just in different places for convenience on the PCB.

    • @PatrickHoodDaniel
      @PatrickHoodDaniel  6 ปีที่แล้ว +1

      Yes, but so you can have the experience of what happens, try not wiring the VSS and VDD pins and post the results here.

    • @yungnut4247
      @yungnut4247 6 ปีที่แล้ว

      Well i know you have to wire at least one of them, but are all necessary?x
      Edit: I don't actually have any of this stuff (yet), I was just looking through some tutorials and was wondering how they were used. I'm used to ATMEL microcontrollers, like the ATTINY85 and the ATMEGA32P.

    • @PatrickHoodDaniel
      @PatrickHoodDaniel  6 ปีที่แล้ว

      YungNut yes. All of them need to be connected. Not sure why. You should get going on it. ARM chips are great.

    • @yungnut4247
      @yungnut4247 6 ปีที่แล้ว

      Yeah its just expensive and hard to get into, the chips themselves are cheap, but everything you need adds up fast

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

    Im noob So i need to Ask about something.
    Why do you Put this resistors and capacitors?
    Maybe it Will be explained later but for now will it not work with out it?
    Thanks for any answers!

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

      Bcos ,the MCU cannot work alone by just connecting supply and ground(negative), it needs to be filtered , so a cap is used, basically if you search for the processor's datasheet, they ask you to wire up those caps and resistors to actually make it work (better).

  • @SkGow
    @SkGow 9 ปีที่แล้ว

    Hi Patrick Hood-Daniel. I've basic knowledge of Electronics. Do you suggest me to start learning Embedded Programming and Development with the above mentioned microcontroller.? I don't have any experience on Embedded systems.
    Great video, by the way .

    • @PatrickHoodDaniel
      @PatrickHoodDaniel  9 ปีที่แล้ว

      +Sk. Gow This is a great place to start. I explain the topic in detain and in very simple terms. I really suggest watching the AVR series first if you are new to the subject and get the kit at NewbieHack.com so you can follow along.

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

    that skull logo is awesome. you got stickers? I think i'm getting a shirt.

  • @morrisssss
    @morrisssss 8 ปีที่แล้ว

    Thanks for the video! Regarding the 22ohmns resistors, i dont see why you pulled down, because as far as i see in the ST-LINK schematic, the resistors are in serie between SWDIO/SWCLK and uC pins. It seems like the seristors are for current limmiter or current protecction.So could you please tell us exactly what are they for?. Anyway, great video and gj!!

    • @PatrickHoodDaniel
      @PatrickHoodDaniel  8 ปีที่แล้ว

      Alex _ you are correct, you'll see in later videos that I do not use the resistors.

  • @Ghostpalace
    @Ghostpalace 8 ปีที่แล้ว

    excellent videl!

  • @traveladventure427
    @traveladventure427 8 ปีที่แล้ว

    You connect a resistance of 22 ohms. Maybe it's a small value, probably need more value to connect.

    • @Jeff-sm8of
      @Jeff-sm8of 5 ปีที่แล้ว

      Is the 27 ohm value of the 2 resistors correct?

  • @Electromaniaworld
    @Electromaniaworld 7 ปีที่แล้ว

    thanks nice tutorial.

  • @exclusive-technology3798
    @exclusive-technology3798 9 ปีที่แล้ว

    This guy is soooo good... if his sister is too young... I want to date his mother... or take her dancing at least... We must learn to give back... in our own ways... :) got to get back to my breakout boards....

    • @putinscat1208
      @putinscat1208 8 ปีที่แล้ว

      +Exclusive - Technology Creepy.

    • @exclusive-technology3798
      @exclusive-technology3798 8 ปีที่แล้ว

      +Putins Cat thanks for sharing...

    • @exclusive-technology3798
      @exclusive-technology3798 8 ปีที่แล้ว

      +Putins Cat should probably spend time watching the video tutorial and taking the class... not commenting on others sharing some appreciation while learning development... Made me smile though... nothing is quite as creepy as the Puttins Cat channel on You Tube... :) got to be a lonely life... :) get yourself a puppy... much more interpersonal interaction... love and attention....

    • @exclusive-technology3798
      @exclusive-technology3798 8 ปีที่แล้ว

      +Putins Cat seems you are starving for... either attention or affection... a cat will give you neither... you know... aloof... independent... standoffish... like dating an Asian woman... Not thinking I'm interested in what you think... but hey... if you are lookin for a pimp... probably lots of on line outcall services in your area.... remember.. put a cap on it...

    • @putinscat1208
      @putinscat1208 8 ปีที่แล้ว

      Exclusive - Technology Me?? You want to reward an electronics video by dating the guy's sister or mother. Like you are some stud that can give them some pleasure as a reward for the tutorial. I'll bet you think any woman that smiles at you in Burger King or JCPenneys wants to blow you, right? Talk about starving....

  • @flyjim99
    @flyjim99 7 ปีที่แล้ว

    Such a shame the programming has to be jumble-jumped in order to program the device.

  • @teoyutube1812
    @teoyutube1812 8 ปีที่แล้ว +1

    what

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

    takes too long, dont explain every step 100 times please

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

      Sorry about that. I will try no to repeat the steps next time.