1
00:00:00,120 --> 00:00:06,930
First thing, as you complete your initialization is to purposefully stop the timer rate, then you

2
00:00:06,930 --> 00:00:10,950
perform the required configuration and then you start looking at only the timer.

3
00:00:11,070 --> 00:00:15,420
So this required an instant structure, which is still right.

4
00:00:15,420 --> 00:00:18,180
So we have purposefully stop our.

5
00:00:19,170 --> 00:00:25,410
Timer, OK, then I do not first worry about pre-schooler, right, so let's adjust the rule account

6
00:00:25,860 --> 00:00:29,250
and then disable the auto reload.

7
00:00:29,490 --> 00:00:34,440
Now we know that the timer have two modes of operation, right, normally more than an hour to reload

8
00:00:34,440 --> 00:00:34,680
mode.

9
00:00:34,690 --> 00:00:36,950
So first, let's just focus on a normal mode.

10
00:00:36,960 --> 00:00:40,050
And to do that, we need to disable an auto mode.

11
00:00:40,140 --> 00:00:41,760
And this is the function to do that.

12
00:00:41,760 --> 00:00:44,010
So this just requires an instant structure, right?

13
00:00:44,400 --> 00:00:47,580
So we go ahead and call this function.

14
00:00:47,610 --> 00:00:51,150
OK, here we mentioned the instant structure, which is to my right.

15
00:00:51,480 --> 00:00:58,080
So this basically mean that we are working in normal.

16
00:00:59,130 --> 00:00:59,790
More great.

17
00:01:00,720 --> 00:01:08,020
So once this is done, we go ahead and then we have a function to lower the time.

18
00:01:08,310 --> 00:01:10,320
So again, the.

19
00:01:11,640 --> 00:01:16,050
The deal is that we want to achieve out of a time where it is five chicken, and we already know that

20
00:01:16,050 --> 00:01:21,210
since it is operating at half of the frequency that is three three three megahertz, we just need to

21
00:01:21,210 --> 00:01:23,100
specify discount rate.

22
00:01:23,370 --> 00:01:30,210
So we go ahead and try to look for the argument size that they except accept rates so low.

23
00:01:30,230 --> 00:01:33,510
Taylor accept the value in a new digital format, right?

24
00:01:33,510 --> 00:01:36,160
So you declared a new 32 variable.

25
00:01:36,180 --> 00:01:37,830
So I hear you that you do.

26
00:01:38,190 --> 00:01:42,570
They just need this as demo count.

27
00:01:42,650 --> 00:01:47,550
OK, and this will be close to three three three three three three three three three.

28
00:01:47,780 --> 00:01:50,710
So this is three three three megahertz cross.

29
00:01:50,850 --> 00:01:51,270
Five.

30
00:01:51,570 --> 00:01:57,180
So this is the count that you need to add for achieving a delay of five second rate.

31
00:01:57,180 --> 00:02:00,060
So we go ahead and call this low timer.

32
00:02:00,300 --> 00:02:03,870
This required an instance pointer and the account value rate.

33
00:02:05,310 --> 00:02:11,460
So low tamer first argument is an instance that your religious steamer and then you need to specify

34
00:02:11,460 --> 00:02:12,480
the count railroad.

35
00:02:12,500 --> 00:02:15,880
So this is in the DMR count variable, right?

36
00:02:15,880 --> 00:02:21,510
So once you correctly load the timer, the next function that we call this?

37
00:02:23,070 --> 00:02:24,390
The ACU.

38
00:02:25,460 --> 00:02:31,550
Timer is expired or not great, so let me just call this function and we will be waiting for our timer

39
00:02:31,550 --> 00:02:37,850
to expire and then do something right, for example, it will return through OK if timer has expired.

40
00:02:37,850 --> 00:02:40,520
So the delay that we specified as soon as.

41
00:02:41,690 --> 00:02:43,320
It reaches to a value of zero.

42
00:02:43,360 --> 00:02:45,660
That basically mean the timer is expired.

43
00:02:45,860 --> 00:02:50,830
And in that case, it will be returning to rate is forested.

44
00:02:50,840 --> 00:02:52,760
The Spaniard will be returning false rate.

45
00:02:52,770 --> 00:02:59,990
So if we plan to use OK while look great, so they just add where you look great.

46
00:03:00,170 --> 00:03:06,450
So we want that our processor should we to were here till we complete the five second period.

47
00:03:06,690 --> 00:03:08,580
And since this return, false.

48
00:03:08,600 --> 00:03:08,960
OK.

49
00:03:09,170 --> 00:03:15,120
The function that we seen over here since this riordan's of false rate deal.

50
00:03:15,440 --> 00:03:16,640
The five second bidder.

51
00:03:16,670 --> 00:03:22,400
So we need to add a note operator so that while true, and then we will be while we come true and will

52
00:03:22,400 --> 00:03:28,130
be waiting over here to just add the exclamation mark, OK, which represent the note operator, then

53
00:03:28,130 --> 00:03:28,820
the function.

54
00:03:29,300 --> 00:03:32,090
And finally, this requires OK.

55
00:03:32,420 --> 00:03:34,640
The instance of queue, which is an argument, right?

56
00:03:34,640 --> 00:03:41,570
So DMA now what will happen is still our timer is counting the delay of five second rate.

57
00:03:41,840 --> 00:03:43,040
This function will return.

58
00:03:43,040 --> 00:03:44,090
False and normal.

59
00:03:44,120 --> 00:03:45,410
False will be true.

60
00:03:45,770 --> 00:03:46,100
OK.

61
00:03:46,220 --> 00:03:50,990
So while true, we will be waiting over here and as soon as our timer is expired.

62
00:03:51,050 --> 00:03:55,340
OK, so this will return true and not approval before 10 will be coming out of this.

63
00:03:55,760 --> 00:03:56,000
Right?

64
00:03:56,330 --> 00:04:01,220
So we go ahead and here we add the status says OK.

65
00:04:02,190 --> 00:04:06,180
DeLay of five second.

66
00:04:07,790 --> 00:04:09,050
We could also mention.

67
00:04:10,010 --> 00:04:10,820
TMR.

68
00:04:12,110 --> 00:04:12,950
Expired.

69
00:04:13,110 --> 00:04:15,890
OK, so delay of five six accumulate.

70
00:04:17,310 --> 00:04:23,250
No, only thing that we need to do is before we are checking whether time is expired or not, we need

71
00:04:23,250 --> 00:04:24,660
to start our time right.

72
00:04:24,660 --> 00:04:27,090
So to do that, we have a functions.

73
00:04:27,150 --> 00:04:32,260
OK, so if you go down here, you have a function to start and stop the timer.

74
00:04:32,450 --> 00:04:39,330
So let me just call the Stop API, and this also required a single argument, which is an instance set,

75
00:04:39,450 --> 00:04:39,720
right?

76
00:04:39,720 --> 00:04:43,300
So we go ahead and we call this function OK.

77
00:04:43,300 --> 00:04:46,890
And here we had an instance set your registry, right?

78
00:04:46,890 --> 00:04:49,470
So this completes the entire code, right?

79
00:04:49,500 --> 00:04:53,690
So that could be useful to demonstrate how our remove workaround, right?

80
00:04:53,700 --> 00:04:59,190
So you'll be finding first we perform an initialization, then we perform a self-test.

81
00:04:59,490 --> 00:05:03,900
The first thing that we do is to stop the timer forcefully.

82
00:05:04,270 --> 00:05:06,030
OK, then set up the correct move.

83
00:05:06,060 --> 00:05:09,000
Here we set up the timer to operate in a normal.

84
00:05:09,240 --> 00:05:13,530
We load the count to a timer and then we have started the timer, right?

85
00:05:14,280 --> 00:05:18,830
Here we are, waiting for a timer to reach to a zero.

86
00:05:18,840 --> 00:05:21,690
That basically mean we are working in a full mode.

87
00:05:21,690 --> 00:05:26,940
And as soon as our timer expires, OK, we will be coming out of this wide loop.

88
00:05:26,940 --> 00:05:35,630
And then we mention this to end user by sending the string to a console that is timer expired and we

89
00:05:35,640 --> 00:05:38,080
able to achieve a delay of five seconds.

90
00:05:38,110 --> 00:05:38,370
Right.

91
00:05:38,370 --> 00:05:41,400
So let me just go ahead and first build our application project.

92
00:05:41,730 --> 00:05:42,840
So breast control.

93
00:05:43,050 --> 00:05:49,020
This will start the process of building your application project to once be successful.

94
00:05:49,260 --> 00:05:50,040
Now remember.

95
00:05:51,490 --> 00:05:52,870
In our previous case.

96
00:05:53,950 --> 00:05:56,140
It should be, Emma, right?

97
00:05:57,480 --> 00:06:02,140
So now again, proceed for building the project to build a successful.

98
00:06:02,160 --> 00:06:08,670
We already know that in the previous case, we are utilizing the watchdog Daimler application project

99
00:06:08,670 --> 00:06:08,910
great.

100
00:06:08,910 --> 00:06:12,110
So the DBA configuration is for the watchdog timer.

101
00:06:12,120 --> 00:06:15,570
We need to modify our configuration, right?

102
00:06:15,570 --> 00:06:20,700
So how we do that is we just select this dimer as blue application project.

103
00:06:20,700 --> 00:06:21,960
Right click Debug.

104
00:06:21,980 --> 00:06:23,880
Yes, OK, launch on hardware.

105
00:06:24,990 --> 00:06:33,420
So this will choose the debug configuration of a timer, OK, and that could be noticed by reading the

106
00:06:33,420 --> 00:06:34,700
name for our debugger.

107
00:06:34,900 --> 00:06:39,240
So here we have a system debugger and the school dimer, and the score is different.

108
00:06:39,280 --> 00:06:43,920
This basically means our current debug configuration is the timer, right?

109
00:06:43,920 --> 00:06:47,340
So what this is done, what we're going to do is.

110
00:06:48,850 --> 00:06:55,960
Now, here's how you recognize whether you correctly debugging the correct debug configuration.

111
00:06:56,230 --> 00:07:00,520
Just need to read the debugger with your right.

112
00:07:00,530 --> 00:07:05,500
So the system debugger on this code timer and the score is still blue and the system rates of timer,

113
00:07:05,500 --> 00:07:07,930
and this is what we want to verify.

114
00:07:08,500 --> 00:07:12,520
So this basically mean we have chosen the correct application project to execute, right?

115
00:07:12,760 --> 00:07:18,730
So once our programming is successful, we go to a write system, will select the respective compile

116
00:07:18,730 --> 00:07:19,870
and connect to a serial.

117
00:07:19,870 --> 00:07:20,650
Tell Rachel.

118
00:07:20,650 --> 00:07:25,240
As this is done, we go ahead and we need to just click on a resume button, right?

119
00:07:25,240 --> 00:07:27,850
So you would see timeout and you did six this time herself.

120
00:07:27,860 --> 00:07:28,870
That's just successful.

121
00:07:29,260 --> 00:07:35,570
And after a delay of five seconds, you could clearly observe that we get the delay of five seconds.
