Oferta de
Mastering STM32 Beginner's Guide: A Practical Guide to Real-Time Embedded Programming, Clock Setup, LED Blinking and More with Registers (English Edition)
Mais ofertas de Generico
Sob Consulta
* Confira sempre o valor atualizado antes de efetuar a compra.
Mais informações da Oferta
Mastering STM32 Beginner's Guide: A Practical Guide to Real-Time Embedded Programming, Clock Setup, LED Blinking and More with Registers (English Edition)
✔We will see how to set up the clock and that's why this project is going to be very long. There are no shortcuts here some registers and values might be different for your controller and that's why you need to see the entire process I will use Kyle for these tutorials.
✔let's open the pack install of first type your MCU name and let it refresh the database now you need to install the DFP pack from here that will be all you need also make sure the compiler is updated I already have them installed and updated go to Project and create a new project give the name to this project and click Save Search for your device here we only need to include the core file and startup file from here.
✔Here is our project let's add the main file to this first of all include the device specific file this file have all the registers IRQ predefined in it now I am going to create a main function and a while loop inside it. Let's create a function where we will configure the clock and here are the steps that I am going to follow.
✔First we need to enable the external crystal and wait for it to become ready. Then enable the power and configure the voltage regulator. Next we need to configure the flash related settings then configure the pre scalars for peripheral clocks.
✔then configure the PLL then enable the PLL and finally select the PLL as the clock source we will cover all these steps one by one let's also open the cube MX for the reference I am selecting external crystal for the clock. I will configure for the maximum clock here because I always prefer it and this way I can keep the same settings for the other programs too. We will come back to this once we start programming let's start with the first step.