2015-08-12 11:39 PM
1. I am using STM32F205, with serial wire debug, composing reset, clk, data & gnd pins.
2. Whenever I connect debugger my code runs perfectly. But without debugger, sometimes code just don't run. I am toggling a pin which never happens. it happens only sometimes.3. No other clk init is done, so default 16Mhz clck, as soon as MCU power up, I keep on toggling pin. No code in between so couldn't be memory access other or anything. So pin toggle.3. I have 0.1uf cap on reset pin & 10k pull down on boot pins.4. However I have left swclk & swdata pins float.5. I had checked below link & connected 10k pull down to clk & 10k pull-up to data.http://support.code-red-tech.com/CodeRedWiki/HardwareDebugConnections6.Code is running now. I will check multiple times before reaching conclusion, but any idea on this. #wait-for-you--clive1-!-!-! #wait-for-you--clive1-!-!-!2015-08-13 05:27 AM
How does your design treat the BOOT0 and BOOT1 pins?
2015-08-13 06:45 AM
Hi,
It seems like you execute from RAM, can you please check the boot pins configuration.-Syrine-2015-08-13 08:39 AM
How does your design treat the BOOT0 and BOOT1 pins?
Nevermind, I see you mentioned them now.A pull-up on NRST? What address are you building the code for? Do you have a (partial) schematic for how the STM32F2 circuit is built?2015-08-14 12:37 AM
1.
there is also 10K pull-down to boot0 pin so code should enter flash rather than RAM.
2.In reset network, R is internal to STM32F205 as datasheet mentions, I have only 0.1uF external capacitor to it.
3.From yesterday, problem has arrived only once. When MCU failed to start.
4.1. Load is around 50mA. I have bypassed the supply properly & checked in CRO, till now no issues.
5. Problem is pin never toggles.I have disabled systeminit() code by pacing a return at first line. But when MCU fails then pin remains high(default state high impedence).
That means control never enter main.2015-08-14 02:44 AM
1. I had same problem in two boards.
2. In one of board, again same problem came, & I had noticed that reset pin is low (which is bypassed by 0.1uF).3. I have checked all VDD & VSS pins on CRO, all are ok.4. Additionally i had connected two 10pf caps on pins PH0-OSC_IN , PH1-OSC_OUT. However no oscillator is connected since i am using internal oscillator. They were soldered during soldering process at that I don't have oscillator. Right now i am using internal oscillator.5. Pin sequence of MCU is: PH0-OSC_IN(5) , PH1-OSC_OUT(6) , & NRST(7)6. however datsheet says on power up , oscillator pins are default to GPIO.7. So could this be problem? 8. Right now I have removed these caps, & board is working again. but I am not sure.2015-08-15 11:47 AM
1. Again problem arises. I had checked that reset pin voltage output is low.
Don't know why it so. So code never runs, as MCU is in rese state always. What can lead to hardware reset pin to logic, provided there is only 0.1uF cap across it.& 0.1uF is of 16V. 2. I have changed that 0.1uF cap also, in 1 board problem gone, while in other problem still remains. I have checked that removed 0.1uF cap, it is showing correct value in DMM.2015-08-15 12:36 PM
The NRST being low is indicative that the analogue supply is not connected. The analogue supply controls the POR, OSC and PLL.
You should also see 1.25V on the VCAP pins. When you don't see these you need to double check supply and orientation issues. Doesn't sound like an orientation issue here. I would recommend double checking your soldering (shorts/opens), grounds and supplies.2015-08-16 01:19 AM
2015-08-16 06:53 AM
Do you have a schematic for this? Is it a break-out board, or do you have other parts connected?
Does the behaviour change if you have a 10K pull-up in NRST? Does the behaviour change if you pull-up BOOT0 instead of having it low?