 Now we will move to our clock tree top then on the left side You can you can see our clock sources The blue one are the active. There is the high speed internal oscillator here set for the 16 megahertz and Low speed internal RC oscillator here set for the 32k kilohertz Be careful these values can be different for each microcontroller and also number of the clock sources for example the L devices have also the multi-speed internal oscillator G don't have here We have here also some additional clock sources like the high speed external oscillator and Low speed external oscillator, but you can see they are gray. This means they are not active But if we hold the mouse there Usually the cube emics trying to help us and he advice us to enable the IP in the RCC Pinout tap then if we want to external oscillator we can here move to the pinout We find the RCC periphery And we enable the external sources here as a crystal Here also the low speed you can see in the pinout the pins was automatically assigned to the Oscillators In return now, you can see the external clock sources are now blue then we can use them For the low speed external we cannot change the frequency because this is usually fixed to have the one second precision But the high speed we can also here set the correct value On our nuclear kit in case you have the nuclear kit like me. I know that there is the external signal There is no no k-style or the oscillator, but the signal then with the frequency 8 megahertz that in case we will use the external one we can use the external 8 megahertz value Now what we can see more we can see that we have here also the multiplexers Then we can set the source code For the different part of the core here for example for the system clock I can set also the High-speed external so that you can see here the value was immediately change or the Internal high-speed oscillator And also I can set here the PL PL block now Can if I select here the PL you can see the something is wrong if I point here the mouse You can see the maximum frequency can be here can be here only the 80 For megahertz, then I need to change something Then the PL I think you definitely know the PL PL is used for the For the multiplying the fragrances in the STM32 we have one two three or more PLs with one two or three outputs Then what we can set Here before the PL we have usually need to set the clock source here I can use the external external High-speed oscillator You can see again something is wrong He telling me that the frequency must be higher than 0.95 megahertz and Equal or smaller Then 2.1 megahertz then for the better computation. I here set the 8 to have 8 megahertz on the input Divided by 8 then here it's input 1 megahertz multiplied by 192 and Divided here by 2 which goes into the into the core Then here I definitely need to set something which will be equal to the 84 Which will be for example 168 if I am right Yes, and you can see now the frequency is correct Then this helped me with the with the selection or the Settings the clocks But it's not not the all You can also set the divider for the AHB bridge then after this a HB bridge on the on the right side You can see what is the destination of this clock source For the after a HB bridge pest killer, you can see there are the HCLK Value and this value now divided on the band 1 is used for the AHB bus for the core for the memories and for the DMA Then this helped me to discover what will be my core frequency then this is it's this first value Then we can see the second value. It's also the cortex Cystic timer which can be set also for the different frequency can be also divided by 8 it's the core Timer which is always Embedded inside the core with the arm and it's used mainly for the for the keeping The ones millisecond time base usually for the free air-to-air system the FCLK clock I use for the floating point subsystem Which is embedded inside the core usually M core M4 cores and the M7 have this signal You cannot change it. It must be on the same frequency as the core on the different cores like the M0 M3 you not find this this signal But most important, I think is the APB APB bridges You can see the APB 1 bridge is set incorrectly. Why? Because here is written the maximum frequency Maximum frequency you can check also in the in the datasheet Then here is 42 then I can set here 42 See everything is okay the APB Bridge also provides the PCLK clock one This clocks are used for the all pay files, which are connected to the APB 1 bridge But not all the pay files except the timers because the timers have the separated clock source You can see in this case are multiplied by 2 then the timers can run on the same frequency as the core It's a very very good in case you have very precise application Which need to have very precise timers And the APB 2 you can see the maximum frequency of the APB 2 is a little bit different It's here again the 84 megahertz Then the pay files which are on the APB 2 can run on the same frequency as the core This is not valid for the or all microcontrollers Depend which one you which do you have if you have the F401 like me It will be valid the 84 and you can see the timers are here multiplied only by with the one In case that I divide here the the frequency by 2 here the timers are automatically Multiplied by 2 on the same frequency But the 2 is maximum for the timer Multiplication is done about automatic if the pescala is different from 1 It's automatically multiplied then in case you have 4 then 2 is the maximum for the for the timers