1
00:00:03,060 --> 00:00:03,560
Hello.

2
00:00:03,600 --> 00:00:04,500
Welcome back.

3
00:00:04,500 --> 00:00:09,100
So in this lesson we shall take a look at the clock configuration tab.

4
00:00:09,240 --> 00:00:12,110
So we just click here to configure the clock.

5
00:00:12,390 --> 00:00:16,680
So as you can see it gives the clock free of our microcontroller.

6
00:00:16,680 --> 00:00:22,710
And over here we can change the frequency for our power flows and other component.

7
00:00:22,710 --> 00:00:27,390
So the default clock is set for us is 96 megahertz.

8
00:00:27,870 --> 00:00:33,480
However over here it states that we can push it up to 100 megahertz.

9
00:00:33,480 --> 00:00:41,070
And when we said this clock over here then it's reconfigured or the various peripheral buses clocks

10
00:00:41,070 --> 00:00:43,830
for us automatically lessee.

11
00:00:43,950 --> 00:00:46,200
That's 96 megahertz.

12
00:00:46,200 --> 00:00:47,800
Now it could be one time a clock.

13
00:00:47,820 --> 00:00:49,280
It's 48 megahertz.

14
00:00:49,650 --> 00:00:55,930
So we have some time is connected to a TV one hour APB one pair for clocks is twenty four megahertz.

15
00:00:55,980 --> 00:00:58,800
This where our chip you put the is connected.

16
00:00:58,890 --> 00:01:05,940
So these buses are connected to different peripherals and we can change the clocks set in here as well.

17
00:01:06,030 --> 00:01:12,090
Let's say I want my APB one time up clock to be higher than 48.

18
00:01:12,150 --> 00:01:18,600
Let's see what we could push it to 60 I could just hit 60 here and hit enter and then reconfigure it

19
00:01:18,600 --> 00:01:19,390
for me.

20
00:01:19,710 --> 00:01:25,200
And then once this is reconfigured affects other things as you can see it's changed this frequency here

21
00:01:25,610 --> 00:01:27,330
to 60 megahertz for me.

22
00:01:27,420 --> 00:01:35,080
So let's say I want to run my system very very low power let's say I want to push the clock to 10 megahertz.

23
00:01:35,160 --> 00:01:41,730
Sometimes when you put a clock value that the system might experience problems operating on it gives

24
00:01:41,730 --> 00:01:43,800
you some red indication as to show you.

25
00:01:43,830 --> 00:01:44,910
That's no good.

26
00:01:44,910 --> 00:01:49,070
So let's say we want to run the system at 10 megahertz.

27
00:01:49,110 --> 00:01:49,440
OK.

28
00:01:49,440 --> 00:01:50,270
That's the works.

29
00:01:50,280 --> 00:01:57,360
I can get APB one operates in a five megahertz APB one time or ten megahertz.

30
00:01:57,360 --> 00:02:00,330
Let's say I just put a ridiculous value here.

31
00:02:00,330 --> 00:02:07,470
That's up for a 1 megahertz file like this industrial works.

32
00:02:07,600 --> 00:02:08,310
So yeah.

33
00:02:08,350 --> 00:02:08,650
Yeah.

34
00:02:08,650 --> 00:02:15,300
The clock configurations and the bit that is grayed out indicates components we know using we know using

35
00:02:15,310 --> 00:02:20,800
the MCO for instance therefore it is great out we cannot forget that we know using a real time clock.

36
00:02:20,800 --> 00:02:24,100
So it's also great out to to demonstrate this.

37
00:02:24,100 --> 00:02:30,310
Let's just go and initialize our real time clock and then play with the real time clock tree over here.

38
00:02:30,310 --> 00:02:39,070
So I'll come back to point out and then I'll look for my RTC it's over here a click activate real time

39
00:02:39,070 --> 00:02:46,830
clock activate calendar I use an internal alarm a and then I used in turn Ireland B as well.

40
00:02:46,870 --> 00:02:48,750
Now let's go to the clock tree.

41
00:02:49,030 --> 00:02:51,650
As you can see this is active now.

42
00:02:51,670 --> 00:02:56,470
Now we can change to pre-schooler that goes to the real time clock because we are using the real time

43
00:02:56,470 --> 00:02:57,020
clock.

44
00:02:57,130 --> 00:03:06,000
And in fact we can choose the clock source whether we want it from LSI or HSV so this this the the benefit

45
00:03:06,000 --> 00:03:11,070
of the clock tree but most of the time where you're going to be using the clock tree for is to just

46
00:03:11,070 --> 00:03:12,840
change the value in the middle here.

47
00:03:12,840 --> 00:03:19,410
This is your system run in frequency and often you might want to hit it to the maximum if you're running

48
00:03:19,650 --> 00:03:25,860
DSP application and some other power or frequency hungry firm was.

49
00:03:25,890 --> 00:03:32,110
So if we put it 100 we get a hundred for our timer we get 50 for our peripheral clocks.

50
00:03:32,430 --> 00:03:37,080
And it's very good and when you generate that code it sets the frequency others frequency you've chosen

51
00:03:37,080 --> 00:03:37,930
over here.

52
00:03:37,950 --> 00:03:41,250
So this is this a very short tutorial on the clock tree.

53
00:03:41,310 --> 00:03:47,170
We can also choose the clock source whether we want high speed internal or high speed extend or PLO

54
00:03:47,190 --> 00:03:53,280
clock from here let's say choose over here when I choose over here my options are limited as you can

55
00:03:53,280 --> 00:04:00,850
see my clock here has dropped to eight if I choose high speed internal there's an optimal value the

56
00:04:00,850 --> 00:04:07,330
high speed Internet gives me sixteen megahertz by default let's see how much I can push the upper 100

57
00:04:07,360 --> 00:04:14,280
here and hit enter and thus impossible no solution found of course.

58
00:04:14,740 --> 00:04:23,830
So we use the PLO most of the time and if there is no solution you can tell the system to provide the

59
00:04:23,830 --> 00:04:24,900
best solution for you.

60
00:04:24,910 --> 00:04:25,830
Let's do that again.

61
00:04:25,840 --> 00:04:31,690
High speed internal push it to 100 megahertz a hit enter.

62
00:04:31,690 --> 00:04:35,260
It tells me no solution found using the current selected sources.

63
00:04:35,290 --> 00:04:37,250
Do you want to use other sources.

64
00:04:37,270 --> 00:04:43,140
If I click OK it would choose the PLO for me and it's chosen the PLO and I'm still good.

65
00:04:43,150 --> 00:04:46,240
So this is all there is to the clock configuration.

66
00:04:46,330 --> 00:04:52,240
If you have any questions or if you need further elaboration do leave me a question below or send me

67
00:04:52,240 --> 00:04:54,700
a message and I will see you in the next lesson.
