Timer Basics with STM32

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments

Source code from this video is available at: https://github.com/1sand0s-git/QuartzArc_STM32F411RE_Nucleo64

👍︎︎ 1 👤︎︎ u/SittingWaves 📅︎︎ Oct 21 2021 🗫︎ replies
Captions
hey welcome to ones and zeros my name is ben and in this video we're going to be taking a bit of a look at one of the uses that there is for the timer peripheral in stm32 devices so i'm going to be doing a set of different videos where we look at some of the different ways that timers can be used because they are pretty flexible peripherals today in this video we're going to be looking at using the update interrupt request for timers so that we can use a timer to trigger a specific set of instructions or a bit of code to run at a particular interval and going to be doing it so that we can either get it to run continuously if we want it to be something that's always running or if we want it to say run four or five times or ten times or something like that and then stop then we'll be able to do that as well and much like we've been doing with a lot of our videos we'll be doing it as a class so that we can actually reuse that class for multiple different timers and this is kind of following on from our previous stream which i finished about an hour ago where we actually created a dynamic timer manager class which is able to keep track of what timers are actually in use and what they're being used for whether they're available what features they support all that sort of stuff so i'd recommend checking that one out because we will be using some of that stuff in this video and much like um our previous couple of stm32 basics videos the code from this video will be available on github shortly after the stream is finished as well so i'll make sure to drop a link with the video there so let's jump into it we're going to be using our f411 nucleo device for this one as well and this particular device has eight timers so we're going to be seeing how we can leverage those in different ways over the coming videos so there's eight timers as i mentioned there's two 32-bit timers um the other six or 16-bit timers five of the different timers have encoder support which we're going to be taking a look at in the next video but let's get stuck into some code and we will see how we can use the timer update interrupt to make some things happen in this video so all of this code again following on from the previous stream which is also the same code that we use to do the external interrupts video as well so kind of adding to that as we go so you can see all of the stuff we've added to it so far and add a header file and a source file for our driver for our update irq and just going to call this one q8e timer this is kind of the what i think is the most basic use for a timer for these devices copy and paste our header for that one and get that one fixed up so a few different things that we're going to be looking at with timers over the coming videos so the using encoders will be the next one that we come out with i believe it's now the 19th came the 19th about 20 minutes ago at least here where i'm in australia anyway so um so yeah the next one will be encoders and then we're also going to be doing one following that on pulse width modulation there will be a few other different ones that will be coming out in future with timers as well we'll also be making use of the timers in our adc video which will be coming out probably after the pulse width modulation one where we'll be using the timers to trigger the analog to digital conversions at a regular interval so they'll be making use of the timer manager that we did in the last stream as well so let's get now make sure i've got all of that right let's get our cpp file sorted while we're here get rid of this guy we want to include our q a timer hpp and we'll get rid of this bit here as well all right now we are going to just pop in an enum first up so that we can keep track of what mode the timer is in whether we want it to run continuously or a set number of times so let's call that timer mode and timer continuous or timer brain's not working i might just call that multiple we might add one to single as well just if we want it just to happen once and let's get our q a timer class set up in here third stream for the evening my uh brain is not working as well as it was the previous couple get a bit more coffee happening that will sort that problem out also going to want an initialization structure for this as well so let's pop that in there i'll type that struct and qe timer and struct like so now let's get enum in here as well which you may have seen me use in previous videos just so that we can set it up to either to a partial or a full d initialization so that if we get part way through the initialization of the peripheral and it fails part way then we will only partially de-initialize it otherwise we will tell it that we want to do a full de-initialization so that's what we're going to use that for we're going to pop in which timer we're actually going to be using so we can keep track of that and for that one i'm also going to need to include our timer manager in here as well it's all of that stuff from the last stream we've got the different timers for our f4 device in there so that we can tell it which one we want to be using so i've got that guy there we also want a handle for that one we want to keep track of what mode it's in whether it's in continuous multiple or single we want to keep track of what the prescaler is for that one and the period and we'll use a uint32t for those to allow us to either use a 32-bit or 16-bit timer that way it's going to work fine for both store what now my rq priority is going to be for our update iq i want to keep track of whether or not where have initialized this one or not and whether or not it is actually active i believe we have already popped those into setup yep kill and then we've also added a couple of other results into here into our setup during the last stream just so that we can return whether or not the peripherals busy so that if we try to set up two timers so set up say timer two and then we try and set up timer two again it can return saying that the peripheral is busy and then we've also added one for peripheral not supported so in a situation where say in the next stream where we are going to use encoders if we try to set up an encoder using a timer that doesn't have encoder support then it'll be able to return the specific error for that one as well and as i mentioned in the last stream we will be adding to that as we go as well different errors and things so that when we get to the point where we're actually doing a particular error manager so that we can handle you know failures and things like that nice and gracefully we'll have that ready to go as well now we're going to use the callback function and callback class much as we did for our external interrupt video just to give us a bit of flexibility as to whether we want to use just a standalone function or a class and the benefit of the class is that we can use it as a class that we can inherit from so we can embed that as part of another class and then be able to call that the handler function in that class at the point where the timer update is actually triggered which is something that we will make use of moving forward as well and lastly we're going to keep track of for our multiple our multiple mode how many times we want it to trigger before it stops so we'll have our target amount that we want there as well as where it is actually up to with that which will be our counter value so that's those guys now in our init struct a few of these in here as well so we're going to need our what our peripheral is what mode we want to use what our prescaler and our period is and we'll also pop our priority in there as well we might also [Music] pop our counter target in there as well so that we can supply that all in one go like that now because we're going to want to supply that initialization structure to the class when it gets constructed we are going to remove our default constructor so this q80 timer equals delete and then i'm going to create a constructor that receives a reference to our init structure and go through and do our member initializer list so the s in it in timer got ms handle just fill that guy with zeros now m e mode that will come from our inner structure we want our prescaler which also comes from our inner structure period now irq priority it's always good to do the initializer list in the same order as we've declared the variables in the class as well just because it does help when you come back to it at a later date so m e init state will be qa not initialized m e active state will be qa inactive now i'm not going to set our irq in there however we will do our handlers which should be null now counter target which will come from our init structure i might rename that in the infrastructure because that should be target rather than value like so and lastly we'll do our counter value which will set to zero initially and that should be all we need there looks like the stream is behaving itself which is always good and we're also going to pop a destructor in here so that it stops and de-initializes the timer in the case where we destroy the class so let's pop these in because i know what i'm going to call the functions for those anyway which will be stop actually that'll be let's rename this one i'm just going to call this state mix that up here and for the particular use that we're going to use the timer for in this instance there's two main bits of data that we need for the timer peripheral which is the prescaler and the period so in the case of the eight timers in this particular device uh they're all going to be running at 100 megahertz so the four of the timers are connected to apb2 or the peripheral bus 2 which is running at 100 megahertz so they get their clock directly from that the other four are running off peripheral bus one or apb1 um which is running at 50 megahertz however that 50 megahertz is being clock doubled and then being supplied to those four timers so effectively all four all eight timers regardless of which bus they're on are getting a hundred megahertz clock with the way we've set the clocks up in this case um we did talk about that a little more in the previous stream but going back to our prescaler and our period so the prescaler determines how how much it scales that 100 megahertz clock by in order to trigger each count of the timer so the timer is basically just a counter that can count up or down [Music] so if we had a prescaler of four then effectively it's going to supply the counterpart of the timer with 25 megahertz rather than 100 so it's basically taking the clock and dividing it by the number in the prescaler so our period is then say if we had a period of a thousand then once our timer counter gets to that thousand then it's going to trigger our update interrupt it also will then [Music] reload the counter from the auto reload register um in this case we're just going to basically get it to reload from zero start counting up again and then once it reaches the period value again it'll then trigger another update and keep going so that's kind of how that works and we'll get to see that in action as well so let's pop in some initialization methods for this one so [Music] it's going to return a qa result for that one so that we can find out whether it succeeded or not and also put in a d in it method for that we're going to want a handler method which will be called by the interrupt when it gets triggered and it will then depending on what we've supplied for the handler function and handler class it'll then call those guys as needed if we want some control methods might just put the space in there so we can scroll a bit better so for these ones we're going to have a few so firstly we want to be able to set what our handler function is which we will be passing a q handler callback function which is a pointer to the function as we've defined in our setup file and this one will be appointed to a callback class i'm also going to want to be able to update the timer mode so although we will be supplying it with the particular timer mode we want when we hand it the init structure if we want to change that without having to de-initialize or things like that then or destroy and recreate the class then we can use this method to do that one and also pop one in so we can actually retrieve that as well and don't need to pass anything to that one these won't be returning anything which is why we're getting the underline on those we want to be able to set our counter target again even though we're supplying that when we give it the initialization structure if we want to be able to change that without destroying and recreating the class then we can use this method for that and we'll also pop one in to be able to retrieve that as well don't need to pass that one anything we might also make one so that we can retrieve what the current irq counter value is and might make one so that we can actually clear the iq counter value as well so just kind of thinking ahead to the ways in which i may want to actually use it not super stressed if we don't end up using certain features because if the compiler sees they're not being used it's not going to bother putting that code in there anyway so it's not really going to add overhead for that i'm also going to make a couple of private initialization methods and it'll make a little bit of sense why we're doing that as we start to get the code written for all of these methods sort of a bit of a common approach to this i believe we did did it this way for the external interrupts as well and may have also done it this way for some of the stuff in the videos in the discovering stm32 series as well which we'll have another video coming out for that one in the next couple of days um also have the encoder video i think coming up on the same day as that one so get those two done at the same time so let's get these guys popped into here also grab these ones pop those into here as well and let's fix the indents on those first up didn't spell that right there we go mix that over here as well all right well we're here copy and paste that and we'll go through pop these in here so that it knows what these methods belong to need to pop that one in there for timer mode as well because that belongs to the actually no that doesn't belong to the class that was declared outside of the class that's fine put one in there there that one there that one there and we need one for d unit one all right just make sure all of this is nice and consistent with how we've been doing it so it makes it easy to read the code across the board i'll even change the name of that one just so it makes a bit more sense you all of those in there pop a few spaces down there so that we can scroll a little bit easier these are private initialization methods get the names in there do that for the rest of them and then we can pop some code in there valley that one there definitely the most exciting part of the whole stream but a little bit of time and neatness now definitely makes life easier later on so three more to go then we can actually get some code in here and start to have a bit of fun with it and done and just refuel programming without coffee is no fun all right so for our initialization this is where we're going to start to make use of the timer manager that we did in the previous stream so security timer manager and we're accessing it this way because of the fact that we made it a singleton class so firstly we want to find out if the timer that we want to use is actually being used or not already so basically asking the timer manager whether the timer that we want to use is busy or not if it is then we will return a qa error proof busy if it's not being used then we want to go ahead and register it so that the timer manager knows that we want to actually use it and then we're also passing it the we're going to highlight that correctly um we want to tell the timer manager what we're actually using it for so we're going to tell it that it's in use and that we're using it just as an update interrupt timer so next we're going to store the result from our peripheral initialization method the reason for that is so that if it fails then we can then tell the timer manager that we no longer need it because if it doesn't initialize properly then something else can potentially come along and use it or you can then try and redo it or depending on how we approach that once we go to actually start using them and then for our de-initialization we're first going to check if it's not initialized already then we don't really want to de-initialize it so to do that if it is initialized then we will call periphery in it and we'll tell it that we want to do a full de-initialization of that and once that's done we can let the timer manager know that we no longer need that timer like so that's those two out of the right next up we've got our interrupt handler which will be called from our handlers file so first we want to check our flags and it's quite important for the timers as well because some of the timers on this particular device do share interrupts so timer 1 shares interrupts with timers 9 10 and 11 in various ways which we went through in the previous stream so let's check if the interrupt or the update flag has been set if it has then we want to process that interrupt and then depending on which mode it's in whether we want it to happen continuously or if we just want it to happen multiple times or just a single time we need to follow the relevance thing there now we because we've got three members for the enum for the mode we need to supply a case for all three of them so in the case of continuous we're not actually going to do anything in this situation because we're just going to let it run but we are still putting a case in the switch statement for that just because it will keep the compiler happy so in the case where we got it in multiple modes we will first increment the irq counter value and then we're going to check if the counter value is greater than or equal to our target then we will go through and actually stop the timer at that point so that it just gives us the particular amount of interrupts that we want from it we might also go through and reset the counter value at that point as well we might actually do that in the stop method rather than popping it in there and that's kind of all we're going to need to do for that case and then in the case where we have type single we're just going to call stop because we only want it to happen the once and then we'll do a break for that one so that's the switch statement done and then we're also going to want to call our either our handler function or our handler class depending on which ones are set up so either one or both so if mp handler function so if it's not null effectively then we'll go ahead and call that one and we're not going to be passing anything to that one at the moment and same thing for our class if the class isn't null then we're going to call the handler method of that class and then finally we need to clear our update flag so that the time if we don't do that effectively we'll exit the irq handler and it's going to call it again straight away because the flag's still set so need to make sure that we actually clear that one like so let's see our handler method done these guys are fairly simple so we're just going to go mp handler function equals p handler and same for this one will be mp handler class was p handler a few more nice simple ones because we're basically just setting or getting values which is always good get these guys out of the road fairly easily so that will be m e mode equals e mode and that will be return m e mode might actually rename that i don't like that should be you target because that's effectively what we're setting there make a bit more sense that way that's better all right so for this one we're just going to be returning muirq counter value and this one we just want to clear the irq counter value so make your counter value equal to zero now start and stop methods so in this case we first want to check that the timer is initialized and that it's not already started just do it that way like so all right so [Music] reset the counter value whenever we call start that kind of makes sense and then we want to enable the interrupt which will be the update interrupt and we also want to enable the timer itself and just pass up the handle for that one and then lastly let it know that it is now active in the case of stopping it similar thing so we want to check that it is initialized and that it is active all right in this case we want to disable the timer and disable the interrupts like so and also set our state to inactive all right now for the fun ones so first thing we're going to want to do when we go to initialize it is enable the timer clock and we created a method to do that in the timer manager during the last stream so that one will be ready timer manager enable clock and we'll let it know what timer we want to enable the clock for and then we've got to initialize the timer peripheral itself there's a few bits we've got to supply it for that first of which will be what instance which timer specifically we're actually doing and we can retrieve that from the timer manager as well so we'll go get instance supply it with the enum for our peripheral and set our prescaler which will determine how quickly the counter in the timer counts so now counter mode so i'm just going to do a simple up counter for this one because we're basically just getting it to trigger the update interrupt whenever it reaches the period value you can also do down counting and then there's also up and down counting as well where it counts up gets to the period value and then counts back down to zero so there's a few different modes it can be used in there and the cool thing with the timers is they don't necessarily have to be using the clock to actually trigger them so in the case of when we're during the next stream when we do encoders it's actually using the quadrature signal from the encoder to drive the counter which is kind of cool um so we want to supply it with the periods a clock division which is not going to do too much in this case anyway but we'll set that just to be consistent let's tell it div one for that one make sure all of that's nice and neat we want our repetition counter i'm just going to set that to zero kind of drives me nuts when these guys aren't all lined up i can't help myself with that i do like code to look relatively neat and have a thing for that and we just tell it that we want to enable preload for the auto reload register and then we'll go ahead and get that initialized so we're just going to pass at the handle and that one which has our instance and all the information that we've just supplied and then if that doesn't return okay then we want to perform a partial d in it and then we're going to return qa fail if that's the case so that we know that the initialization hasn't worked losing my voice um we want to go ahead and set up the irq so firstly we need to retrieve from our timer manager what irq is associated with the this particular timer for its update irq again just tell it what time we want to retrieve that for we want to set the priority for that interrupt which we have stored in irq priority i believe we call it where are we yep new irq priority and we want to enable that by our cue like so now we also want to make sure that we set our state so at this point it's initialized but it's inactive we'll stay inactive until we call start but its initialization state is initialized at this point and then if we get to this point everything's worked so we can return qa okay now for our d initialization it's a little bit simpler so if the mode that help ever spell that correctly and don't put bits where i don't need them so if we're doing a full de-initialization then we will also need to disable our irq and d initialize our timer and this is this is why we tell it whether or not we're doing a full or a partial d in it so if we've gotten to this point in the initialization we've turned on enabled the clock but we haven't actually successfully initialized the timer base or done the irq so if we're doing a partial de-initialization we don't need to disable the irq and we don't need to de-initialize the timer peripheral whereas if we're doing a full de-initialization so it's initialized we've used it and then we're de-initializing it then we want to make sure we do those things which is why we use this dna mode enum that we've created just make sure that everything stays nice and neat and we don't end up with bits and pieces left over where we don't want them might help if i put the brackets in the right spots so at this point we want to disable the timer clock and again that's something that we can ask the timer manager to do so that will be disable clock tell it which timer we want to disable the clock for and then finally we want to set our states so that we know that we're inactive and that we're no longer initialized the reason why we do that is because we may be in a situation where we want to create the class initialize the timer use it de-initialize it but not destroy the class yet because we might want to then reinitialize the timer at a later date so say for example if we're in a situation where we want to use that same timer temporarily for something else then we can disable or de-initialize it for this particular class then re-initialize it to do something else say to do pwm or an encoder or something temporarily de-initialize that and then come back and re-initialize this particular class so that we can then use that timer for this purpose again so it just provides that extra bit of flexibility and part of the reason why we actually went through in the last stream and created a dynamic timer manager in the first place so that way over the course of a particular bit of code running on the microcontroller we can chop and change things as much as we like which is something that you can't really do when things are hard-coded and considering that the timer manager doesn't really add that much overhead to [Music] things in the first place it's i think it's worth doing it that way especially because what we want to be able to do with all of this code as we move forward for all of the devices is to be able to basically develop a cut down os for all of them so in the sense of an os things need to be done a little bit more dynamically so that different tasks can ask for access to different resources and peripherals and things like that as as needed as the os is running rather than it being hard-coded just to do a specific job so that's all of the code that we need for that let's make sure that builds and then let's see what this does always got to be at least one error 14. that's a pretty good effort where do we have errors some left over from the last stream spelling error there spelling error there too somewhere oh qad should be beautiful what do we got going on in here that should be an s in there that's better didn't actually build this code during the last stream which is why we're getting a bunch of errors now but it's always fun um qe timer unused missed that one there for that too ms should be an s there making the same mistakes all over the place it's brilliant um okay pop a break in there just to keep the compiler happy and it's going to want me to do that down here as well and that's all of those what do we got going on in here two arrows now get rid of the r there and where we got here missing a zero for that one mr return statement somewhere which files that in so now timer manager hpp that should be returning at value so the only warning beautiful zero error zero warnings let's try this out we've still got our external interrupt stuff in there from a couple of streams ago i'll leave that in there for the moment we are going to firstly include q80 timer.hpp might be helpful and qd timer and we'll just call this timer test also going to want to supply it with the callback method and we're going to do the same thing in here as we did with our external interrupt handler except we'll just put timer triggered so that we know okay awesome then we can come down and get this guy set up okay pop that in here so we'll timer test actually we're going to need to fill out an in its structure first so we will want qra timer and let's call it timer test unit and we'll need to let it know which timer we want to use we might just use uh timer 2 for this one doesn't really matter which one we pick for this but timer 2 sounds good and it is one of the 32 bit timers so we want to let it know what mode we want let's try it with our continuous mode firstly i'll just pop this guy over here so we can sort of see both things at the same time excellent we want our prescaler and you might make our prescaler for this one a hundred thousand which means that each counter tick of the timer given that it's uh one megahertz 100 megahertz clock so that's going to divide it down to should be a thousand ticks per second if the timer is counting up a thousand increments a second and we set our period to 1000 then that means that our update interrupt should trigger once every second um to note here if we were to use one of the 16 bit timers we wouldn't be able to give it a value of a hundred thousand because the highest number that we can fit into sixteen bits is sixty-five thousand five hundred and thirty-five um so that would need to be taken into account so in that case i would potentially put say 20 000 in as the prescaler and 5000 as the period which would still give us a one second update with the the main difference being that it's going to then update a count up 5 000 times a second instead of the 100 thousand that would know that the one thousand that we're doing now coffee is running out brains falling asleep okay our irq priority doesn't matter all that much for the moment we'll go somewhere in between the zero and 15. so let's just go with let's go with nine which sounds good and then last but not least we will set our counter target as well because once we make sure it works continuously we'll try out the multiple mode as well so let's pop six in there for that one just a random number and let's go timer test equals new qa timer timer test in it like so and then we're also going to need to initialize that one pop that guy back there give us a bit more space to move so let's go if timer test in it so if it returns an error it'll be true if it returns okay it'll be false because of how we got the set the enum set up so qaok is zero whereas any of the errors are one or above so if it fails then we will turn on i believe we've got it's where our split view comes in handy where are we okay this gpio user led so we'll turn our user led on if that's if it fails like so we'll also [Music] use our serial to output an error and if we get to that point we'll chuck it into an infinite infinite loop so it doesn't continue whereas if it succeeds also want a message sent out to serial so let us know and then if it succeeded then we will also go ahead and get that one started now just about ready for that to be tested but we also need to hook up our interrupt handler as well with the last thing that we need to do that so let's jump into our handlers files and this will be timer 2 irq handler copy that one save that pop this into here and this will also need access to our timer file and also to our class so that it can call the handler for that one like so make sure that all of that builds okay wonderful all right so let's get that popped over onto our nuclear device never a fan of that particular error okay let's have a look at what's going on there typically the way i would solve this particular issue is by restarting the computer however i don't really want to do that during the same stream where i want to actually demonstrate what it should be doing so okay why don't we come back to that one and that wasn't what i wanted let's see if we can get around that by jumping into our release config still going to give us the same error you all right plan b let's just get rid of that get rid of that also get rid of that see if that will give us a bit better lock how about that i bet it was the antivirus thank you to the person that popped that on the st oh no it's on stack overflow so biz hoy on stack overflow with that one came in for the win wonderful love it would have annoyed me if i couldn't demonstrate this during the same stream and had to restart the computer so i learned something and we'll remember that for next time so anyone who comes across that particular error you can either restart your computer which is what i would do normally and generally it would work fine after that however if you're running antivirus get rid of it get rid of anything else that you're running that you don't need to be running and it should potentially work at that point now let's just reset this guy so our time is initializing correctly now external interrupt is still working but we're not getting our time interrupt triggering so let's figure out why that is so that is correct pretty sure that is the name it definitely needs to have time to iq handler test handler so we're calling that one correctly and we are getting flashing led so we know it's not getting stuck inside a handler we're not getting stuck inside the interrupt because we know that we can still trigger the external interrupt which has a higher priority i believe which it does because we've set a as we're using the same priority as our uart which we might decrease the priority on that one i don't think that's why it's happening though let's have a look in here we know that we're initializing properly so all of that's going to be occurring correctly so a couple of things to check i want to check if we're actually getting to that point and pop a break point in there as well so we'll go in and we'll actually see how the peripherals set up at that point whether there is actually any issues occurring or anything that we've missed so i'll switch to that perspective i'll run to that break point so at this point we should be [Music] haven't actually set initialized yet got the correct irq let's check our reset and clock control let's jump forward a bit more we are actually getting to our handler so this actually is actually being triggered so let's just step through this okay it's doing that correctly what's our aha we did skip something and i think i'm almost getting really good in these videos of making silly mistakes but again you get to see how the debugger works so i don't necessarily see that as a bad thing um what do we call a timer test handler we're not actually setting our handler which definitely is a helpful thing to be doing so set that one in there we will remove those break points we popped in there break points and the debugger super useful along with printing stuff to serial so that we can see what's going on also useful user led is also super useful uses many debugging tools to find out why something's misbehaving as possible because it will definitely make life a lot easier for you so let's dump that onto the device i'm assuming that will compile fine because we didn't change much and we have it triggering seems slightly fast for what we want though let's change that to 2000 and see what that does just clear that it's too fast still that's half a second random let's try that if we were getting half a second this should give us one second okay what we might do let's change this to twenty thousand and we'll change that to five thousand so i'm wondering if it's an issue with 16-bit value with a timer not operating in 32-bit mode or something like that which it is so for some reason it was not letting us use a hundred thousand in here so it was overflowing a 16 bit value somewhere which is funny because timer two is a 32-bit timer we'll go with that for the moment but that gives me something to investigate a little bit later let's try our multiple mode we'll make sure that works and this should give us six interrupts triggered and then it should stop because we've supplied it with the counter target so we'll test that and make sure that that works correctly as well triggered six times and stopped and if we reset the device again wonderful like a charm happy with that so that is how to do update interrupts for timers as i've mentioned a couple of times the next stream for our stm32 basics will be using timers for [Music] working with rotary encoders so like these sort of things let's use this camera for that one so be hooking up these rotary encoders like so they're just the standard ones that you can get off ebay which is where i got these guys from some of them are more reliable than others um i think i got a batch of 10 of them quite a while ago and at least two or three of them were a little bit flaky sometimes they don't register which direction you're turning them incorrectly so just be aware of that if you gonna buy the cheaper ones you might get a couple of crappy ones so considering they're only like a dollar or two australian each not a bad idea to um get a handful of them i normally do that with a lot of the components so by um get a few at a time that way if one of them is a little bit faulty i don't tend to worry about it too much um after that we will be doing another stm32 basics video where we use timers for pulse width modulation as i mentioned so be hooking up some leds and getting those working um there's also an another video coming out for our discovering stm32 series as well which will be out in a couple of days where we get a bit more of the rendering code done for the lcd screen for our stm32 f7 discovery board um so plenty more videos coming out i'm hoping to get maybe two to four more videos done this week um but there is already another seven videos which i've completed the prep work for so they'll be coming out shortly and my list at the moment of potential future videos is well over a couple of hundred at this point so there's a lot of content to come and i do want to try and get regular content out with multiple videos per week so uh the no videos last week was only because i was sick it's i really want to try and get them coming out regularly so i do do quite enjoy doing it but um if you have liked this if you found it interesting definitely would love it if you followed us on twitch or liked and subscribed on youtube um if you've got any questions we'd like to ask about what we've done in this video or other videos or if you'd like us to answer questions or cover something in a bit more depth definitely leave a comment for us you can also jump jump on our subreddit which is r slash ones and zeros i do keep an eye on that one i'm also also posting their new videos and things up there as well so definitely happy for people to jump on there and ask questions um and we also have an email address if you'd prefer to do things that way which is contact.ones and zeros gmail.com which will come up in the on the end page in a moment as well and thank you so much for watching so whether it's daytime night time whatever it is where you are in the world i hope you have a wonderful day it's currently 1 30 in the morning here thanks for watching you
Info
Channel: 1s and 0s
Views: 117
Rating: undefined out of 5
Keywords: stm32, stm32f4, stm32f411, nucleo, nucleo64, discovery, timer, TIM, interrupt, irq, update, prescaler, period, c++, tutorial, project
Id: KzNffzYSheA
Channel Id: undefined
Length: 80min 22sec (4822 seconds)
Published: Mon Oct 18 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.