2017-09-14 10:17 PM
Hi.
I've got a new custum-board
https://www.keil.com/dd2/stmicroelectronics/stm32f103c8/#/eula-container
from device mart.
This is connected Ulink2 for debugging.
I've just checked Ulink2 and board can be connected and success write flash.
Build target 'STM3210C-EVAL' ''.\STM3210C-EVAL\STM3210C-EVAL.axf'' - 0 Error(s), 0 Warning(s). Build Time Elapsed: 00:00:00 Load ''C:\\work\\en.stswtm32054\\STM32F10x_StdPeriph_Lib_V3.5.0\\Project\\STM32F10x_StdPeriph_Template\\MDK-ARM\\STM3210C-EVAL\\STM3210C-EVAL.axf'' Erase Done. Programming Done. Verify OK. Flash Load finished at 13:43:07Then I've set up withGPIO's IOToggle example code inSTM32F10x_StdPeriph_Template .
But can't step through code.
What am I supposed to do to resolve this problem.?
fig1.
fig2.
fig3.
fig4.
fig5.
fig6.
fig7.
fig8.
fig9.
fig This is the first time what I've push the ''start debugger session button''
fig This is screenshot after figf10 with F5 button.
See Attachements 20569But as you can see thefig11, there is no movement
I think it's not going to main() from startup and i've also defined USE_STDPERIPH_DRIVER, STM32F10X_CL, USE_STM3210C_EVAL,HSE_VALUE=8000000
--update
I think I found the point of problem.
See Attachements 20575 /* Wait till PLL2 is ready */ while((RCC->CR & RCC_CR_PLL2RDY) == 0)//<===STUCK HERE
{ }But I still don't know how to resolve this problem.
2017-09-14 10:54 PM
There is obviously a 'run to main()' enabled in the debugger settings.
I have no Keil uVision installation, so I can't tell you the exact dialog/location.
Disable it, and you can step into the reset vector.
I guess either the memory initialization fails (wrong startup ?), or the clock initialization in SystemInit() fails.
2017-09-15 01:11 AM
Thanks but I've checked the 'run to main'. but it still does not work.
Now, I'm using 'startup_stm32f10x_cl.s' file from C:\work\en.stsw-stm32054\STM32F10x_StdPeriph_Lib_V3.5.0\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\
What am I missing? should I have to add something or fix?
2017-09-15 03:28 AM
Thanks but I've checked the 'run to main'.
This statement is a bit ambiguous.
You need to un-check any 'Run to main()', to debug the initialization after reset.
while((RCC->CR & RCC_CR_PLL2RDY) == 0)
//<===STUCK HERE
This means that either your configuration is wrong, (perhaps an incorrect multiplier, resulting in an un-achievable clock frequency), or there is something with the quartz. Either not present, not working, or of a wrong frequency.