??? 08/10/07 19:45 Modified: 08/10/07 19:48 Read: times |
#143065 - It\'s the power supply, and probably not the reset. Responding to: ???'s previous message |
Kai Klaas said:
...what's going on inside! So, you have to trust the manufacturers information. Ok? Can we both agree, that what the manufacturer recommends is the best to solve our problem? If not, we should stop the discussion right here.
1. Power-up problem: When we had RC-reset we found, that during slow or "stumbled" power-ups the micro hang and didn't work as expected. Either the code runs ill or the micro showed a lock-up and become abnormally hot. With flash code memory micros we even observed code corruptions. I'm not at all sure what you mean by "slow or "stumbled" power-ups" since "the bible" clearly states that Vcc must have a rise-time of 1 ms or less. Are you suggesting, by this statement, that "the bible" is incorrect, that it is irrelevant, or that it doesn't apply to ATMEL components? Cure:
Increasing the RC time constant by increasing C, or the use of reset chip which could increase the reset active time due to the built-in undervolatge detection, cured the problem. That seems reasonable enough, though I would have interpreted this set of symptoms as a power supply failure, i.e, the power supply was unable to supply sufficient current to meet the 1 ms maximum Vcc rise-time requirement. Cause:
This power-up problem is shown by all 8051 parts, not only the todays flash code memory micros, but also by the old EPROM parts. It's a plain power-up problem and had to do with an improper reset signal: If the power-up stumbles or shows a slow rise time the RC-reset is not capable to generate or maintain a proper reset signal up to the moment when Vcc reaches its nominal value. Slow Vcc rise time is a power supply failure. For years, people were afraid to use large capacitors on switching power supplies because it overloaded them during power-up and could cause them to catch fire. With the rise of smaller low-cost switchers, and also with the increased popularity of "wall-wart" supplies, the tendency has been to increase the capacitance on Vcc in order to reduce the apparent weakness of such supplies in the cheapest way. The result of this has been a widespread increase in the Vcc decay time at power-down. As I'm sure you've noticed, I believe THAT is the problem causing much of the peculiar corruption issues. The rest is probably due to too-slow rise times on Vcc. Alternatives:
Alternatively the power-up problem could also be cured by guaranteeing that the power-up time does not exceed a certain limit. This would also ease the start-up of Pierce oscillator due to the bigger dU/dt kick of supply voltage. But this is hardly to achieve, when you imagine where the power-up delay comes from: Is it a battery powered application, then you must expect, that the operator can push the switch unsuitedly slow or that the switch contact becoumes old shows some bouncing. With mains powered applications you must keep in mind the weak mains transformer and, of course, mains dips and fluctuations. Also, the plugging can also show some bouncing and cause a delayed power-up. It still looks like a power supply failure. Inadequate power supply capacity (not capacitance) is the apparent cause. I think we've covered that now. Richard, it's easier to increase the C or to add a reset chip, than to build a special circuitry to guarantee a fast power-up. Not for a standard power-up, but when you take into consideration all the power-up eventualities (bouncing, dips, very slow rise times). 2. Supply voltage dips:
This is the best way to invoke supply voltage related problems: Jiggle the power switch of a battery powered micro with RC reset and you will immediately observe hangings or lock-ups of micro. With a bit "luck" you can also observe a code memory corruption, means even with future proper resets, the micro will never do as before and the ISP-programmer will show code memory damages. Cure: The only cure is the use of a reset chip, because the RC reset is not able to deliver a proper reset pulse immediately after a fast supply voltage dip, because the capacitor is still relevantly charged, especially if a big C is used to cure the first problem (see above). I'd propose a different cure, namely a complete switch-off and discharge of the Vcc on the board on RESET, followed by a new power-up sequence. That reduces the problem from an sketchy brownout-detection issue to a simple voltage comparison. Cause:
It's not quite clear, what the cause is. Is it the lack of reset pulse at the next power-up or is it the lack of reset signal during the power dip, or is it the power dip itself? Equally what it is, when we used a reset chip, which reseted properly the micro during the dip then no trouble occured. Alternatives: Again, a special supply voltage controller could prevent a too fast power-up after a dip, could then provide a controlled power-up. Also, it could control the power-down. But why should we do this, when there's no information given by the manufacturer, that a controlled power-up or power-down would solve any of these problems?? More, why should we do this, when they at the same time recommend to use a reset chip providing a proper reset signal as a cure?? I think that's too complex. The fact is that, so long as people ignore the <1 ms rise-time requirement on Vcc, they'll get what they deserve. I'm thinking that a depletion mode mosfet across Vcc, driven by the RESET signal from RC qualified by in-spec Vcc at the input, and accompanied by a more powerful power supply and reduced capacitance on the circuit board would solve the problem at both ends of the power cycle. 3. Power-down:
By power-down I mean a realy power-down, not a dip. If the power-down lasts a bit longer, malfunction of micro could be observed sometimes. Although it wouldn't harm in most cases, it should be avoided to not worry the customer. I cannot remember to have found a code moemory corruption due to an improper power-down, but we found some during power-dips. Cure: A RC reset cannot reset the micro during a power-down. That's impossible due to the design. Only a reset chip providing an undervolatge detection can do this. Cause: At under voltage the micro doesn't work properly and tends to run ill, by skipping certain instruction or similar. Reseting the micro stops the executing of code. Alternatives: A fast controlled power-down would also immediately stop the micro from executing code. But again, it's not simple to controll the supply voltage under all eventualities (bouncing, dips, very slow slew times). More, why fumbling arround with a supply voltage controller, when a reset chip can cure all the problems? What does the manufacturer recommend? In this apllication note the manufacturer ATMEL explains how and why to reset todays flash code memory micros: http://www.atmel.com/dyn/resou...oc4183.pdf You will find the following lines: Also: So, you can clearly see, that the manufacturer recommends the use of a properly generated reset signal to cure all these problems. No one word about the control of supply voltage slew times. Richard, it IS a power supply problem, but it is cured by a proper reset signal. Kai Yes, a RESET/supervisor IC solves half the problem, but leaves the critical part of it unsolved. Using a proper power supply AND a proper reset as specified by the manufacturer, namely an RC, would work as well, I believe. You must, however, have a proper power supply, which produces in-spec outputs despite the 15-20% out-of-spec inputs. For many years, even the little ticket printers at movie theaters used constant voltage power supplies. I believe these "reset" issues surfaced when people started trying to be too cheap with their power sources. RE |