Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

MCU being reset because of power drop or RST pin pulled down?

Status
Not open for further replies.

ulrikp

Junior Member level 3
Joined
Mar 1, 2010
Messages
31
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,288
Location
Copenhagen
Activity points
1,568
I have an C8051F921-GM MCU that seems to be either losing power (probably only dropping out for short time) or is being reset by RST pin being pulled low. Batteries are ok.

1. Could it be because pullup resistor is too big? I have 100k pullup to RST while datasheet recommends between 1k and 5k.
2. Could it be that I have burned something by supplying with more than the max. 5V (e.g. accidently during reprogramming of flash)?

Thanks!
Ulrik
 

Hi Ulik,

A power supply or ground spike might also cause a reset. If you do not have blocking capacitor on the supply line, you might consider to add two capacitors( e.g. 10uF Tantal and 100nF ceramic) near the micro supply pin. If the datasheet recommaend 1k-5k it is better to be in that range (high resitor values will make it easier for crosstalk to have an effect). A damage on the micro might be indicated by a higher then normal current consumption.

Enjoy your design work!
 
  • Like
Reactions: ulrikp

    ulrikp

    Points: 2
    Helpful Answer Positive Rating
Some other part of the circuit may be drawing too much current which may cause the supply voltage to temporarily drop and this may cause the microcontroller to reset.

If this is the case, you can use a bulk capacitor to make sure the voltage doesn't drop. The value of the capacitor will depend on the maximum current being drawn, but about 100uF-1000uF could be enough.

Hope this helps.
Tahmid.
 
  • Like
Reactions: ulrikp

    ulrikp

    Points: 2
    Helpful Answer Positive Rating
Thanks for your answers!
I think I have located the source of the reset. I have a crystal connected to XTAL1 and XTAL 2 as in the picture (except I use 32.768 kHz and 6p caps)
59_1330895755.jpg


When I touch either side of the resistor with something that has a certain capacity (either long wire or with fingers through short wire), the system is reset. I imagine this induces a ground spike(?). I have seen that this can happen by either an electrical field from nearby antenna or something else (maybe humidity??).

So now, my questions are:
1. Why does this happen?
2. What's the solution?

Best regards,
Ulrik
 

Hi Ulik, the oscillator is a very critical part of the micro. It is a high impedance circuit where capacitive loads (like touching, flying cables on top etc.) mistunes or even stop oscillation. Without a clock a micro is dead. If the oscillator circuit is layout properly it should not cause problem (except for the mentioned one). Most likely something else causing the problem (switching output to drive relays etc.?). If you interface to external I/O, you might take a look at this application: https://ichaus.biz/mcu_interface .

Enjoy troubleshooting!
 
  • Like
Reactions: ulrikp

    ulrikp

    Points: 2
    Helpful Answer Positive Rating
I am also not convinced the oscillator is the cause of your problem.

I don't know that specific processor but you haven't mentioned if it has brownout detect and if you have enabled it. Similarly, are you using a watchdog? Is the processor doing something specific when it resets? It could be a software bug. Have you tried adding more power supply decoupling (assuming you have some in the first place)? Have you tried adding a capacitor to the reset pin? Have you monitored the supply lines with an oscilloscope? Have you disconnected I/O loads to see if they are the cause?

Keith
 
  • Like
Reactions: ulrikp

    ulrikp

    Points: 2
    Helpful Answer Positive Rating
Have you ensured that everything else is okay? Like stable voltages at VDD-VSS (with no drops), no voltage drops at RESET pin, proper decoupling, etc.

Although I have little idea about the 8051 series, I do not think that the 10MΩ resistor is required. You may try removing it and seeing what happens.

Hope this helps.
Tahmid.
 
  • Like
Reactions: ulrikp

    ulrikp

    Points: 2
    Helpful Answer Positive Rating
Thanks! I do have power supply decoupling and adding more didn't help. Also, removing the 10M resistor between XTAL1 and XTAL2 didn't help.

I'm using a watchdog and interfacing to a GSM modem. After resetting, MCU waits 5 min and then switches on the modem. This reset is what happens a little too often (randomly, not because of watchdog timer) and also when I touch either XTAL1 and XTAL2 .

I guess I'll have to check for a SW bug...
 

You could eliminate the external clock as the cause by temporarily using the internal clock and seeing if the problem still occurs.

Keith.
 
  • Like
Reactions: ulrikp

    ulrikp

    Points: 2
    Helpful Answer Positive Rating
Hi again,

I have done more investigation (double checking resistors, decoupling caps and firmware) and I suspect that something in the layout is just not designed optimally. In debugging I can see that the reset is because of the clock, and not because of power down. The traces from MCU to crystal are not long, but could also be shorter (they are about 1½ cm now).

The crystal (and XTAL1 and XTAL2) are extremely sensitive to noise (I have seen), and I believe that the reset is caused by some kind of interference in this part of the circuit. Two questions:

1. Are some MCUs more sensitive to noise near the external crystal than others?
2. Any good suggestions for shielding? I have two layer layout and no groundplane between them.

Thanks,
Ulrik
 

We would need to see your layout to advise. There are probably layout guidelines in the manufacturer's data sheet or application notes.

Keith.
 
  • Like
Reactions: ulrikp

    ulrikp

    Points: 2
    Helpful Answer Positive Rating
How about question 1 - does sensitivity only depend on crystal and layout, or does it also depend on the specific MCU?
-Ulrik
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top