cancel
Showing results for 
Search instead for 
Did you mean: 

F407VET6 not entering code - left nRST floating by mistake

siegelj
Associate II
Posted on December 30, 2014 at 04:46

I goofed, big time. I'm new to the STM32F and I didn't follow the STM32F4 discovery schematic. I built a board that I wanted to power up from flash, and while I remembered the BOOT0 setting (GND), I left nRST floating.

I can use SWD to program the board, but simply applying power doesn't start the code execution. If I use the ST-LINK software, I can manually start the code running by forcing a system reset.

I understand there is an internal pull-up on the reset pin, but do I need to configure it? Is the 100nF capacitor required for self-start execution? I had a few PCBs made, so if there's a software-only solution I can test (short of forcing a reset with the ST-LINK each time), that's much appreciated as well.

Thank you!
8 REPLIES 8
siegelj
Associate II
Posted on February 03, 2015 at 17:14

Thanks for all your help, though I am still unable to start the PCB without the ST Link. A simplified schematic appears here:

http://imgur.com/eNiqW8w

The startup code I am using is the standard uVision start_stm32f4xx.s:

[code]

; Reset Handler

Reset_Handler   PROC

                EXPORT  Reset_Handler             [WEAK]

                IMPORT  SystemInit

                IMPORT  __main

                LDR     R0, =SystemInit

                BLX     R0

                LDR     R0, =__main

                BX      R0

                ENDP

[/code]

I understand that a solution might be to add a 0.1uF capacitor to GND on NRST, but I would like to exhaust software options prior to modifying several PCBs. For what it's worth, I used an oscilloscope to examine NRST and the behavior seems appropriate.

I'm new to assembler but found a good LED toggle example. I'm trying to work that into my startup code now.

siegelj
Associate II
Posted on March 07, 2015 at 15:24

I'm unfortunately still not able to get this to start reliably. I added a 100K resistor/0.1uF capacitor to the nRST pin and it makes no difference for self-starting. If I momentarily short the pin to GND, then it starts.

What should I test next? The supply rise time looks quite quick on an oscilloscope. I worried about excess capacitance increasing start time - should I put a bigger capacitor on the reset circuit?

I'd like to nail down the schematic so I can produce boards with the right components on my next revision.

Posted on December 30, 2014 at 15:06

Are you sure it's not actually running? ie it's running and stuck in a loop or handler, but not getting to main()

The capacitor delays the rise time of the reset pin as the power supply ramps. Can you not tack a wire to the pin and add other components to see if the absence of the resistor is the problem? I'm not sure it is, things like the analogue supply are more critical.

What about the state of BOOT1 ?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
siegelj
Associate II
Posted on December 30, 2014 at 15:13

In order:

1. It is not running. I have an LED-blink test program that does not execute on power up, but which does execute after I use a system reset.

2. I thought the resistor was internal to the STM32, and just a capacitor would be needed. I intend to try this, but am reluctant if there is a software-only solution as there is not a lot of opportunity to solder something to the pin.

3. BOOT1 is tied to GND, but my understanding is that this is irrelevant so long as BOOT0 is tied to GND.

Posted on December 30, 2014 at 17:08

There is an internal pull up, but I'm not sure that's your problem.

Do you have a circuit diagram of what you've created?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Tamas Novak
Associate III
Posted on December 30, 2014 at 21:08

I have a dozen designs with F100 and F429, where nRST's are left floating without any problem. MCU surely has internal pullup on nRST.

regards,  Tamas

siegelj
Associate II
Posted on December 31, 2014 at 15:57

Yes, but the schematic is fairly involved. Everything else for the ''minimal circuit'' should follow the STM32 discovery -- is there a section in particular where it would be helpful to see the schematic?

I am also wondering if it is possible that there is an issue with the startup code, but then it seems strange that a manual reset would cause the code to enter when a typical power-up does not.

Posted on December 31, 2014 at 18:27

Well lets start with the stuff that's immediately attached to the STM32, like the supplies, decoupling caps, VCAP pins, debug headers, LEDs and USARTs?

Assume also that the debugger IS invasive, telling it to reset the chip is not quite the same as an unattached cold start. Yes, it could be the start up code, a LOT of stuff happens before it gets to your main() code, which is why it would be helpful to understand if it's running and stuck someplace else rather than totally non-functional which is how you're characterizing it right now. I would put assembler code at the ResetHandler to modulate a GPIO/LED output.

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