cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L0 vs STM32F0 programming (can't get L051K8 to function after reset)

JLee.161
Associate III

Hi all,

I'm currently using STM32F051K8 for a smartwatch project I'm pursuing on a custom made PCB. For power consumption reasons, I wanted to change the MCU to STM32L051K8 which has the exact same UFQFPN-32 footprint.

Now, my project works perfectly fine using the F051K8, but I cannot get Keil to program L051K8 correctly. I've swapped the bypass capacitor correctly and 3.3V is workable for both MCUs.

So I have even tried a simple LED blink program, in which Keil works correctly to program the F051K8, but cannot program L051K8.

The funny thing is, the build works without any errors, and loads up to the board without any errors, but after a reset, the L051K8 does not seem to run the application

I've used cubeMX to build the skeleton project, then I used Keil to write out the rest of the firmware code.

Is there anything I should change on the firmware for using the L051K8 instead of F051K8? I have very limited knowledge on heap and stack and memories and all that which is making it very difficult to find any solutions with a google search...

Any help or guidance is much appreciated, thank you!

1 ACCEPTED SOLUTION

Accepted Solutions

Hi Imen, thanks for the suggestion, but I don't think there was a problem there (as I was just building a fresh GPIO test application).. I think I found my solution on the BOOT0 pin of the UFQFPN32 package...

In the STM32F051K8, I was able to get by without pulling down the BOOT0 pin to GND, and this still managed to boot up to flash after reset.

For STM32L0 series, BOOT0 pin must be pulled down to GND for correct boot up.

I suppose it was my fault from the start that I didn't pay attention to the BOOT0 pin though...

View solution in original post

2 REPLIES 2
Imen.D
ST Employee

Hello,

The AN4617 Application note Migrating between STM32F0 and STM32L0 microcontrollers, would be a very helpful guide for you to properly and easy migrate from STM32F0 to STM32L0 MCU with details on the hardware, peripheral and firmware migration.

> So I have even tried a simple LED blink program, in which Keil works correctly to program the F051K8, but cannot program L051K8.

Follow the instruction described in the readme.txt file, check your pin configuration and ensure that the SysTick time base is always set to 1 millisecond and

Best Regards,

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

Hi Imen, thanks for the suggestion, but I don't think there was a problem there (as I was just building a fresh GPIO test application).. I think I found my solution on the BOOT0 pin of the UFQFPN32 package...

In the STM32F051K8, I was able to get by without pulling down the BOOT0 pin to GND, and this still managed to boot up to flash after reset.

For STM32L0 series, BOOT0 pin must be pulled down to GND for correct boot up.

I suppose it was my fault from the start that I didn't pay attention to the BOOT0 pin though...