EmbeddedRelated.com
Forums

flash erasing brownouts

Started by Unknown September 13, 2003
Hi,

> I have run MSP430's with SCI/SPI at voltages
down to and even slightly
>below 1.8V, with no problems. I've run down to 2.4V at 16MHz in a
>freezer, and in an oven at the same temperatures, implicitly looking,
>and logging any clock glitches/resets/flash isssues etc. never a one
>across many boards, in nearly 3 years. My standard storage device is an
>SPI Atmel AT45BD161, with a 528 byte page. I have tested this with
>continuously powered systems, ie no low power modes, and with low power
>modes. I've NEVER seen anything like you are experiencing. I don't
use
>big caps to hold up the supply

Maybe it't because your MSP430 do not have to switcht to LPM3 every second.
The bug also happend when i used only the DCO.


> Why is your supply drooping so badly if left
powered? What is your power source? 

I'm using battery buffered 3 V which come from a 3.3 V regulator (with a
0.1 F gold cap) which has 5 V supply. The MSP430 detects the 5 V and switches to
LPM3 if the 5 V supply is down. 


> The MSP end of the SPI draws very little
additional current? 

No. The battery buffered 3 V at the MSP430 are also buffered by the 0.1 F gold
cap behind the 3.3 V regulator. They are both coupled to the supply voltage of
the MSP430 with diodes (1N4148) in forward direction and at the MSP430 there is
only a 1 uF ceramic cap. The critical part is the discharging of the gold cap
because the 3 V battery behind the diode can't give 2.7 V to the MSP430 in
AM. Therefore it is nessisary to go to LPM3 fast before 2.7 V and brownouts are
reached. This has been done with cyclic checks of the 5 V and therefore sometime
the time to the 2.7 V sometime has been reached before entering LPM3. With a 1 F
gold cap at the MPS430 this does not happen because the MSP has enough time
(several seconds instead of ms) to go to LPM3.  With the ISR change to LPM3 the
2.7 V are not reached because LPM3 is reached before the voltage has reached 2.7
V and with LPM3 the voltage drop across the diode to the 3 V battery is much
smaller - therefore the voltage increases directly after reaching LPM3.
I've tested it with a oscilloscope and now it works with the LPM3-ISR or 1
F gold cap.

Regards 

Rolf F.



Beginning Microcontrollers with the MSP430

nobodyo@nobo... wrote:

> Hi,
> 
> 
>> I have run MSP430's with SCI/SPI at voltages down to and even
>> slightly below 1.8V, with no problems. I've run down to 2.4V at
>> 16MHz in a freezer, and in an oven at the same temperatures,
>> implicitly looking, and logging any clock glitches/resets/flash
>> isssues etc. never a one across many boards, in nearly 3 years. My
>> standard storage device is an SPI Atmel AT45BD161, with a 528 byte
>> page. I have tested this with continuously powered systems, ie no
>> low power modes, and with low power modes. I've NEVER seen
anything
>> like you are experiencing. I don't use big caps to hold up the
>> supply
> 
> 
> Maybe it't because your MSP430 do not have to switcht to LPM3 every
> second. The bug also happend when i used only the DCO.

If you read the above you'll notice that I've tested both with and
witrhout low power modes. There is actually no rational reason for what
you describe without some hardware issue, that I can think of.

> 
> 
> 
>> Why is your supply drooping so badly if left powered? What is your
>> power source?
> 
> 
> I'm using battery buffered 3 V which come from a 3.3 V regulator
> (with a 0.1 F gold cap) which has 5 V supply. The MSP430 detects the
> 5 V and switches to LPM3 if the 5 V supply is down.
> 

What is the fascination with the Gold Cap?? You can, and in my opinion 
should lose it. Modern regulators typically need less than 4.7uF to 
regulate, your over sized cap could be causing problems. What is the 
voltage rating of this cap?
I read the above as you yave a 3V battery feeding a 3V3 regulator. What 
battery?. You then say that this has a 0.1F capacitor across it. Then 
you say that the capacitor is fed from 5V ( gold cap holds no real 
meaning, different manufacturers have different colour caps). What is 
the actual circuit?

> 
> 
>> The MSP end of the SPI draws very little additional current?
> 
> 
> No. The battery buffered 3 V at the MSP430 are also buffered by the
> 0.1 F gold cap behind the 3.3 V regulator. They are both coupled to
> the supply voltage of the MSP430 with diodes (1N4148) in forward
> direction and at the MSP430 there is only a 1 uF ceramic cap. The
> critical part is the discharging of the gold cap because the 3 V
> battery behind the diode can't give 2.7 V to the MSP430 in AM.
> Therefore it is nessisary to go to LPM3 fast before 2.7 V and
> brownouts are reached. This has been done with cyclic checks of the 5
> V and therefore sometime the time to the 2.7 V sometime has been
> reached before entering LPM3. With a 1 F gold cap at the MPS430 this
> does not happen because the MSP has enough time (several seconds
> instead of ms) to go to LPM3.  With the ISR change to LPM3 the 2.7 V
> are not reached because LPM3 is reached before the voltage has
> reached 2.7 V and with LPM3 the voltage drop across the diode to the
> 3 V battery is much smaller - therefore the voltage increases
> directly after reaching LPM3. I've tested it with a oscilloscope and
> now it works with the LPM3-ISR or 1 F gold cap.

The 2.7 critical level is only associated with Flash programming, and 
high clock rates (> 5MHz). The MSP does not brown out at 2.6V, it will 
operate very reliably down to 1.8V with all peripherals running.

Al

> 
> Regards
> 
> Rolf F.
> 
> 
> 
> ------------------------ Yahoo! Groups Sponsor
> ---------------------~--> Upgrade to 128-Bit SSL Security! 
> http://us.click.yahoo.com/p7cEmB/s7qGAA/yigFAA/CFFolB/TM 
> ---------------------------------~->
> 
> 
> .
> 
> 
> 
> ">http://docs.yahoo.com/info/terms/
> 
> 
> 


	I'm not clear if you're using the Gold Cap as a power supply or
as an attempt 
to filter the 3.3V regulator, but large caps like that are useless at 
filtering high frequency ripple.  A general rule of thumb design is to use 
1000uf or so at the output of the main stage regulator.  Sometimes more, 
sometimes less, but that will supress almost all 60hz ripple under normal 
loads.  Use a 4.7uf tantalum (preferred, expensive) or a 4.7uf electrolytic 
for every 3-4 chips, and .1uf on EVERY chip.  If you have a lot of high 
frequency around your device, you may also want a .047uf with every couple 
chips.

	There are design rules for this kind of thing that good text books will teach 
you about.  But if you're going to ad-hoc a PSU, these values are pretty 
good.  If your circuit draws a lot of current, or your using TTL chips (not 
CMOS, HC, LVC, but real TTL), then you want 10uf near every couple chips.

	If you're running a 2 layer board (which there is nothing intrinsically
wrong 
with), you want your ground and power to form a loop, not meander around the 
board with "legs" sticking out here and there (at least, not long
ones).  
Ground and power paths need to be low impedance to be effective.  This means 
NOT using 10mil traces for .5 amp loads.  Yes, a 10mil power trace is 
adequate to power the MSP430 itself (albeit poor design), whereas a 10mil 
trace is not good enough to power a single TTL 8085.  There's way too much 
switching noise and current draw, and you'll get erratic behavior. 
Ideally, 
you want a 4 layer board, which also generally helps FCC part 15 (the power 
and ground planes work to form a capacitor, and also very low impedance 
paths, helping minimize noise emissions from switching transients).

	Again, these are just general design rules, not ones specifically built 
around high current or ultra-low current designs.

	--John

On Thursday 25 September 2003 22:52 pm, onestone wrote:
>  nobodyo@nobo... wrote:
>  > Hi,
>  >
>  >> I have run MSP430's with SCI/SPI at voltages down to and
even
>  >> slightly below 1.8V, with no problems. I've run down to 2.4V
at
>  >> 16MHz in a freezer, and in an oven at the same temperatures,
>  >> implicitly looking, and logging any clock glitches/resets/flash
>  >> isssues etc. never a one across many boards, in nearly 3 years.
My
>  >> standard storage device is an SPI Atmel AT45BD161, with a 528
byte
>  >> page. I have tested this with continuously powered systems, ie no
>  >> low power modes, and with low power modes. I've NEVER seen
anything
>  >> like you are experiencing. I don't use big caps to hold up
the
>  >> supply
>  >
>  > Maybe it't because your MSP430 do not have to switcht to LPM3
every
>  > second. The bug also happend when i used only the DCO.
>
>  If you read the above you'll notice that I've tested both with
and
>  witrhout low power modes. There is actually no rational reason for what
>  you describe without some hardware issue, that I can think of.
>
>  >> Why is your supply drooping so badly if left powered? What is
your
>  >> power source?
>  >
>  > I'm using battery buffered 3 V which come from a 3.3 V regulator
>  > (with a 0.1 F gold cap) which has 5 V supply. The MSP430 detects the
>  > 5 V and switches to LPM3 if the 5 V supply is down.
>
>  What is the fascination with the Gold Cap?? You can, and in my opinion
>  should lose it. Modern regulators typically need less than 4.7uF to
>  regulate, your over sized cap could be causing problems. What is the
>  voltage rating of this cap?
>  I read the above as you yave a 3V battery feeding a 3V3 regulator. What
>  battery?. You then say that this has a 0.1F capacitor across it. Then
>  you say that the capacitor is fed from 5V ( gold cap holds no real
>  meaning, different manufacturers have different colour caps). What is
>  the actual circuit?
>
>  >> The MSP end of the SPI draws very little additional current?
>  >
>  > No. The battery buffered 3 V at the MSP430 are also buffered by the
>  > 0.1 F gold cap behind the 3.3 V regulator. They are both coupled to
>  > the supply voltage of the MSP430 with diodes (1N4148) in forward
>  > direction and at the MSP430 there is only a 1 uF ceramic cap. The
>  > critical part is the discharging of the gold cap because the 3 V
>  > battery behind the diode can't give 2.7 V to the MSP430 in AM.
>  > Therefore it is nessisary to go to LPM3 fast before 2.7 V and
>  > brownouts are reached. This has been done with cyclic checks of the 5
>  > V and therefore sometime the time to the 2.7 V sometime has been
>  > reached before entering LPM3. With a 1 F gold cap at the MPS430 this
>  > does not happen because the MSP has enough time (several seconds
>  > instead of ms) to go to LPM3. With the ISR change to LPM3 the 2.7 V
>  > are not reached because LPM3 is reached before the voltage has
>  > reached 2.7 V and with LPM3 the voltage drop across the diode to the
>  > 3 V battery is much smaller - therefore the voltage increases
>  > directly after reaching LPM3. I've tested it with a oscilloscope
and
>  > now it works with the LPM3-ISR or 1 F gold cap.
>
>  The 2.7 critical level is only associated with Flash programming, and
>  high clock rates (> 5MHz). The MSP does not brown out at 2.6V, it will
>  operate very reliably down to 1.8V with all peripherals running.
>
>  Al
>
>  > Regards
>  >
>  > Rolf F.
>  >
>  >
>  >
>  > ------------------------ 
>
>
>
>
>
>
>  .
>
>
>
>  


J.C. Wren wrote:
> 	I'm not clear if you're using the Gold
Cap as a power supply or as an attempt 
> to filter the 3.3V regulator, but large caps like that are useless at 
> filtering high frequency ripple.  A general rule of thumb design is to use 
> 1000uf or so at the output of the main stage regulator.  Sometimes more, 
> sometimes less, but that will supress almost all 60hz ripple under normal 
> loads.  Use a 4.7uf tantalum (preferred, expensive) or a 4.7uf electrolytic

> for every 3-4 chips, and .1uf on EVERY chip.  If you have a lot of high 
> frequency around your device, you may also want a .047uf with every couple 
> chips.
> 
> 	There are design rules for this kind of thing that good text books will
teach 
> you about.  
You know a good one? ;-)


> But if you're going to ad-hoc a PSU, these
values are pretty 
> good.  If your circuit draws a lot of current, or your using TTL chips (not

> CMOS, HC, LVC, but real TTL), then you want 10uf near every couple chips.
> 
> 	If you're running a 2 layer board (which there is nothing
intrinsically wrong 
> with), you want your ground and power to form a loop, not meander around
the 
> board with "legs" sticking out here and there (at least, not long
ones).  
>
___snip____


Greetz,

	Georg



Hi,

> What is the fascination with the Gold Cap??

Filtering the 3.3 supply. I wanted to use it to buffer the 3.3 V for a MMC/SDC
and EEPROM to store data 
during that time periode where the primary supply voltage (5 V) is down and the
gold cap buffered 3.3 V
is not down. This time periode is less then 100 ms when i short the 5 V supply.
I thought this should be 
enough time but because the MSP430 fails at 2.7 V it is not.


> What battery?.

Li 3 V (usually around 3.05 V).


> The 2.7 critical level is only associated with
Flash programming, and
> high clock rates (> 5MHz). The MSP does not brown out at 2.6V, it will
> operate very reliably down to 1.8V with all peripherals running.

Not with the MSP430F149 REV L and the UARTS. I've tesed this with a 16 MHz
quartz (AT, HC 49/4H, 50 
ppm, 7 pF) which i'm using for overclocking PCs successfully and with that
quarzt the MSP430 only produces
bullshit; communication over RS232 and SPI does not work. With a oscilloscope i
can see that the 16 MHz 
are stable but the MSP does not work properly.  I've tried variations like
no caps at the quartz but no change even without communication to MMC/SDC or
EEPROM and, of course, without self-flashing.


> I have run MSP430's with SCI/SPI at voltages
down to and even
> slightly below 1.8V, with no problems. I've run down to 2.4V at
> 16MHz in a freezer, and in an oven at the same temperatures,

I've tested a 10, 11.0592 and 16 MHz quartz at 3 V, 20C but at 16 MHz the
MSP430 can't boot completely; maybe he hangs at initialisation of uart0,
uart1 or ADC12. With 11.0592 MHz he works but not stable. With 10 MHz he seems
to be stable (for some hours).


One question about changing fast to LPM3: How much time does it take to detect a
high->low-transition with a digital input and an interrupt caused by that
high->low-transition and how much time does it take to detect the transition
(at 1.5 V) with a comparator and a comparator-ISR?

Regards

Rolf F.


	Wait a minute.  You're having all these problems at 16Mhz?  Show me
*exactly* 
where in the datasheet it says that the part is rated for 16Mhz operation.  
All I see is 8Mhz.  

	Just because you can "overclock" a processor doesn't mean you
should.  And 
there are damn good reasons why it will fail.  Like the FLASH programming 
clock being derived from the system clock.  The limits for that are 257Khz 
lower and 476Khz upper.

	Basically, if you're trying to get it working at these speeds, and the
part 
isn't certified for it, you're wasting everyones time.

	--John

On Friday 26 September 2003 15:17 pm, nobodyo@nobo...
wrote:
>  Hi,
>
>  > What is the fascination with the Gold Cap??
>
>  Filtering the 3.3 supply. I wanted to use it to buffer the 3.3 V for a
> MMC/SDC and EEPROM to store data during that time periode where the primary
> supply voltage (5 V) is down and the gold cap buffered 3.3 V is not down.
> This time periode is less then 100 ms when i short the 5 V supply. I
> thought this should be enough time but because the MSP430 fails at 2.7 V it
> is not.
>
>  > What battery?.
>
>  Li 3 V (usually around 3.05 V).
>
>  > The 2.7 critical level is only associated with Flash programming, and
>  > high clock rates (> 5MHz). The MSP does not brown out at 2.6V, it
will
>  > operate very reliably down to 1.8V with all peripherals running.
>
>  Not with the MSP430F149 REV L and the UARTS. I've tesed this with a
16 MHz
> quartz (AT, HC 49/4H, 50 ppm, 7 pF) which i'm using for overclocking
PCs
> successfully and with that quarzt the MSP430 only produces bullshit;
> communication over RS232 and SPI does not work. With a oscilloscope i can
> see that the 16 MHz are stable but the MSP does not work properly.
I've
> tried variations like no caps at the quartz but no change even without
> communication to MMC/SDC or EEPROM and, of course, without self-flashing.
>
>  > I have run MSP430's with SCI/SPI at voltages down to and even
>  > slightly below 1.8V, with no problems. I've run down to 2.4V at
>  > 16MHz in a freezer, and in an oven at the same temperatures,
>
>  I've tested a 10, 11.0592 and 16 MHz quartz at 3 V, 20C but at 16
MHz the
> MSP430 can't boot completely; maybe he hangs at initialisation of
uart0,
> uart1 or ADC12. With 11.0592 MHz he works but not stable. With 10 MHz he
> seems to be stable (for some hours).
>
>
>  One question about changing fast to LPM3: How much time does it take to
> detect a high->low-transition with a digital input and an interrupt
caused
> by that high->low-transition and how much time does it take to detect
the
> transition (at 1.5 V) with a comparator and a comparator-ISR?
>
>  Regards
>
>  Rolf F.
>
>
>
>
> 
>
>
>
>
>
>
>  .
>
>
>
>  


Hi,

> Wait a minute.  You're having all these
problems at 16Mhz?

no, because at 16 MHz the MSP430 stopps at the beginning of main and TI
recommends max. 8 MHz. 
I only wanted to know if 16 MHz system clock are possible when nearly all
components (uart0, uart1, ADC12 etc.) are active without self-flashing. 
Therefore i'm using a 8 MHz quartz with 15 pF capacitators and a 5.1 MOhm
resistor.
Because the devices with the MSP430 have to work for many years they are
designed due to the recommendations of TI. An engineer at TI said that the
circuit diagram and the real device is ok.
The problem with the hangup during AM->LPM3 at 2.7 V is also present with a
DCO system clock (approx. 4.8 MHz).

Regards

Rolf F.



nobodyo@nobo... wrote:

> Hi,
> 
> 
>> What is the fascination with the Gold Cap??
> 
> 
> Filtering the 3.3 supply. I wanted to use it to buffer the 3.3 V for 
> a MMC/SDC and EEPROM to store data during that time periode where the
>  primary supply voltage (5 V) is down and the gold cap buffered 3.3 V
>  is not down. This time periode is less then 100 ms when i short the
> 5 V supply. I thought this should be enough time but because the
> MSP430 fails at 2.7 V it is not.

>> What battery?.
> 
> 
> Li 3 V (usually around 3.05 V).

You're taking your main supply voltage down and trying to run from a
storage cap, but still have a back-up battery? Why? I'm sorry, but the 
logic of this totally eludes me. Post a schematic of the PSU at least.

>> The 2.7 critical level is only associated with
Flash programming, 
>> and high clock rates (> 5MHz). The MSP does not brown out at 2.6V, 
>> it will operate very reliably down to 1.8V with all peripherals 
>> running.

What I meant by the above statement is that provided your clock is less
than 5MHz the MSP430 is guaranteed to operate down to 1.8V, except for
flashing. Now the little graphs do seem to differ very slightly on the
maximum at 1.8V. The latest shows this as just 4.15MHz, I have an older
one around which I believe shows 5MHz. However, no matter what frequency
you run the core at the flash will not program reliably below 2.7V

> 
> 
> Not with the MSP430F149 REV L and the UARTS. I've tesed this with a 
> 16 MHz quartz (AT, HC 49/4H, 50 ppm, 7 pF) which i'm using for 
> overclocking PCs successfully and with that quarzt the MSP430 only 
> produces bullshit; communication over RS232 and SPI does not work. 
> With a oscilloscope i can see that the 16 MHz are stable but the MSP 
> does not work properly.  I've tried variations like no caps at the 
> quartz but no change even without communication to MMC/SDC or EEPROM 
> and, of course, without self-flashing.

Okay, after this very long thread you have only just mentioned that you 
are overclocking the beast. Have you thought to throttle it back to 
within the Ti ratings. Yes, I know, i talk about overclocking ALL the 
time, and do it regularly. That doesn't guarantee it'll work for you. 
There are so many pitfalls with overclocking a chip, that unless you 
really understand them it is doomed to failure. You can't simply jusy 
replace the 4MHz crystal with a 16MHz one.

For a start I overclock for a single reason, I need to crunch a lot of 
data, ie I need the CPU to run faster. There are many peripherals on the 
MSP430 that already require a divided clock, there is absolutely no 
sense, and nothing to be gained from overclocking these. These include 
the Flash, and ADC12. In general the things I overclock are timer 
captures, to give me better timing resolution, and the CPU, because my 
code typically is executing DSP like functions, ie many filters in real 
time.

>> I have run MSP430's with SCI/SPI at
voltages down to and even 
>> slightly below 1.8V, with no problems. I've run down to 2.4V at 
>> 16MHz in a freezer, and in an oven at the same temperatures,

Yes but, if the communications had failed I wouldn't start looking for a 
core fault, I'd back the clocks off, assuming that the thing I"d done 
out of spec was the cause of the problem.

> I've tested a 10, 11.0592 and 16 MHz quartz
at 3 V, 20C but at 16 
> MHz the MSP430 can't boot completely; maybe he hangs at 
> initialisation of uart0, uart1 or ADC12. With 11.0592 MHz he works 
> but not stable. With 10 MHz he seems to be stable (for some hours).

There are a lot of maybe's here, hasn't it occurred to you in all this

time to revert to clocking that is within the voltage spec Ti give, then 
wotrk it from there. You can see where the initialisation hangs up using 
C-Spy. Swapping out caps is meaningless, if you haven't got the correct 
caps in anyway you'll have difficulty.

> 
> 
> One question about changing fast to LPM3: How much time does it take 
> to detect a high->low-transition with a digital input

SLAS272C page 42. maximum inoput frequency to all ports at 2.2V = 8MHz, 
and at 3.0V = 10MHz.

  and an
> interrupt caused by that high->low-transition 

Interrupt latency is described as 6 cycles. However the document also 
states that the current instruction is first allowed to complete, hence 
since the longest executable instruction is 6 cycles I have alwasy 
assumed that interrupt latency is 6-12 cycles, plus the ISR uses 5 for 
RETI. hence the smallest possible ISR, containing nothing but RETI 
executes in 11 to 17 cycles. A typical meaningful ISR executes that 
clears the interrupt flag, and sets another flag, or sleep mode requires 
another 10 cycles typically. hence I assume that the fastest useful ISR 
is 21 - 27 cycles. Which I generally quote as 27 cycles.

> and how much time does 
> it take to detect the transition (at 1.5 V) with a comparator and a 
> comparator-ISR?

The device isn't rated to operate at 1.5V.

Al


nobodyo@nobo... wrote:

> Hi,
> 
> 
>> Wait a minute.  You're having all these problems at 16Mhz?
> 
> 
> no, because at 16 MHz the MSP430 stopps at the beginning of main and
> TI recommends max. 8 MHz. I only wanted to know if 16 MHz system
> clock are possible when nearly all components (uart0, uart1, ADC12
> etc.) are active without self-flashing. Therefore i'm using a 8 MHz
> quartz with 15 pF capacitators and a 5.1 MOhm resistor.

What is the 5M resistor for? and what is the load rating of the crystal?


> Because the devices with the MSP430 have to work
for many years they
> are designed due to the recommendations of TI. An engineer at TI said
> that the circuit diagram and the real device is ok. The problem with
> the hangup during AM->LPM3 at 2.7 V is also present with a DCO system
> clock (approx. 4.8 MHz).
> 
> Regards
> 
> Rolf F.
> 
> 
> 
> ------------------------ Yahoo! Groups Sponsor
> ---------------------~--> Upgrade to 128-Bit SSL Security! 
> http://us.click.yahoo.com/p7cEmB/s7qGAA/yigFAA/CFFolB/TM 
> ---------------------------------~->
> 
> 
> .
> 
> 
> 
> ">http://docs.yahoo.com/info/terms/
> 
> 
> 


Hi,

>> and how much time does
>> it take to detect the transition (at 1.5 V) with a comparator and a
>> comparator-ISR?
>
> The device isn't rated to operate at 1.5V.

The device can operate with an input edge voltage of 1.5 V. This is within the
specification.
Which input is faster for detecting a relative slow H->L transition (edge) at
that voltage: Digital input or Comparator input?

Regards

Rolf F.