Hello.
Welcome back.
So in this lesson we shall take a look at the clock configuration tab.
So we just click here to configure the clock.
So as you can see it gives the clock free of our microcontroller.
And over here we can change the frequency for our power flows and other component.
So the default clock is set for us is 96 megahertz.
However over here it states that we can push it up to 100 megahertz.
And when we said this clock over here then it's reconfigured or the various peripheral buses clocks
for us automatically lessee.
That's 96 megahertz.
Now it could be one time a clock.
It's 48 megahertz.
So we have some time is connected to a TV one hour APB one pair for clocks is twenty four megahertz.
This where our chip you put the is connected.
So these buses are connected to different peripherals and we can change the clocks set in here as well.
Let's say I want my APB one time up clock to be higher than 48.
Let's see what we could push it to 60 I could just hit 60 here and hit enter and then reconfigure it
for me.
And then once this is reconfigured affects other things as you can see it's changed this frequency here
to 60 megahertz for me.
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.
Sometimes when you put a clock value that the system might experience problems operating on it gives
you some red indication as to show you.
That's no good.
So let's say we want to run the system at 10 megahertz.
OK.
That's the works.
I can get APB one operates in a five megahertz APB one time or ten megahertz.
Let's say I just put a ridiculous value here.
That's up for a 1 megahertz file like this industrial works.
So yeah.
Yeah.
The clock configurations and the bit that is grayed out indicates components we know using we know using
the MCO for instance therefore it is great out we cannot forget that we know using a real time clock.
So it's also great out to to demonstrate this.
Let's just go and initialize our real time clock and then play with the real time clock tree over here.
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
clock activate calendar I use an internal alarm a and then I used in turn Ireland B as well.
Now let's go to the clock tree.
As you can see this is active now.
Now we can change to pre-schooler that goes to the real time clock because we are using the real time
clock.
And in fact we can choose the clock source whether we want it from LSI or HSV so this this the the benefit
of the clock tree but most of the time where you're going to be using the clock tree for is to just
change the value in the middle here.
This is your system run in frequency and often you might want to hit it to the maximum if you're running
DSP application and some other power or frequency hungry firm was.
So if we put it 100 we get a hundred for our timer we get 50 for our peripheral clocks.
And it's very good and when you generate that code it sets the frequency others frequency you've chosen
over here.
So this is this a very short tutorial on the clock tree.
We can also choose the clock source whether we want high speed internal or high speed extend or PLO
clock from here let's say choose over here when I choose over here my options are limited as you can
see my clock here has dropped to eight if I choose high speed internal there's an optimal value the
high speed Internet gives me sixteen megahertz by default let's see how much I can push the upper 100
here and hit enter and thus impossible no solution found of course.
So we use the PLO most of the time and if there is no solution you can tell the system to provide the
best solution for you.
Let's do that again.
High speed internal push it to 100 megahertz a hit enter.
It tells me no solution found using the current selected sources.
Do you want to use other sources.
If I click OK it would choose the PLO for me and it's chosen the PLO and I'm still good.
So this is all there is to the clock configuration.
If you have any questions or if you need further elaboration do leave me a question below or send me
a message and I will see you in the next lesson.