cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L476, application not running. Help needed for debug?

MD SABBIR BIN ZAMAN
Associate II
Posted on December 20, 2016 at 05:24

I was working with STM32L476RGT6. The IDE used for programming was Keil and initialization was done by stm32cubemx. I was using stm32L4 discovery kit to externally program the MCU and STLINK was connector was removed. Everything was working fine until I had to reinstall Windows in my computer. After that, I installed Keil again, stm32cubemx again. But when I download program to flash, keil shows successful download and application running. Nothing changes in my MCU, I even tried led blinking to one of my output pins. When I debug, I found I see nothing working on the CPU. Even when I press the reset cpu, I attached the ST-Link Debugger Setting. I am clueless now. Please help? I will provide more info if you need. I resoldered the mcu with a new because I thought my first mcu might be dead.

#debug #stm32l4 #stm32cubemx #stm32-keil
4 REPLIES 4
AvaTar
Lead
Posted on December 20, 2016 at 09:32

I would suggest to start debug from the reset vector, and not from main() on.

I suspect the clock settings are failing.

Posted on December 20, 2016 at 09:42

Thank you for your suggestion.Can you explain a little bit, how should I start debugging reset vector in Keil? Thanks in advance

AvaTar
Lead
Posted on December 20, 2016 at 11:41

Sorry, I don't have (or use) Keil uVision.

It is supposed to have a good help (F1) and tutorials.

You're ought to know your tools...

MD SABBIR BIN ZAMAN
Associate II
Posted on December 22, 2016 at 18:53

#Solved

The problem is solved. The time MCU was originally working because the 20K resistor connected to Boot0 pin was not soldered previously-which I figured out later from reference manuak. The Boot mode was then selected as Main Flash memory (RefManual 

RM0351- Page 76

). But later I soldered the 20K which was a pull up resistor, This changed the Boot mode to System Memory (

0x0000 0000

aliased with  

0x1FFF 0000

), since my application program is not in System Memory, it did not perform the application and never got into the main function. So I removed the resistor from PCB to make it work back again and boot from Main Flash Memory.