2020-05-10 10:32 PM
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!
Solved! Go to Solution.
2020-05-14 02:11 AM
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...
2020-05-11 12:20 AM
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
2020-05-14 02:11 AM
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...