After writing many tutorials about LPC2148, I decided to write few for STM32 microcontroller. I bought a Nucleo STM32f401RE board. It cost me 1500 INR (around 23 $). This is cheap and yet very powerful.
This is a 32 bit cortex-M4 device with
- 8 MHz oscillator, can be clocked up to 84 MHz
- 512 KB of Flash Memory
- 96 KB of SRAM
- inbuilt RTC, temperature sensor and many more
- mini usb can be used to program and debug. so additional debugger is not required.
You can check datasheet for more info.
Although STM32 devices are great but the only problem with them is when it comes to programming. Register based programming is not easy, because clock setting is very messed up, and there aren’t any reliable libraries. ST microelectronics provides HAL libraries but that is also not so good. Nevertheless I am going to use HAL libraries as they are officially supported by ST and also it have a good community support.
So before starting the programming part, you need to install few things. I am using KEIL uVISION 5 for coding, STM32cubemx to generate code and STM studio is for observing variables during debugging.
1.) First you need to set up keil.
Click on software pack
Next select the board, type in your board name and install all the packs.