cancel
Showing results for 
Search instead for 
Did you mean: 

reset circuit problem with stm32f4

Moamen Ayman
Associate III
Posted on July 02, 2017 at 19:29

Hello, I'm using stm32f407vgt6 MCU in a control system and I'm facing a strange problem in the reset circuit, when I power on the system it doesn't start until I put a short circuit wire manually between reset pin and GND and then remove this wire so system can start properly. system's external reset circuit consists of pulldown 0.1uF capacitor and pullup 10KOhm resistor. I have tried to replace the 10KOhm resistor with 100KOhm but nothing changed. I also replaced the 0.1uF capacitor with 1uF and also nothing changed. Could someone help me to find out what may cause this problem and why I need to connect the reset pin to ground for just a second in order for the system to start?

Thanks so much in advance

Note: this post was migrated and contained many threaded conversations, some content may be missing.
26 REPLIES 26
Posted on July 05, 2017 at 08:01

It may also be the JTAG NRST input that pulls NRST down. Do you have something connected to the JTAG when it happens?  If so then remove it an try again.

IMO you should first check whether the MCU is permanently in reset condition or if starts into the bootloader before making any assumptions. Check the state of the reset pin with an oscilloscope.

Posted on July 05, 2017 at 17:28

I'm using SPI1 but I only use SPI1_SCK and SPI1_MOSI and I left SPI1_MISO(PB4(

JTAG_NRST

)) floating, do I need to connect it to VDD permanently to over come this problem? 
Posted on July 05, 2017 at 17:37

I don't know, I'd look for component variations in the design, especially in the power supply, and that the regulators have enough bulk capacitance to meet design specifications. As you have things that work vs don't work you're in a better position to deduce what is actually different, and happening.

How the supplies in a system ramp can alter the interplay between different parts you are using. The STM32 has a power-on-reset circuit internally, but likely has a much shorter window compared to a few hundred milliseconds. This might of course impact systems where you want quick start-up, but then you're going to have to really focus on supplies, and whether everything is read to run in the same time scale.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on July 05, 2017 at 17:41

The JNRST is not the same as the processor NRST. Your problem as described suggests your processor is not starting robustly.

Something is more fundamentally awry here. Do you have connections to external boards, that might be back feeding power to the core via GPIO pins?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on July 07, 2017 at 18:51

I have connected this external

POR

https://www.digikey.com/products/en?keywords=mcp130-300di-to

but it is still not working. The system uses USB peripheral in FS mode and when I connect the USB cable with the system, computer recognizes it as STMicroelectronics virtual com port (COM5) but I can't send data from computer to the system as it is supposed to do.Now I think that system start working and make all initialization steps as when I connect it to computer, computer recognizes it but for some reasons which I don't know it doesn't continue executing the code. only when I connect manually the rest pin to GND for a while and release it, it start working properly.

any suggestions?

T J
Lead
Posted on July 08, 2017 at 04:28

Hi,

the POR/PDR function is monitoring the 1.2V rail.

I checked your text above, you said 1.26V that's good.

Table 14 shows the allowable voltages on the V1.2 to be between 1.08 to 1.32V depending on the frequency and some internal flags.

V1.2 outside these values, will stop your processor coming up.

but the spec also requires a clean 1.2V with significant capacity.

Low ESR caps are requested in the data sheet.

keep your caps as close to the processor as you can.

Use a scope to check for transients on the 1.2V  and the 3V rails.

On those 2 rails, 1.2V and 3.3V any voltage pulse over the min-max spec, over 1nS long, is not ok. (1.08 - 1.32V is the absolute range)

The scope probe has to be grounded at the cap where you check the rail.

I will check my F767 board.

1.31v with noise of almost 200mV pulses at 100MHz

and 3.296V with the same noise.

anyhow, my processor seems very stable.

Posted on July 08, 2017 at 07:33

My design works at 168MHz so according to table 14 the typical voltage value on capacitors is 1.26v and that's what I get. I think the processor starts to work but for some reasons it doesn't continue executing the rest of the code.

Posted on July 08, 2017 at 07:36

can you single step ? which IDE are you using ?

I have just switched across to Visual Studio with GDB..

I found you have to disable the Cache to single step properly.

did you check the spikes on the rails ?

Posted on July 08, 2017 at 07:58

I'm using IAR Embedded workbench, when debugging by single step it works well. It works well as long as the programmer is connected even in normal executing without single step but when I remove the programmer and just power up the system it doesn't work or doesn't continue working I guess, it requires that I connect NRST pin to GND for a while and then release it so it can work well.

This is data from map file:

59 860 bytes of readonly code memory

685 bytes of readonly data memory

22 715 bytes of readwrite data memory

CSTACK size is 0x2000

HEAP size is 0x1000

which rails do you mean?

Posted on July 08, 2017 at 08:47

did you check the 1.2V and 3.3V rails    on the CRO ?

if you connect the PCB ground to the PC or CRO, does it fix the issue ?