GPIO Register Overview

แชร์
ฝัง
  • เผยแพร่เมื่อ 25 ธ.ค. 2024

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

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

    The biggest problem for many of us is reading/understanding the data sheet (RM0008) which is not bad but then how to write a line of C code that reads or writes those configuration registers.
    Often it requires sifting through many abstraction layers/header files, finding naming conventions, trying to decypher unions & struct & pointers, etc. Also, knowing the necessary sequence of
    things like a peripheral clock must be enabled in some far-off register before the IO will work. This is great stuff!

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

      Ken Wallace I agree the manuals can be cryptic at times and procedures for proper setup are often not well documented. For this type of programming the only header file you need is the one with all the bit and register definitions. It just takes practice and patience , lots of hair pulling too to get things working. I have taken several courses most on Stm32 so I completely understand where you’re coming from. I would definitely like to do an updated series of these tutorials

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

      Ken Wallace I will admit I do find my self using Stm32 CubeMx a lot for routine tasks like setting up the clock and advanced peripherals where the “proper steps” are unclear to me. And then the rest of my code does not use the abstraction layer

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

      With the explosion of the Blue Pill, your videos are going to get a workout.

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

    Eddie, thanks a lot for these videos. They are really good and I'm telling my friends to watch then.
    It would be really nice if you could do other videos about timers (with PWM), counter, interrupts and ADC too

    • @EdwinFairchild
      @EdwinFairchild  6 ปีที่แล้ว +2

      Bruno Luiz Demarchi yeah I definitely will, keep an eye out in the coming weeks. I have blog I’m making and I’ll be posting some new content

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

      @@EdwinFairchild thanks man, I'll appreciate it a lot

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

    Never has there been more snot involved in a really useful tutorial. Hope that cold got better :-)

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

      i was in the hospital 2 times in one day with an asthma attack , it definitely was the place i was living in at the time. Now m,y breathing is a lot better albeit not perfect.

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

    16:30 After you coded the microcontroller some magnetic area or something like this can influes your microcontroller and it can make your IO 1 or 0. If you use lock register for your important pins then it will be better for your circuit.

  • @davidlavasani8637
    @davidlavasani8637 11 หลายเดือนก่อน

    Hey Eddie, finally a tutorial with a good accent, fast and clear enough to understand. Please make videos longer and don't talk slower, I like it when you speak fast.👍. Also, use the pen more. Thank you.

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

    Yes yes yes. Thank you for your effort and great style!

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

    If you are controlling a CNC machine (or other large and dangerous device), you need to be sure that it does not misbehave and kill people even if the software becomes unhinged. The ability to lock output bits is just one more layer of security to prevent these disasters. It is true that running random code is unlikely to write deadly values to a port pin, but it is unlikely times unlikely to unlock the pin and then to write a deadly value to it.

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

      I'm not sure what this is in reference to. ? I might have to rewatch this video, it's been ages.

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

      @@EdwinFairchild The STM32 port lock bits. You said you "couldn't think of a reason to lock port bits; if you don't want the bits to change, simply don't write to them." (or something close.)

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

      @@byronwatkins2591 ahhh true. And you are absolutely right there a scenarios where you would want to know the exact state of the bits and not have them change. !!!

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

    Hey, one question... On the input, how do you select between pul-up and pull-down? I see no register for that...

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

      When it is configured as input, to select pull up or down you simply set the pin high or low.

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

    When we want to make a pin output, is it needed to settings registers ODR after CRH (suppose pin 10) ? By the way Thank you :)

  • @Shubham-9996
    @Shubham-9996 3 ปีที่แล้ว +1

    Do you used HAL in this series

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

      No Hal

    • @Shubham-9996
      @Shubham-9996 3 ปีที่แล้ว

      @@EdwinFairchild ok
      Can you share video link or pdf in which d smt32 discribed from very basic
      Like what is HAL
      Option for coading , which is better
      How used it easy way
      Best and easy method to use it

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

      @@Shubham-9996 I do not use much HAL , and you can watch these videos to learn how I do it , why make a pdf or another video if this series already describes everything

    • @Shubham-9996
      @Shubham-9996 3 ปีที่แล้ว

      @@EdwinFairchild
      Oooo
      Sorry sorry
      I haven't watched yet, I am thinking that this series is high level
      I am too much freshers

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

      @@Shubham-9996 my videos are all very low level programming st the register level

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

    Where can I find this kind of datasheet? My datasheet does not include some parts in your video! Thank you

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

    Hi man, thanks for awesome explanation.
    Can you please make one vedio on clock tree.
    As i was going through that...but faced a little difficulty in understanding clock tree.

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

      Hey check my blog I did a post on that, I know its late my bad haha

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

    Eddie, first of all let me thank you for all the time and effort you are putting on these videos. I've been wanting to learn hot to program microcontrollers at a register level for quite a while now and if it had not been for your videos I'd still be lost wondering where to begin.
    I was just wondering if I could ask you a couple questions which might be kinda dumb :s
    I understand the world Lenght one can transmit can go from 8 to 9 bits, but. What happens if we want to send a string out? Something like the AT commands for a WiFi module.

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

      At commands are just multiple characters , you just send the "A" then the "T" and so on... The receiving device will now that the commands come in one letter at a time. As far as the transmitting device you just loop through your strong array start from index 0 till the end . That's it

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

      As long as any communication protocol is serial ( i2c, SPI , UART etcc) it happens 1 character at a time. The first hint should be only 1 data line. Now if you have 10 data lines then you can send 10 characters at a time that is parallel communication

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

    I think this code doesn't work anymore, maybe due to changes in new Keil version or due to some step missing. Mine doesn't blink at all, however LED is always litup and only blinks when reset button is pressed. Wonder what is the fix to this..

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

      what does your code look like? are you trying to blink using a foor loop delay? is the for loop variable a volatile type otherwise its getting optimized out for being an empty loop..

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

    how do you make this files in use libraries folder

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

    How can we do this by using proteus?I couldnt find to upload the code to the Stm32f103c8 in the proteus.

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

      ilker aykut I do not know what proteus is, I’m sorry

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

      You can make your own device, Its more trouble to know how, but also can work for you in another projects, serch on youtube

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

    Good turotial, thanks for making these videos.
    Thanks for detailed explanation... thanks a lot ...

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

    Wow this is great. Nicely done

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

    Is the website dead? Thank you BTW. I'm coming from PIC16 MCUs

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

      yeah i have not paid the website hahaha i need to find a free place to host it just to keep it up

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

    Hi. Where can i find the GPIO Library?

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

      There no gpio library, this is about learning to write your own library so you can really learn how to use the microcontroller, instead of calling a function that someone else wrote

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

      @@EdwinFairchild Now I understand what do you say.I watched the your video series.I do so.Thank you so much all of them.

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

    really good tutorials on Embedded systems

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

      You already watched this vids

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

      @@okechemmanuelokwako7730 see your life n how world is too small haha

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

    You da man Eddie!

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

    You are the best!

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

    Thank you dude!

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

    Thanks a lot dude !!!

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

    Nice video

  • @mr.sandman4782
    @mr.sandman4782 6 ปีที่แล้ว +5

    hey man i love your videos but you can't sniff that hard in your video. just a bit gross. love the videos though, please keep them coming

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

      Mr.Sandman lmfaooo true, allergies man!!! But I’ll keep that in mind, I’m hoping to make a video tomorrow but right now I’m in bed with allergies yet again

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

    Are you having a cold, I see you blowing your nose continuously

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

      this was so many years ago man, you have to go back in time and ask him

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

    for love of Jesus stop sniffing!!

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

      The purpose of telling someone in a long ago recorded video to stop sniffing is a fools errand at best. Maybe if you replay the video after your comment he stopped

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

      Yeah, go easy on the nose candy...!