First thing, as you complete your initialization is to purposefully stop the timer rate, then you
perform the required configuration and then you start looking at only the timer.
So this required an instant structure, which is still right.
So we have purposefully stop our.
Timer, OK, then I do not first worry about pre-schooler, right, so let's adjust the rule account
and then disable the auto reload.
Now we know that the timer have two modes of operation, right, normally more than an hour to reload
mode.
So first, let's just focus on a normal mode.
And to do that, we need to disable an auto mode.
And this is the function to do that.
So this just requires an instant structure, right?
So we go ahead and call this function.
OK, here we mentioned the instant structure, which is to my right.
So this basically mean that we are working in normal.
More great.
So once this is done, we go ahead and then we have a function to lower the time.
So again, the.
The deal is that we want to achieve out of a time where it is five chicken, and we already know that
since it is operating at half of the frequency that is three three three megahertz, we just need to
specify discount rate.
So we go ahead and try to look for the argument size that they except accept rates so low.
Taylor accept the value in a new digital format, right?
So you declared a new 32 variable.
So I hear you that you do.
They just need this as demo count.
OK, and this will be close to three three three three three three three three three.
So this is three three three megahertz cross.
Five.
So this is the count that you need to add for achieving a delay of five second rate.
So we go ahead and call this low timer.
This required an instance pointer and the account value rate.
So low tamer first argument is an instance that your religious steamer and then you need to specify
the count railroad.
So this is in the DMR count variable, right?
So once you correctly load the timer, the next function that we call this?
The ACU.
Timer is expired or not great, so let me just call this function and we will be waiting for our timer
to expire and then do something right, for example, it will return through OK if timer has expired.
So the delay that we specified as soon as.
It reaches to a value of zero.
That basically mean the timer is expired.
And in that case, it will be returning to rate is forested.
The Spaniard will be returning false rate.
So if we plan to use OK while look great, so they just add where you look great.
So we want that our processor should we to were here till we complete the five second period.
And since this return, false.
OK.
The function that we seen over here since this riordan's of false rate deal.
The five second bidder.
So we need to add a note operator so that while true, and then we will be while we come true and will
be waiting over here to just add the exclamation mark, OK, which represent the note operator, then
the function.
And finally, this requires OK.
The instance of queue, which is an argument, right?
So DMA now what will happen is still our timer is counting the delay of five second rate.
This function will return.
False and normal.
False will be true.
OK.
So while true, we will be waiting over here and as soon as our timer is expired.
OK, so this will return true and not approval before 10 will be coming out of this.
Right?
So we go ahead and here we add the status says OK.
DeLay of five second.
We could also mention.
TMR.
Expired.
OK, so delay of five six accumulate.
No, only thing that we need to do is before we are checking whether time is expired or not, we need
to start our time right.
So to do that, we have a functions.
OK, so if you go down here, you have a function to start and stop the timer.
So let me just call the Stop API, and this also required a single argument, which is an instance set,
right?
So we go ahead and we call this function OK.
And here we had an instance set your registry, right?
So this completes the entire code, right?
So that could be useful to demonstrate how our remove workaround, right?
So you'll be finding first we perform an initialization, then we perform a self-test.
The first thing that we do is to stop the timer forcefully.
OK, then set up the correct move.
Here we set up the timer to operate in a normal.
We load the count to a timer and then we have started the timer, right?
Here we are, waiting for a timer to reach to a zero.
That basically mean we are working in a full mode.
And as soon as our timer expires, OK, we will be coming out of this wide loop.
And then we mention this to end user by sending the string to a console that is timer expired and we
able to achieve a delay of five seconds.
Right.
So let me just go ahead and first build our application project.
So breast control.
This will start the process of building your application project to once be successful.
Now remember.
In our previous case.
It should be, Emma, right?
So now again, proceed for building the project to build a successful.
We already know that in the previous case, we are utilizing the watchdog Daimler application project
great.
So the DBA configuration is for the watchdog timer.
We need to modify our configuration, right?
So how we do that is we just select this dimer as blue application project.
Right click Debug.
Yes, OK, launch on hardware.
So this will choose the debug configuration of a timer, OK, and that could be noticed by reading the
name for our debugger.
So here we have a system debugger and the school dimer, and the score is different.
This basically means our current debug configuration is the timer, right?
So what this is done, what we're going to do is.
Now, here's how you recognize whether you correctly debugging the correct debug configuration.
Just need to read the debugger with your right.
So the system debugger on this code timer and the score is still blue and the system rates of timer,
and this is what we want to verify.
So this basically mean we have chosen the correct application project to execute, right?
So once our programming is successful, we go to a write system, will select the respective compile
and connect to a serial.
Tell Rachel.
As this is done, we go ahead and we need to just click on a resume button, right?
So you would see timeout and you did six this time herself.
That's just successful.
And after a delay of five seconds, you could clearly observe that we get the delay of five seconds.