2016-12-19 08:24 PM
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-keil2016-12-20 12:32 AM
I would suggest to start debug from the reset vector, and not from main() on.
I suspect the clock settings are failing.
2016-12-20 01:42 AM
Thank you for your suggestion.Can you explain a little bit, how should I start debugging reset vector in Keil? Thanks in advance
2016-12-20 02:41 AM
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...
2016-12-22 09:53 AM
#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 with0x1FFF 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.