Skip to main content


Showing posts from March, 2020

STM32 Documents Every Programmer Needs.

I dedicate this post to anyone on YouTube who has ever asked me to send them the datasheet or reference manual. Please make an effort and Google it , I promise you will find it. But if you dont then here they are.

As the years pass I notice STMicroelectronics has changed how they handle the documentation for their products. For example in the older STM32F1 series reference manual (RM)  there is no talk about the FLASH registers and instead the RM tells you to seek out the Programmers Manual (PM). While the new G0 series has the FLASH registers fully documented in its RM.

So here is a list of documentation every STM programmer should have.

The Reference Manual Denoted as RMxxxx where x is some number, for example STM32F1 is RM0008 This is by far the most important document in your arsenal and the one you will visit the most. It defines all peripheral registers as well as their respective bits. The RM also highlights different operation modes for your device and its peripherals.  Provid…

Changing the Clock Frequency STM32F1 via Registers

For the most part a lot of us tend to run the microcontroller at it's max clock frequency because what is the point of having a 100 MHz microcontroller only to run it at 1 MHz? Well the most obvious answer is POWER! But there is also the less often considered concept of stray capacitance and inductance which increases in high speed circuits. But then again the high speed signals are all inside your microcontroller, right? Well yes but your microcontroller is not immune to the above phenomena. However that could be a post all of its own and I might get around to doing that. But enough chatter if you are here it is because you want to know how to change the System Clock of your precious blue pill like a real champ and not by clicking buttons in CUBEMX. I will however use CUBEMX for visual representation of what is going on because it helps visualize the clock tree a bit less daunting than the RM. 
First I want to list the steps required to accomplish the task at hand as well as sho…