Handy info on the Standard Peripheral Library

The Manual!

So I actually spent quite a lot of time searching for the manual for the standard peripheral library (of any series). I forgot about those compiled HTML help files! There's one in every package. Well I found it!! Now what? Open?... Nope... WHY???? After half an hour of painful trial and searching I found how to open it!

Turns out windows 8 (maybe 7?) does not like some of those files. You first need to do 2 things before you can open the file.

Let's see the case for the F0 package (same for the others). You will see in it a .chm file, "stm32f0xx_stdperiph_lib_um.chm". This is the manual. Right click it and go to Properties, once on that window go to Details. There click on "Remove Properties and Personal Information", it should be a light blue text on the bottom (and above "Ok" and "Cancel").

A new window should open and you want to create a copy with all possible properties removed:

And now a copy of the manual should be in the same folder. But your not done yet, it should still not open! Right click it (the copy) and go to properties. In the tab "General" there should be showing in the bottom right the button "Unblock", so unblock the file and your ready to go!

All done, I hope this helps you with your development with STM32!

The F0 Manual Notes

I haven't seen anything similar with other manuals so far but in the F0 manual when you go to search the module for the Timers (TIM) you

won't find any functions in there. Instead they will be in the "STM32F0xx_StdPeriph_Driver" page! (what? why the heck...). You go there by going to "Modules" and you should the page "STM32F0xx_StdPeriph_Driver". I hope it helps you.

Extra notes/tips

If you need extra info like with the structs, a macro or a function I personally really like to consult the source files.

They are very well commented and it's really easy to go through them in most IDEs. The names are intuitive like the GPIO drivers for the F4 are in the "stm32f4xx_gpio.c". If you use the templates it should be easy to find in workspace window in the folder "STM32F4xx_StdPeriph_Driver" (here it's F4, for other series only that should change).

One thing I also like to do, especially since I use examples to get started is to right click and go to definition on a related macro/function. Well if I want to adapt a code from Timer1 to Timer3 then I "right click->go to source" on the Timer1 macros so it takes me to the file containing the macros - this way I find the Timer3 macros.

I do the same for the structs used to config the peripherals. The comments next to each member of the struct tell you @ where are the macros you should use.

Just that for now. If I get the time I will add some more tips. I hope this was helpful and goodbye