2016-06-20 07:08 AM
[Stm32F103] I can programm flash with ST-LINK utility, but program does not start. Also Keil can't run debug. Keil can programm flash, but stm does nothing. Internet search returned no results.
2016-06-20 07:16 AM
> I can programm flash with ST-LINK utility, but program does not start.
That is basically just an assumption. Quite possibly, your program crashes quickly, before it can indicate any activity (like LED blinking of serial output). Perhaps it gets stuck in the clock initialization, or hardfaulting in peripheral initializations. Some debugging would be in order - or you post some code, so some one can check it for obvious errors.> Also Keil can't run debug.
Have you rededicated the JTAG/SWD pins ? That would surely exclude the debugger.
2016-06-20 07:47 AM
I write the easiest code:
GPIO_InitTypeDef GPIO_TEST;
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, ENABLE);
GPIO_TEST.GPIO_Pin = GPIO_Pin_4;
GPIO_TEST.GPIO_Mode = GPIO_Mode_Out_PP;
GPIO_TEST.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_Init(GPIOA, &GPIO_TEST);
while(true)
{GPIO_SetBits(GPIOA, GPIO_Pin_4);
GPIO_ResetBits(GPIOA, GPIO_Pin_4);
}
Oscilloscope silent on this pin.>Have you rededicated the JTAG/SWD pins ? That would surely exclude the debugger.I use programmer from STM32L152 Discovery. Connection occurse via SW. Used SWCLK, GND, SWDIO, NRST. All pins connected correctly, because debug in Keil worked until now.
2016-06-20 08:14 AM
Uncheck ''run to main'' and debug from the Reset_Handler on in. Check what the code in SystemInit() is doing as this runs before your code in main(). Stop the code in the debugger to understand where it is stuck.
Makes sure it verifies what is downloaded, and you don't have the BOOTx pins set oddly. Trying doing a full erase of the device.2016-06-20 08:49 AM
I can't get into the debug. Look at it.
http://i67.tinypic.com/dpwzkk.jpg2016-06-20 10:23 AM
What did you change since it was last working properly?
Open a Memory view of 0x08000000 and confirm you have a valid vector table there.2016-06-21 08:53 AM
>What did you change since it was last working properly?
I tryed start debug session, but it worked uncorrectly (microcontroller is worked yet). Then I tryed erase and reprogramm flash. Then it stopped working as before.