cancel
Showing results for 
Search instead for 
Did you mean: 

stm32f103

kiran2
Associate II
Posted on September 15, 2015 at 06:39

hi ,currently i am using stm32f103 device for my project.i am facing unique issue with device is that my application works perfectly when i use in debug mode (using jtag) and in standalone mode it just does not work .i am also using iar workbench 7.3 and go went through iar forum where i found one solution to this problem adding suitable delay after main so that clock pll get suitable time to initialise.so i did the same but unfortunately did not worked for me.is there any hardware side issue possible??please help me out. as i am in urgency.

clock setting : 48mhz internal oscilator

thanks in advance

#stm32 #stm32f103 #stm32f103rct6
8 REPLIES 8
matic
Associate III
Posted on September 15, 2015 at 07:22

I used the same MCU, but never had such problems (with Keil). Maybe we can help you find an issue, if you post your code.

kiran2
Associate II
Posted on September 15, 2015 at 11:11

hi.thanks for prompt reply.my code size is big cant post whole code here.would be better if you provide mail id so that i can mail you.

thanks

Amel NASRI
ST Employee
Posted on September 15, 2015 at 12:05

Hi kadam.kiran,

It is difficult to help you efficiently as we don't know how exactly ''your application doesn't work''?

May be you are using some pins (mainly GPIOA and GPIOB) for which clock isn't enabled?

-Mayla-

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Posted on September 15, 2015 at 15:13

The debugger can enable clocks, and features it needs. Make sure you explicitly enable all the clocks you are using.

If it's a delay issue, look very carefully at you external clocks sources, that they start promptly, and don't time out, and similarly that the PLL starts and locks. Look for error handling cases, and if they stick in while(1); loops. Consider using GPIO/LEDs to identify where it gets, and where it sticks.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
kiran2
Associate II
Posted on September 16, 2015 at 07:25

hi clive,all clocks settings initialised properly . i have cross checked twice with st's example source code.infact the way you said to debug by putting led for toggling . i did it same just after clock initilisation completed in main  but did not work.led did not glow .i dont know if controller properly resetting or not.even checked reset logic and its ok . now i dont how should i proceed ??

Posted on September 16, 2015 at 18:09

Well looking at the software's only going to tell you one side of the story.

Make sure the NRST pin is not driven externally by a push-pull driver of any kind. Observe the state of the NRST in the failing case. Observe also the state of the BOOTx pins at reset. These should be pulled low to ensure it enters your code when it starts.

Make absolutely sure external clocks start in a timely fashion, and don't result in error/timeout paths being taken in the SystemInit() related code within system_stm32f1xx.c

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
kiran2
Associate II
Posted on October 07, 2015 at 18:03

Hi clive1,i have configured my systick for 1ms.it works good after initialisation point but once application takes control my systick gets disturbed .may i know what could be reason because of which systick causing this sort of issue?

please need your help at ealiest as i stuck in middle .

thanks in advance

Regards,

kiran kadam

Posted on October 07, 2015 at 18:09

From the description I don't really have any idea what's going on. Does the interrupt stop, change speed? Are you stuck in an interrupt, or spending >1ms doing what you should be completing in less than that?

Think about how you present the problem, the conditions, symptoms, etc.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..