AnsweredAssumed Answered

STM32F103C8 Can't go main()?

Question asked by Carter Lee on Sep 15, 2017
Latest reply on Sep 15, 2017 by AvaTar

 Hi.  

I've got a new custum-board STM32F103C8 from device mart.

 

http://www.st.com/content/ccc/resource/technical/document/datasheet/33/d4/6f/1d/df/0b/4c/6d/CD00161566.pdf/files/CD00161… 

 

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:07

 

Then I've set up with  GPIO's IOToggle example code in STM32F10x_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.

 

fig10. This is the first time what I've push the "start debugger session button"

fig11. This is screenshot after figf10 with F5 button.

 

But as you can see the fig11,  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.

 

 



/* 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.

Outcomes