1
00:00:00,060 --> 00:00:07,860
Now we understood how you in washed up time, so let it just proceed for utilizing the timer, which

2
00:00:07,860 --> 00:00:13,260
is pressing with the zinc processing system that is the private 32bit timer that we have with zinc processing

3
00:00:13,260 --> 00:00:14,970
system right now.

4
00:00:14,970 --> 00:00:20,820
Instead of creating a new project, what we could do is here it will be creating a new application project

5
00:00:21,240 --> 00:00:27,240
because I housing file remain common for both washed up time where as well as the timer.

6
00:00:27,540 --> 00:00:27,770
Right.

7
00:00:27,780 --> 00:00:31,140
So we'll go ahead and we'll create a new application project.

8
00:00:31,140 --> 00:00:32,880
We'll just be naming this chamber.

9
00:00:33,120 --> 00:00:41,040
OK, we will be working with the sea and we'll be utilizing in Hallowell template right now when we

10
00:00:41,850 --> 00:00:43,890
see the system, right?

11
00:00:44,040 --> 00:00:44,430
OK.

12
00:00:44,460 --> 00:00:47,140
That has been created for our time.

13
00:00:47,220 --> 00:00:56,240
OK, so you could clearly see that the table that we required for usage of the 32 bit timer is MCU time,

14
00:00:56,310 --> 00:00:56,560
right?

15
00:00:56,580 --> 00:01:01,140
So we go to the gamer folder, OK?

16
00:01:01,140 --> 00:01:10,080
And then the two things that will be including here is that it follows statics, parameters, storage.

17
00:01:10,110 --> 00:01:10,470
Right?

18
00:01:10,560 --> 00:01:14,190
This will give us all the information related to any hardware.

19
00:01:14,220 --> 00:01:21,620
And then we will be proceeding for adding the driver, which are specific to our 32 bit timer radius

20
00:01:21,660 --> 00:01:24,140
x fcu timer.

21
00:01:25,560 --> 00:01:26,990
So these are the two main thing.

22
00:01:27,000 --> 00:01:29,940
Now we'll explore the API is that we have right?

23
00:01:31,140 --> 00:01:37,680
So it consists of normal mode and reload mode and an intramural again, three modes are their normal

24
00:01:37,680 --> 00:01:43,230
mode and automobile mode will be targeting in this specific section, and introverts will be understanding

25
00:01:43,230 --> 00:01:47,040
when we cover fundamental love and interest rate again, a few.

26
00:01:48,070 --> 00:01:54,250
See the EPA so we have to structure when, for instance, and one for conflict structure, right?

27
00:01:55,420 --> 00:01:59,650
Then we also have an EPA to check whether time is expired or not.

28
00:02:00,070 --> 00:02:04,330
We also have an EPA if we start the timer, OK, a low timer.

29
00:02:04,360 --> 00:02:07,450
These are very similar to what we have in an Vostok.

30
00:02:07,460 --> 00:02:12,340
Namely, we could also take out the value, the current value that our time would have.

31
00:02:12,380 --> 00:02:15,010
OK, then we have an hour to reload.

32
00:02:15,370 --> 00:02:21,460
This will be covering later on when we first discuss the timer without an author.

33
00:02:21,890 --> 00:02:22,160
Great.

34
00:02:22,180 --> 00:02:27,620
And first we'll just be disabling in a little later on, we will be enabling it and trying to see the

35
00:02:27,620 --> 00:02:32,290
effect that we get with an to look great in trouble or be covering over here.

36
00:02:32,920 --> 00:02:40,410
So we have look up config see of judicial circuit straight and then EPA to start and stop, right?

37
00:02:40,420 --> 00:02:41,820
So we also have a peace killer.

38
00:02:41,850 --> 00:02:48,580
We will be separate separately for initiating a peace killer so this could be used to control the clock

39
00:02:48,580 --> 00:02:49,210
frequency.

40
00:02:49,270 --> 00:02:49,540
Right?

41
00:02:49,840 --> 00:02:55,630
So let me just follow a normal procedure for us to initialize our time, or it will again be performing

42
00:02:55,630 --> 00:02:58,060
the cell test for this intermediate pacing rate.

43
00:02:59,220 --> 00:03:04,190
So the new structure that we required is the first one that is the.

44
00:03:05,430 --> 00:03:06,480
Instant structure.

45
00:03:06,600 --> 00:03:09,300
So this will just be naming as.

46
00:03:11,110 --> 00:03:15,640
As Sue Time and then we have a conflict structure, right, so we'll just be declaring it.

47
00:03:16,210 --> 00:03:21,340
This will be again a pointer, so sue dmaa and then we have a conflict, right?

48
00:03:21,760 --> 00:03:25,570
This will be declaring again as a pointer, so we proceed with the light.

49
00:03:25,960 --> 00:03:28,240
And this will be our timer in it.

50
00:03:29,630 --> 00:03:33,980
OK, so let me just go ahead and try to add a look up country first.

51
00:03:34,370 --> 00:03:40,100
This again returned the conflict structure, which will be connecting to our a seal team config structure

52
00:03:40,100 --> 00:03:41,000
that we have our data.

53
00:03:41,000 --> 00:03:43,990
We have Rachel S.U. time conflict.

54
00:03:44,000 --> 00:03:46,020
This will be equals to look of conflict.

55
00:03:46,040 --> 00:03:51,290
And here we just need to specify the device A.D. So we go to experimental dotage.

56
00:03:51,710 --> 00:03:53,810
Look for the timer.

57
00:03:55,090 --> 00:03:58,410
So here we have a sea, you right?

58
00:03:58,570 --> 00:04:03,070
This is the device that we need to specify to our look up config function.

59
00:04:03,850 --> 00:04:06,010
Let me just go ahead and take over here.

60
00:04:06,050 --> 00:04:06,300
Right.

61
00:04:06,310 --> 00:04:07,810
So this is the first thing that we do.

62
00:04:08,290 --> 00:04:15,130
Then we call CFD, initialize rate targeting this rate and the status, which will be used to verify

63
00:04:15,130 --> 00:04:17,260
whether initialization is successful or not.

64
00:04:17,320 --> 00:04:17,520
Right.

65
00:04:17,540 --> 00:04:25,660
So in status and it should be equal to CFD initialize, we need to pass an instance structure, which

66
00:04:25,660 --> 00:04:32,740
is this you dmaa in orchestrating the config structures so you DMA config.

67
00:04:32,740 --> 00:04:39,190
And the last thing that we do is to specify the visitors to see you.

68
00:04:39,770 --> 00:04:43,360
You mark config and then be set straight.

69
00:04:44,080 --> 00:04:49,480
So here we'll just be verifying whether initialization is successful or not, so we could just copy

70
00:04:49,480 --> 00:04:53,580
the code from my previous project rate.

71
00:04:53,590 --> 00:04:55,990
This both the thing we will be performing.

72
00:04:55,990 --> 00:05:01,300
So we'll just be copying this and see that since we have both the files with the same name, as soon

73
00:05:01,300 --> 00:05:05,490
as you copy anything from our previous code, you just need to close it.

74
00:05:05,500 --> 00:05:07,150
Okay, so you do not.

75
00:05:08,030 --> 00:05:16,940
Modify the code from a previous application rate, so we'll just be copying whatever thing that we require

76
00:05:16,940 --> 00:05:21,460
and then we'll be immediately closing it, so this will avoid a confusion in the keys if you have the

77
00:05:21,470 --> 00:05:23,030
main file with the scene, right?

78
00:05:23,510 --> 00:05:31,460
So if you do this access, we'll just be mentioning that timer and it is successful and stammering again,

79
00:05:31,460 --> 00:05:33,800
then will again be performing a self-test so far.

80
00:05:33,800 --> 00:05:37,850
So we do have a dedicated API, right?

81
00:05:37,880 --> 00:05:38,900
So we'll just be copying.

82
00:05:38,900 --> 00:05:44,960
It will be adding it over here and that we just need to pass an instance structure.

83
00:05:44,990 --> 00:05:52,670
So did a see you TMA right and will again be checking whether this is successful or not?

84
00:05:52,700 --> 00:05:52,970
Right.

85
00:05:53,390 --> 00:05:57,860
This complete our initialization code for our timer will just be calling it over here.

86
00:05:57,890 --> 00:06:07,460
So for us, the function is dmaa and it will just be calling it over here and then we will be performing

87
00:06:07,910 --> 00:06:08,330
the.

88
00:06:09,350 --> 00:06:10,720
Verification of disclosure.

89
00:06:11,030 --> 00:06:14,360
So let me just go ahead and try to force program and if you.

90
00:06:15,790 --> 00:06:22,060
Squad's programming is successful, will just be clearing up, and so in fact, we will, because disconnecting

91
00:06:22,060 --> 00:06:25,460
it and then we will begin connecting it at scene.

92
00:06:26,090 --> 00:06:33,010
Right now, we need to select this folder, OK, that we want to execute.

93
00:06:33,370 --> 00:06:37,360
So right click here, unless your end configuration.

94
00:06:37,360 --> 00:06:42,760
Right now, you'll be finding you do have an existing configuration over here, which belongs to our

95
00:06:42,760 --> 00:06:43,750
previous application.

96
00:06:44,050 --> 00:06:50,680
OK, so you could delete it, or you could keep it as it is, and then right click run as long as you

97
00:06:50,680 --> 00:06:50,860
want.

98
00:06:51,220 --> 00:06:57,490
So this will create the new launch configuration and that will be executed, right?

99
00:06:58,060 --> 00:07:05,860
So now you will see that timer initialization is successful and self-test is also right to be correctly

100
00:07:05,860 --> 00:07:09,940
able to initialize a timer, as well as we able to perform the self-test.

101
00:07:09,970 --> 00:07:14,220
Now that it just prosody and try to explore the API that we have, right?

102
00:07:15,070 --> 00:07:20,560
So we first need to disable our reload mode since that is not what we wanted to do here.

103
00:07:20,650 --> 00:07:25,100
So let it just go and use disable auto reload, right?

104
00:07:25,450 --> 00:07:27,910
Will be understanding the meaning and usage of it.

105
00:07:27,910 --> 00:07:32,630
As we progress for right here, we just need to pass an instance.

106
00:07:32,640 --> 00:07:34,150
So this is the first thing that we do.

107
00:07:34,960 --> 00:07:38,620
Then the next thing is to load account great again.

108
00:07:38,710 --> 00:07:43,150
Let's assume that we want to have a delay of five second rate.

109
00:07:43,150 --> 00:07:46,150
Does it again work at half of the frequency?

110
00:07:46,420 --> 00:07:53,440
So for us, the timer count will be latest as you are already low.

111
00:07:53,480 --> 00:07:59,800
Five second is three three three three three three three three three three three three three megahertz

112
00:08:00,220 --> 00:08:01,830
and multiply by fight rate.

113
00:08:01,840 --> 00:08:08,320
This will give us a delay of five second and we'll go ahead and load this value into our timer, right?

114
00:08:08,440 --> 00:08:11,740
So to do that, we do have an EPA.

115
00:08:12,910 --> 00:08:19,510
So we have a little time where it will just be copying this will be adding here and then here we need

116
00:08:19,510 --> 00:08:25,390
to pass an instance and along with this, we need to parcel value, right?

117
00:08:25,810 --> 00:08:28,780
This will load our time right.

118
00:08:29,290 --> 00:08:35,170
Before starting our time when we first need to purposefully call the stop.

119
00:08:36,520 --> 00:08:37,480
And then.

120
00:08:38,720 --> 00:08:41,440
We will be starting our time, right, so here.

121
00:08:42,140 --> 00:08:43,010
Just go ahead.

122
00:08:44,420 --> 00:08:47,240
And then we will be calling the stock great.

123
00:08:48,480 --> 00:08:50,940
Now, what are we going to do is?

124
00:08:52,280 --> 00:08:55,670
So litigious, proceed with utilizing dysfunction right now.

125
00:08:55,910 --> 00:09:02,540
This will notify by the time where it expired or not, so true if time has expired, so we will just

126
00:09:02,540 --> 00:09:05,450
be waiting until timer right the white.

127
00:09:06,750 --> 00:09:14,250
So this will continuously routine falls, OK, to the time counter reaches to the specified rate that

128
00:09:14,250 --> 00:09:20,760
its timer expired, so we'll just be adding another tool here, right?

129
00:09:20,760 --> 00:09:22,810
And then we'll be adding this function.

130
00:09:22,830 --> 00:09:24,480
We just need to pass an instant.

131
00:09:24,480 --> 00:09:31,080
So it's you know, what this will do is this will be continuously waiting until the timer expired and

132
00:09:31,080 --> 00:09:33,270
in-between with the small delay.

133
00:09:33,620 --> 00:09:33,870
Right.

134
00:09:33,870 --> 00:09:42,900
So let me just add a delay of two hundred microsecond right, and will be randomly printing the value

135
00:09:42,900 --> 00:09:44,570
that we are having on the counter right.

136
00:09:44,580 --> 00:09:49,440
So will also be our understanding where the country is going up and down, where those counters going

137
00:09:49,440 --> 00:09:49,770
down.

138
00:09:50,310 --> 00:09:58,350
And then we, as we come out of the white look, we'll just be mentioning that our.

139
00:09:59,440 --> 00:10:08,370
Timer, ex-spy, right, that is you basically reach to the delay of a delay of five seconds.

140
00:10:08,620 --> 00:10:10,660
This is what we're going to do over here.

141
00:10:11,110 --> 00:10:16,600
So let me just go ahead and try to randomly pick up the value for our counter and for that, we do have

142
00:10:16,600 --> 00:10:17,080
an EPA.

143
00:10:17,080 --> 00:10:21,040
So we have a good counter value and this basically rate and utility rate.

144
00:10:21,040 --> 00:10:24,370
So we shouldn't just be hiding one variable.

145
00:10:25,720 --> 00:10:34,420
So just go ahead and add one variable and count value, right with visualising it to a zero.

146
00:10:35,550 --> 00:10:42,310
To count value will be equal to the function that we have, and here we just need to pass an instance,

147
00:10:42,310 --> 00:10:44,310
so it is absolutely right.

148
00:10:44,850 --> 00:10:47,590
And along with this will also be printing this value, right?

149
00:10:47,610 --> 00:10:51,470
So this will happen in an interval of two hundred microseconds, right?

150
00:10:52,620 --> 00:10:56,910
So two hundred microsecond is very low, period, that's compared to five second.

151
00:10:57,450 --> 00:11:04,660
They just go it like two thousand to 1000 microsecond basically mean it is two millisecond rate.

152
00:11:04,660 --> 00:11:06,120
Two will add one more zero.

153
00:11:06,450 --> 00:11:08,110
This will be 20 milliseconds.

154
00:11:08,110 --> 00:11:13,230
And then or instead of, we could just walk around with ten millisecond rate.

155
00:11:13,230 --> 00:11:17,520
So we'll just look whether this function is still not.

156
00:11:18,780 --> 00:11:22,020
So a year we'll just be adding the is that it will.

157
00:11:23,270 --> 00:11:31,280
A blue light as a delay of two hundred milliseconds, so the three zero that will be basically converting

158
00:11:31,790 --> 00:11:34,470
micro to me and then two hundred millisecond rate.

159
00:11:34,490 --> 00:11:43,130
So when we reach to five second, we'll be finding less number of the reportings off in there on the

160
00:11:43,140 --> 00:11:50,960
con. Let it just go and try to bring the value right to the account value.

161
00:11:52,080 --> 00:11:53,040
I've seen 0d.

162
00:11:54,040 --> 00:11:57,760
OK, and we will be printing the value of count value, right?

163
00:11:58,360 --> 00:11:59,950
So this will be our entire logic.

164
00:11:59,950 --> 00:12:02,740
What we are doing is we are waiting for our timer to expire.

165
00:12:03,070 --> 00:12:08,770
So this will be continuously running till the counter reaches to the ground that we specify.

166
00:12:08,830 --> 00:12:09,190
OK.

167
00:12:09,220 --> 00:12:11,140
Again, it is in down counter.

168
00:12:11,540 --> 00:12:18,220
So as soon as we expect soon as a timer expired, we'll just be displaying this message.

169
00:12:18,460 --> 00:12:25,600
So we'll just go ahead and try to perform an execution of a call so things will become much more easier

170
00:12:25,600 --> 00:12:26,310
to understand, right?

171
00:12:26,830 --> 00:12:32,410
So we already programmed refugee while checking whether initialization is successful or not.

172
00:12:32,410 --> 00:12:35,740
So we just need to perform the same configuration.

173
00:12:35,890 --> 00:12:37,630
OK, on to a refugee.

174
00:12:39,030 --> 00:12:41,460
So now you could see the counter values.

175
00:12:41,500 --> 00:12:48,500
OK, so we started at a maximum 32 bit value again, then we are coming down so you could actually see

176
00:12:48,500 --> 00:12:51,050
the values I decree my dog again.

177
00:12:51,050 --> 00:12:52,280
This interval is.

178
00:12:53,590 --> 00:12:54,010
All.

179
00:12:55,130 --> 00:13:01,130
Two hundred millisecond rate, so we will do find out so if you can see the one second.

180
00:13:01,220 --> 00:13:04,520
We have five values right to five.

181
00:13:04,520 --> 00:13:08,210
Values should be printed within one two to one two three four five.

182
00:13:08,320 --> 00:13:08,590
Right.

183
00:13:08,600 --> 00:13:17,450
So this represent one taking one two three four five two second one two three four five three second

184
00:13:17,450 --> 00:13:23,840
one two three four and five four second one, two, three, four and five.

185
00:13:23,870 --> 00:13:30,470
Then you could clearly see that count or expired, and we get time where right, so this is working

186
00:13:30,480 --> 00:13:31,220
as expected.

187
00:13:31,460 --> 00:13:33,600
So this is how you'll be operating a counter.

188
00:13:33,620 --> 00:13:34,920
You go ahead first.

189
00:13:34,940 --> 00:13:39,120
So we learn how to load more now as we progress and listen in and to learn more.

190
00:13:39,140 --> 00:13:42,710
So depending on an application, you could actually utilize an auto reload more.

191
00:13:43,010 --> 00:13:43,340
OK.

192
00:13:44,000 --> 00:13:51,770
And this will keep a track of the timing, so you could measure whether the specific timing is made

193
00:13:51,770 --> 00:13:54,770
by an EPA is or would you be utilizing this to?

194
00:13:56,210 --> 00:13:57,870
Use for timing applications.

195
00:13:58,100 --> 00:14:05,120
So what we did is we found the specific time that we weren't great and that count we have loaded into

196
00:14:05,120 --> 00:14:05,630
a timer.

197
00:14:05,810 --> 00:14:13,610
Then usually when we start working with the timers, we first stop a timer purposefully and then we

198
00:14:13,790 --> 00:14:14,710
started right.

199
00:14:14,930 --> 00:14:20,780
We are waiting for timer to expire and in-between what we are doing is we are getting the random count

200
00:14:20,780 --> 00:14:22,400
to evaluate that specific instance.

201
00:14:22,400 --> 00:14:26,780
We are bringing that value and this we are doing in an interval of two hundred milliseconds.

202
00:14:27,500 --> 00:14:28,850
And as soon as we.

203
00:14:29,980 --> 00:14:35,630
A reach to zero, we basically print timer, right?

204
00:14:36,190 --> 00:14:38,440
So this is our to work from this.

205
00:14:38,440 --> 00:14:44,140
Also, it is clear, it is clear that our timer is going in and out.

206
00:14:44,140 --> 00:14:45,040
We are right.

207
00:14:45,280 --> 00:14:50,290
So let me just go ahead and try to exclude the other thing that we have not covered here that is pre-schooler

208
00:14:50,290 --> 00:14:52,530
as well as the auto reload.
