BLOG

 

Usually, you just get very comfortable with a microcontroller like a PIC, AVR or MSP430 and you don't explore other options. The general idea is that the learning curve for ARM processors is quick long and you will need some tools(expensive) to develop and program like Keil. 

I just came across the STM32L0 series and gave it a try. Keil is known to be free when your program is below the 32k limit. Fortunately, if you use an STM32L0 series Keil will be FREE check here. 

 

So I gave It a try and was going to literally eat the datasheet to start learning. Then I came across STMcubeMxModern MCU's the pinout can be very hard to digest since each pin can serve up to different functions, it could be just GPIO, or I2C or SPI or UART. STMcubeMX will allow you to graphically choose the function for each pin and it will be at the same time telling you that if you chose that pin to be GPIO now you cannot use I2C bus #1. So this is a pretty slick tool.

 

 

After you are done configuring you GPIO, Clocks and Interrupts, you can just generate the code and the tool will create you a folder with a Keil project that you just open and It will be already configured how you put it on cubeMx.

 

Now your ide is ready you didn't need to configure anything and you are ready to program. You will use to use STM32 HAL drivers and you can find some info online about it. For example, to turn on a pin and and add a delay you will use this:

 

HAL_GPIO_WritePin(GPIOB,PwrKey_Pin,GPIO_PIN_SET);
HAL_Delay(1000);

 

To end this post I would like to invite you to get one of the STM32L0 Nucleo kits and play with it. They are low power and they can sleep consuming less than 1uA making them ideal for IoT development.