We have created a new application project.
Now we proceed to build an application for our two full time the right, so if you go to a good support
package.
OK, so the recommended driver for DC is the DCP s right.
So this is what we are going to include in our Halloway Darcy.
Right.
So Ash, can you then the driver is you?
Yes, OK.
You just need to add a prefixes.
So this will give us an access to a driver related to dispatch time again to roadside the driver that
we require.
Frequently, this experiment is done.
So this consists of all the hardware related information.
Right now, we proceed to first initialize out the reference of what you see in it.
Then we will be declaring all the necessary functions that could be used to initialize our duties.
So we go to CPS driver.
OK.
So to see more, you grew by three independent timer or counter money that can each be clocked using
either a system clock or SWG the clock to the right now we are driving our D.D.S. with the system clock
rate.
In addition, each counter can independently reskill its selected clock input rate.
So that is something which is giving us an advantage that pre-schooler could be independently used for
the three different timer and counting.
Right now, we go ahead and try to find out the functions which are available in this table, right?
So we have a fixed structure and then the instant structure, right?
So we first caller conflict structure, we create a pointer of it, right?
So we go ahead on.
We are conflict structure really just name the sets DVC on config rate.
The next one that we required is an instance structure.
So we just copy this and then we have a few, right?
So these are the two structures which are mandatory to perform an initialization for an effective rate.
So if you go ahead and driver, you'll be finding we have the function and start to the DC to stop it,
right?
So this could be used to start and stop our timer, then whether the DC started or not, that could
also be checked right.
By utilizing this function, then we could also sample the current value over time by utilizing get
counter-rally function rate.
Then we go ahead and look for the function that are available.
So we do have a lookup config and see of initialization to look up.
Config is the first function that we required where we add a device idea, and this basically included
in the config structure, right?
So we go ahead, and for us, the config structure is to DC on fit, OK, and this will be given to
look up config where we need to pass the device, right?
So where we find the device is by utilizing an X parameter, not h right.
And look for DC, right?
So here you get all the information related to this.
So this is the device, Haiti that we need to add as an input to a lookup configuration as soon as you
add a device.
This Gen-Z config structure and then we will be calling the C of initialize right where we need to pass
an instance structure, config structure and the base address and this return the status of initialization.
So here you really notice that the value tenses started right.
So we will be declaring this 32 variable that could be used to store the status of initialization.
Then we called CMG.
Initialize here for this document is the instant structure is just UTC Knox.
The next one is a concrete structure, so if you do see conflict right, and then again.
We know that we said this from D.D.S. config structure.
This completes the process of initialization, then we'll just be verifying whether initialization is
successful or not.
Great save status.
Music was to exist.
So in that guy's so good.
Mention that device initialization is success rates of DDC inept.
Success for right else is and we could just mention D.D.S..
OK?
Admit he read, this makes sense.
So this completes the process of initialization.
Then the since we are working with the time to counter this belongs to an intermediate and complex benefited.
We need to also perform self-restraint so that will verify whether hardware is properly configured.
So here we have the self-test, right?
So we just need to blast to structure to it.
So let me just go ahead and agree with us to this variable rate of students will be forced to self test
where we just need to pass the instance structure we just see and then we will do everything again.
The simplest is successful or not, right?
So we go ahead and again check whether status is equal to existing success.
And if that is the case, we'll just be mentioning self-tests successfully as we will be mentioning
self-test, right?
So this completes the process of initialization of our DTC it.
So what we are doing is first, we are calling a lookup config.
This generate the config structure.
Then we are calling CMG initialize to perform an initialization that we are verifying whether initialization
is successful or not.
Finally, we are also calling center stage.
So let me just go to our main application and first call the initialization function, which is GDC
and in the mean function.
So now the option that we need to set in that DDC rate will be fighting it.
There are multiple things that we require to add so we can automatically lower the counter value as
we are doing in a previous case that we are working with the private to do the timer or of watchdog
time.
All right.
So here you could see we have multiple parameters we have of this killer.
Then we have a frequency interval and.
We also have an option, right, so there are multiple parameters that we need to set to properly consider
if that is the primary difference that we'll be finding between the timer that we previously discussed.
And that's it's.
So let me just declare one structure.
I it is always a good idea when you work it out with the DDC, where you want to configure a multiple
parameter, you create a structure where you incorporate all the parameters into a single structure.
So that makes an entire process of setup very easy, right?
So you go ahead and let it just declare one structure, right?
So.
Type death, OK?
This is how we define this.
Now, if you do not know how you define this structure, just go to the driver here.
We already know that the two structures are already declared that this config structure needs to structure,
right?
So if you go ahead and analyze the structure, you'll easily able to understand the format of declaring
the structure right.
So you could see we start with the typedef then structure, OK, then you add the members, which are
which you want to add to the structure and then finally, you provide the name to a structure, right?
So this is how you declare the structure.
We go ahead and follow the same format, right?
So type there and then strapped.
OK, then finally, basis and this will be DDC setup structure, right?
And then we add a semicolon.
Now we need to add a member state.
So just to analyze the parameter that you required, OK to perform the different configuration.
So first parameter that you have is the.
This killer, which is of you eat that right?
So we go ahead and you wait.
Then we just need to assess, please keep the right to be safe.
And then you need to add a semi-final, right?
The next data that we require is an x interval, right?
So this is of an x interval type, right?
So we just started and it's interval and let it just mean this as interval.
This is the second.
Remember that we have in our structure, the third one is a frequency right, which is of study to date.
So let me just go ahead and start off frequency so you that you do.
Let me just name this as output secrets.
So we arrived at our pregnancy killer and then into the last parameter that you required is an option,
right?
So let you just go ahead and.
So we have an option of debut.
Right, so this is what we're going to add as our last member, which is required for a proper configuration
of our deed so you that we do and then it just added an option.
So these are the four parameters which are required to correctly configure D.D.S., right?
So once you do this, let just go to our mean application and call PDC set up, right?
So this is the structure that we have.
And let let's just name this SGI now to perform an initialization.
So we do want to have a frequency of 108 output frequency that we are expecting from IBD is one heart
rate.
So we just need to add frequency, evaluate and hopes in a case of an output frequency.
So let me just add one to it, right and rest of the parameters we do not know.
So let me just initialize them to zero.
So, all right.
So this basically suggests that output frequency is one plus member in our structure as an output frequency,
right?
And here we have a value of one for our force member.
So this suggests that we are targeting the frequency off of one hertz and the rest of the parameter.
We need to calculate utilizing the functions that are available with the driver, right?
So pre-schooler is interval is also zero, where an option is also zero, right?
So now if you go to the D.D.S. driver, right, so you have a calculate interval from a frequency right.
So this is the function that will basically calculate interval value as well as a pre-schooler value
for a given frequency.
Right.
And we already specified the frequency of this one hertz.
Right now, this function could be utilized to calculate the double killer from the frequency, right?
So they just call this function.
OK, so we will be calling this function.
And then first argument must be an instance of which is Gizzi, right?
The next argument that we have is that frequency of frequency is the first member of our data structure,
right?
So we could just access a frequency like this data, which is a structure that use a dot operator and
the output frequency, right?
So this is equal to what?
The next argument that we have is a pointer to an interval and pointer to upskill, all right, give
this to our pointers, right?
So we just need to add another person and then data dot.
The third argument is an interval, so we'd just be storing an interval value in an interval member,
right?
Similarly, data don't the preschooler the last.
So again, we need to use an embassy and then specify the scale.
This makes sense, though.
This is how we will be calculating interval as well as p.
Scalar from an output frequency would just confirm that the third argument is interval and the last
argument is a risky right.
So once you compute and double entry scalar from a frequency, the next step is to set the preschooler
and set the interval value rate.
So do, said the pre scalar value.
We have this function where we just need to pass an instance structure and the pre scalar value, which
we have computed rate.
So we go ahead.
And for a start and install structure, right?
And we know that now we have updated the AP scalar value of five structure, right?
So we'll just be adding that we're here now just to confirm whether it is asking about it.
There are simple value regulators asking for a value.
So we just need to get to the heart.
Risky.
Right?
So this is how we feed the this killer, well, we must be having a function to set up the integral
value, right?
So we would just be exploring the functions which are available.
So do you quickly go to all the countries which are present in the driveway?
You would just go to an outline tap and then find out whether we have a function to set up an interval,
right?
So this gives them easy access to all the function which operates in the chamber.
So we'll just be copying this.
This again required an instant structure.
OK, and then the interval value, right?
So we go ahead and we call this function.
Look, first, one is an instance to register UTC and then the interval value, right?
So the turnout interval where we have to run into one right, right?
So this is how we configure reskill.
And the last thing that is required is to set up the correct option, right?
So let me just go ahead and analyze the different options which are present in our driver, right,
Rachel?
We are not utilizing an external clock, so this is what we do not require.
We also do not required trialing each forex 10:00 since we are not working with an external clock.
We will be working in that interval mode and that it just work in a downward rate.
So those are the two things that we need to configure, right?
So let me just go ahead.
You are mean cold, right?
And we'll be updating an option, right?
So data dot.
All right, so this will leak was to the existing option that we have, right, so did the dark option.
OK, I will just be ordering it with the option that we want to separate.
This is the same strategy that we follow when we want to set the specific option, right?
So we'll be calling an interval mode option.
OK, and one more thing that we're going to add is the down, right, so just be calling for decrement
with you.
Right?
So these are the two options that we want.
So once we update the the number of structure, we just need to look for any that could be used to set
an option, right?
So we go ahead and in and out later, we will be finding out whether we have a function to set an option
rate.
So here we have the set option, right, so we go ahead and copy this function.
OK, and then Hala will not see.
So this required a first argument as an instance section, and the second argument is the option that
you want to say.
So first argument is though instead such a registry, and we know that the option of presenting an.
Leader adoption rate, so this is how you set up an option, right, so all the food parameters which
are required to correctly configure it, describing what I've incorrectly specified, right?
So we specify that output frequency utilizing an output frequency, we computed interval this and then
we set up pre-schooler as well as into it.
Finally, we also correctly set up an option, right?
So before we proceed to start an operation, the first thing that we always do is to stop forcefully
stop our.
Damon wrote a counter right, so to do that, we do have a functional here.
So let me just go on this over here.
So first thing, before we configure it, we will be stopping.
All right.
So now we are done with all the configuration that you need to do.
OK, so you need to correctly setup an option.
You need to specify input output frequency that you want.
Then utilizing calculated double trauma frequency, you'll be calculating interval as well as a preschooler.
OK.
And then you'll be utilizing set preschooler insect interval function to add the interval entry scalar
value that you get from this function.
Great to know.
Let's try to start an operation off fire.
Great in first, guess what we're going to do is we will just be analyzing the values of a counter after
that.
I love the Emirates.
We know that we have used an output frequency of winners, so this will give us a delay of one second,
right?
So we go ahead and try to find out the function that we have to stack the timer operation, right?
So we have a bad start.
We just required an instant structured as an argument, and this is used to start an operation of our
ADC late.
So we'll just be adding.
Start here and then right now, if you analyze the functions that are available in driver, we do not
have a function like is expired, which is available in the case of a 32 bit private time, right?
So we do not find anything as is expired over here, right to in the previous case, we utilized that
as a pooling function, which is utilizing the CPU resources.
And giving us an idea about whether timer is expired on.
Right.
But we do have another function, which is exactly similar to what we utilize in the previous year.
Also so here also, we have a great counter value.
And since we are operating in a downward so.
Depending on are in double frequency and a preschooler, somebody will be loaded in encounter and then
our counter will start discriminating because we are choosing the mode of operation to be out.
And we know that at the end of the time that we specified this will be that zero, right?
So let me just use this function.
We're here.
Gate counter value.
And this returns if you analyze so this written a 16 16 bit value rate, so you're 16.
I didn't like you, so I trust and be associate returns.
You did what innocuous?
It can be better today.
U16 value it.
So let me just declare you 16 valuable, OK?
And that will be storing the value that has been written by that function, right?
So.
This required an argument that an instance of direct, so we'll go ahead and act now immediately.
Once we start, our DTC will add some needed right and then we will be calling this get out of the well.
Now we know that since we are working within one hertz frequency, so the max do you that in Karachi
is one second, right?
So we will be utilizing you sleep great.
So this provides us the delay in microsecond.
And here we try to add a delayed millisecond race, the first at three, zero and then hundreds.
So this basically will give us a time of hundred milliseconds or delay of a millisecond and then will
be capturing the current counter-rally.
OK.
That really will be sending one to concentrate.
So what we got to do is we will be changing the delay and then we'll be observing whether Counter-rally
was actually discriminating or not.
So that help us understand that there are is correctly operating in a downward right to intent and then
count value.
Right.
So let me just bring the value in on decimal format.
Do not forget to add a new line character, and the variable that is holding the value of our account
is called right.
So this completes our application.
This will be executing for a few instances just to analyze whether RTC is correctly operating.
And then we will understand how the continuous speech and the dealer at a regular interval, right?
So let's just build our application budget.
So press control, we do start the process of reading your application project, and once builders finished,
we will select our application project.
OK, debug as large one hardware, right?
Now we have already corrected our right this terminal to account, but only thing that we need to do
is to click on this resume button, right?
So now you could see DDCA need.
A successful self-test is also successful in the counter value that we are getting is that our food
aid, the fight rate.
So this is for a delay of second rate.
Now what are we going to do?
We will be increasing our delay, right?
So instead of one hundred milliseconds already just make it two hundred millisecond rate in this case,
since our DTC is working in adult mode.
So we are expecting the value to be lower than this value rate.
So it should be lower than forty three fight, right?
So let's just build our application project back.
Once again, right, and then we will be again relaunching our application, so this is our debugger.
Right click and then just relaunch our.
Right?
So once programming is successful, we just click on resume, but right now you could see in the previous
case that we have either of or millisecond the value that we are getting is four, three five.
And then when we increase it to two hundred millisecond, we are getting the current value of around
four three four one five eight.
So this suggests that that it is this correct operating in a downward because as compared to a previous
case, as we increase the delay, our Kotwali should be DiClemente great.
Let us just try to implement value one more time.
Let us meet this as 500 millisecond rate build an application project target.
So once Bill, finish against, select the debugger and click on the launch rate.
So we go to a light and click on a resume, but right now you can clearly observe that within five minutes,
we reached up to two seven one five five, right?
So this clearly indicates that we are correctly operating in a dump.
Now let me just try to modify her, who says that we will do?
To need to do that and regular intervention will just be commenting all this out right now.
John Reid.
DeLay or continuous delay of one second vote to leave first utilized why?
Even so, this allows us to continue to see the need to delay.
The first thing that we're going to do here is to start our.
Judy, right, so once we start our deeds now, we will beat the LA.
Delivery just to a zero rate that we do not have any function that could be giving us an idea whether
our timer is expired or not, but we could take the help of get out the value because at the end when
our P.T.S.D, just to the time specified by and use it, this will return zero rate so we can just copy
this function.
OK, we could use a loop again and then we visualize this get down.
The value function does require just a single argument.
We just see right now we know that.
Anything other than zero will be considered as great, so whenever we do, whenever we have to, we
will be simply waiting over here as soon as dysfunctional rate zero.
So that will be my fault and never will be coming out, right?
So this also suggests that we reached to the time that you specified all the delay that you want out
of or duty rates as soon as this rate zero.
We completed the time that you want to reiterate are the account that we have no date for a specified
output frequency right after this.
What we want to do is we'll just be.
Stopping the.
You see, this is just a two way security that we do, in fact, we already know that it was just a
zero.
It won't be running again.
This is just a two way security that we act, that we will be forcefully stopping our DDC rate and then
we'll just be mentioning.
Our delay of one second achieve, right, so delay.
Off one second.
To you.
OK.
And then we will just be resetting.
So if you just analyze the function that are available, OK?
So we do have a function that could be used to reset our counter value.
So this micro reset, the counter, this trend, this is what we want so that again, we could generate
a delay of one second rate.
So let's just go ahead.
And called dysfunction.
OK.
And this again required a single instance, such as an occupancy rate.
Now what this will do is this will be continuously running because we are utilizing violent, right?
So we are starting an operation, then we are waiting for our timer to expire as soon as it expired
will be coming out here.
We are forcibly stopping Nazi.
Then we are printing the delay of one second, achieve OK.
And then we are resetting the counter right, right?
So as soon as we reset a counter rally again, we will be starting to operate.
Our TDCi again will be waiting for a timer to expire and then again sending this string on to a consumer.
Right.
So this is how you need the delay at a regular interval, depending on the output frequency that you
want your output frequency frequencies one hearts we will be getting a delay of around one second rate
delay, just build our application and see whether it is working as expected, right?
So we, as rebels finish, we go ahead and.
Debug as launch on heart rate.
Now we already have our right, this terminal connected to a composite, we'd just be clearing up our
console now and then we will be clicking on the resume.
But right, so it is successful.
And then you could clearly see after a delay of one second, OK, we able to continuously get the string
printing on the this.
Right?
This is how you utilize it.
Now this is a bit different as compared to our 32 bit private timer and a washed off timer because we
need to perform a different configuration, right?
So whenever you have multiple parameters that are used to.
Configure you up to see that you declared a structure, because then it becomes very easy to handle
the structure, right?
And then you perform an initialization.
So now you have an idea about what are we going to do is since we can deduce the will to need the delay
of one second, OK, we could modify this court says that we able to generate the blinking effect on
the right.
So we'll just be modifying on hybrid design and the code just to have an understanding of how you incorporate
multiple basis.
You can utilize D.D.S. to generate the event data regularly.