1
00:00:00,060 --> 00:00:06,000
So here we are in an application project, we go to the board support package and look for the mandatory

2
00:00:06,180 --> 00:00:09,420
driver files that are available for our watchdog timer.

3
00:00:09,650 --> 00:00:19,210
So you go ahead and here you have a WD right and the recommended driver is CEO WTT right?

4
00:00:19,230 --> 00:00:20,490
So we go ahead.

5
00:00:21,000 --> 00:00:21,600
We're here.

6
00:00:22,690 --> 00:00:28,120
Minami Hallowell, Dorsey again being sued, this tribe will find it so.

7
00:00:29,140 --> 00:00:34,510
As you wtt don't lecture to this is the driver file that we have.

8
00:00:35,470 --> 00:00:37,040
For the private one stop time.

9
00:00:37,420 --> 00:00:39,750
One more point that we required, OK?

10
00:00:39,970 --> 00:00:43,750
And that is experimenters started right.

11
00:00:43,780 --> 00:00:46,270
This contains all the hardware related information.

12
00:00:46,300 --> 00:00:50,860
Now, if you go to the watchdog timer driver, right by pressing an empty.

13
00:00:51,880 --> 00:00:57,520
So you could clearly notice that a sea washed up time or of the following creature.

14
00:00:57,610 --> 00:01:05,020
OK, so it's about the washed up mode timer mode and what is your counter gesture is a down count to

15
00:01:05,020 --> 00:01:10,300
remember this thing, that it is a down count and start discriminating when the watch dog is standing

16
00:01:10,300 --> 00:01:10,520
right?

17
00:01:10,570 --> 00:01:10,840
So.

18
00:01:11,870 --> 00:01:16,730
What are we going to do is we will be loading certain down, depending on the time.

19
00:01:17,800 --> 00:01:20,690
You delay that one from a time.

20
00:01:20,740 --> 00:01:26,350
Right, so depending on that, we will be counting the count that we need to set up, right?

21
00:01:26,350 --> 00:01:28,840
So that count will be loading in a long time.

22
00:01:28,960 --> 00:01:31,960
And with each clock ticking, we'll start counting.

23
00:01:31,960 --> 00:01:38,730
Don't wait till the default mode, but all the operation of a washed off, they may sit down right.

24
00:01:38,750 --> 00:01:42,260
So in a washed up mode whenever county just to zero.

25
00:01:42,700 --> 00:01:49,210
Because we know that our counter is down counter, so whatever count that we say, it will start counting

26
00:01:49,210 --> 00:01:51,220
down and after we.

27
00:01:52,160 --> 00:01:57,210
Complete the time specified for the counter.

28
00:01:57,230 --> 00:02:01,940
OK will reach to zero, so this will automatically said the reset flag.

29
00:02:01,970 --> 00:02:05,320
OK, all the reset Steve resistor.

30
00:02:06,680 --> 00:02:13,340
OK, and I basically call it a system reset, so if you want to avoid the system reset, you need to

31
00:02:13,340 --> 00:02:14,990
periodically refresh.

32
00:02:16,030 --> 00:02:16,990
You are out of.

33
00:02:17,460 --> 00:02:21,490
OK, you are basically restudy your washed up time before it expires.

34
00:02:21,520 --> 00:02:21,760
Right?

35
00:02:22,150 --> 00:02:28,840
Only when we write a value of, oh, one two three six in a research studio registered, then only it

36
00:02:28,840 --> 00:02:30,370
is clear, right?

37
00:02:30,370 --> 00:02:36,040
So this helps us to distinguish between the normal process, the reset and the reset caused by a washed

38
00:02:36,040 --> 00:02:36,550
off timer.

39
00:02:36,670 --> 00:02:41,590
So this is the first more where we will be adding certain gown to the watchdog timer.

40
00:02:42,790 --> 00:02:46,690
OK, and then it would start counting down as soon as it reaches zero.

41
00:02:46,720 --> 00:02:51,310
If you do not restart the timer, call the system reset, right?

42
00:02:52,030 --> 00:02:54,190
The second mode that we have is a timer.

43
00:02:54,430 --> 00:02:56,440
So whenever counter you just was you.

44
00:02:57,520 --> 00:03:04,360
The event flag is set in an industry does raise history, and if the interests are to in aged 30 is

45
00:03:04,360 --> 00:03:08,440
set, their spending right, so this is what will happen in the time of war.

46
00:03:08,650 --> 00:03:14,790
So this will generate an interest as soon as really just as the other one that we have is and to learn

47
00:03:14,830 --> 00:03:18,520
more so as we discuss a fundamental understanding more on this, right?

48
00:03:19,710 --> 00:03:25,170
Now, if you go through the functions which are provided in the driver, so again, we have a config

49
00:03:25,170 --> 00:03:27,430
structure and an instance structure, right?

50
00:03:27,450 --> 00:03:30,690
So these are exactly similar to what we've been doing from the beginning.

51
00:03:30,690 --> 00:03:36,960
Right along with this, we have a function to check whether washed up timer it expired or not, whether

52
00:03:37,650 --> 00:03:39,240
timer is expired or not.

53
00:03:39,430 --> 00:03:39,780
So.

54
00:03:40,800 --> 00:03:48,810
This to the function that are used to verify whether a timer is expired in and washed up mode or whether

55
00:03:48,810 --> 00:03:50,220
our time is expired in it.

56
00:03:51,260 --> 00:03:58,730
Timer, great, along with this, we also have a function to restart our watchdog timer to load a watchdog

57
00:03:58,730 --> 00:04:02,180
timer with the specified value, depending on the delay that we want.

58
00:04:02,570 --> 00:04:06,520
Then we have a specific function to set the mood right.

59
00:04:06,530 --> 00:04:10,180
So set washed up mode for setting up the washed up mode.

60
00:04:10,190 --> 00:04:11,810
We have an independent EPA.

61
00:04:12,320 --> 00:04:16,410
Similarly, to set up the timer mode, we have an independent API, right?

62
00:04:16,480 --> 00:04:23,330
The other functions which are available to access the register is the gate controlled register in the

63
00:04:23,450 --> 00:04:25,030
second quarter of this year.

64
00:04:25,220 --> 00:04:29,540
So these are the two functions that allow us to work around within register.

65
00:04:29,780 --> 00:04:31,760
OK, then we have an hour to learn more.

66
00:04:32,860 --> 00:04:37,570
OK, and then certain function to start and stop our was lockdown.

67
00:04:37,630 --> 00:04:43,570
OK, so if you analyze we have a look up config and see if judicially right, so these are the EPA is

68
00:04:43,570 --> 00:04:46,770
actually utilizing the previous example also to initialize it.

69
00:04:47,290 --> 00:04:51,620
So what we want to do is we will be declaring a config structure, right?

70
00:04:51,640 --> 00:04:54,520
So we go ahead and we declare the config structure.

71
00:04:54,550 --> 00:04:58,930
Let me just name this as WTT config.

72
00:04:59,320 --> 00:05:04,780
The next thing that we required is an instance such as we just copy this and then let it just need this

73
00:05:04,780 --> 00:05:08,230
as what our favorite remember config section need to be a pointer.

74
00:05:08,410 --> 00:05:12,810
Whereas the instance of journey not to the point, right?

75
00:05:12,820 --> 00:05:17,240
So we go ahead and we declare the function which we refer to as NWA.

76
00:05:17,740 --> 00:05:18,460
Anything?

77
00:05:18,550 --> 00:05:18,930
OK?

78
00:05:19,060 --> 00:05:24,820
And in this specific function will be adding all the function that could be used to initialize our benefit.

79
00:05:24,910 --> 00:05:25,180
Right.

80
00:05:25,570 --> 00:05:28,450
We go ahead and first generate the convict structures.

81
00:05:28,450 --> 00:05:33,850
So how we generate conflicts of tourists, you will be calling a lookup config where you place the device.

82
00:05:34,360 --> 00:05:39,310
So we go ahead and then washed timer config.

83
00:05:39,400 --> 00:05:42,340
OK, this will be close to the lookup config.

84
00:05:42,340 --> 00:05:44,110
Here we need to parse the device.

85
00:05:44,110 --> 00:05:45,700
I write for our time.

86
00:05:45,710 --> 00:05:47,140
That's where you find the device.

87
00:05:47,800 --> 00:05:52,440
You just need to go to an experimental file and look for WD, right?

88
00:05:52,810 --> 00:05:57,260
So you could clearly see all the data are related to a watchdog gamer.

89
00:05:57,310 --> 00:06:03,250
So we just need to copy this device ID from here and we need to add it over here, right?

90
00:06:03,250 --> 00:06:09,160
So once you add the device to the look of config function, this will automatically generate the config

91
00:06:09,160 --> 00:06:09,580
structure.

92
00:06:09,620 --> 00:06:15,460
Now, once we have a config structure, OK, we could call this CFG initialize, and this will help

93
00:06:15,460 --> 00:06:18,420
us to initialize our wash off time up, right?

94
00:06:18,430 --> 00:06:23,390
So we go ahead and do that with three other looking similar to our previous case.

95
00:06:23,410 --> 00:06:27,660
First one is an instance of the next one that we have inside.

96
00:06:28,630 --> 00:06:29,560
Config structure.

97
00:06:30,190 --> 00:06:34,990
And then from a config structure itself, we could invoke the best interest rate.

98
00:06:35,650 --> 00:06:41,200
So these are the three things which are the argument for us of judicial district and the seat is of

99
00:06:41,200 --> 00:06:42,160
an initialization.

100
00:06:42,160 --> 00:06:42,790
So the.

101
00:06:43,860 --> 00:06:49,050
Did you write that, did this study to write, so let me just go ahead and call s32?

102
00:06:49,320 --> 00:06:51,680
They just named it said status, right?

103
00:06:51,720 --> 00:06:55,440
And then we need to verify whether initialization is successful or not.

104
00:06:55,450 --> 00:07:00,360
So if initialization is successful, the tweet, as written will be existing success rate.

105
00:07:00,370 --> 00:07:02,280
So that is what we want to do here.

106
00:07:02,700 --> 00:07:10,910
So if status is existing success, we could mention that washed off time or any successful writer,

107
00:07:10,910 --> 00:07:13,050
the ability to inject.

108
00:07:14,150 --> 00:07:20,540
Successful right ends, as we could just mention the death.

109
00:07:21,840 --> 00:07:22,260
OK.

110
00:07:22,300 --> 00:07:24,060
WTT in it.

111
00:07:26,000 --> 00:07:26,250
Right.

112
00:07:26,320 --> 00:07:32,140
So whenever you are working with an intermediate and complex paper to see that after you perform an

113
00:07:32,140 --> 00:07:33,070
initialization.

114
00:07:33,950 --> 00:07:37,150
I can verify whether initialization is successful or not.

115
00:07:37,540 --> 00:07:43,600
So after that, we also perform a self-test, so this will verify whether hardware is correctly configurable.

116
00:07:44,080 --> 00:07:49,790
So we go to an issue watchdog timer and here we have a function to perform a the state.

117
00:07:49,810 --> 00:07:52,780
So this just required an instance structured as an argument.

118
00:07:53,230 --> 00:07:58,630
So we go in and there's also redundant status, which is the due date victory.

119
00:07:59,050 --> 00:08:01,930
Again, we will be using the status variable.

120
00:08:01,990 --> 00:08:06,460
OK, and in this case, we'll be connecting it to the self-restraint.

121
00:08:06,460 --> 00:08:11,550
So this requires an instant structure, which is WTT and then will again be very fine.

122
00:08:11,980 --> 00:08:16,360
Where there are initialization is successful or not great.

123
00:08:16,370 --> 00:08:22,930
So here the only difference we will be replacing the init with self-destruct.

124
00:08:24,010 --> 00:08:29,530
So these are the two things that we frequently do whenever we work with an intermediate and or complex

125
00:08:29,530 --> 00:08:32,770
peripheral director along with performing initialization.

126
00:08:32,800 --> 00:08:38,050
We also verify whether hardware is correctly configured by performing a self-destruct.

127
00:08:38,050 --> 00:08:39,880
So usually you'll be finding the self-test.

128
00:08:40,240 --> 00:08:42,070
I've been present in almost all the tried.
