EEPROM corrupt or damge in BOD ?

Go To Last Post
9 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

hi 

 

I know this is discussed several times before,

I have read most of very useful old threads, and did my project as below:

 

my circuit is 4.5V

BODLEVEL set to 2.7V

ATmega328P 20 MHz

I do not use address 0 of eeprom

save 2 bytes data every one hour, 

my project requirement is 5 years = 43800 hours (for ATmega328P max 100000 write allowed = 11 years )

check data integrity at start-up and ignore corrupted data

 

my cicuits seems works fine but I did not find explicit explanation to something I am worry about :

 

what happens if power loose exacly at middle of write process ?

 

1. data loose , not write  , (no problem for my requirements)

2. data corruption, wrong data, ( I have already handled)

3. eeprom damage, is it possible, shall I care about it?

 

Majid

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Most likely 1 & 2. Physical damage is unlikely.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

m.majid wrote:
my circuit is 4.5V BODLEVEL set to 2.7V ATmega328P 20 MHz

 

What does the datasheet say about safe operating at 20MHz, in regards to VCC?

Is a BOD level of 2.7v the correct level?

How important is the correct and safe operation of your device?

Can it perform the work needed at a lower speed using CLKPR of /2 or /4 or /8?

How stable is the power source?  4.5v, battery perhaps, is it monitored?

 

Jim

 

Mission: Improving the readiness of hams world wide : flinthillsradioinc.com

Interests: Ham Radio, Solar power, futures & currency trading - whats yours?

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for reply

Majid

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for reply

Good questions!
Datasheet says min 4.5v for 20Mhz is ok

3 BODLEVELs available:
1.8 (1.7-2.0) risk for eeprom
2.7 (2.5-2.9) my choice
4.3 (4.1-4.5) can not use for 4.5v vcc

Project requirements forces 20Mhz

What do u mean by "monitored"?
it is Step-down regulator, 2A load,
Stable voltage during load fast change between 0.1A and 2A
MCU power is branched from supply through 10 ohm reistor and has a bypass cap 100nf

it works fine except 1 incident of eeprom adress 0 damage, I dont use address 0 anymore

I hope I didn't miss anything

Majid

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

m.majid wrote:
Datasheet says min 4.5v for 20Mhz is ok

3 BODLEVELs available:

1.8 (1.7-2.0) risk for eeprom

2.7 (2.5-2.9) my choice

4.3 (4.1-4.5) can not use for 4.5v vcc

Project requirements forces 20Mhz What do u mean by "monitored"?

it is Step-down regulator, 2A load,

Stable voltage during load fast change between 0.1A and 2A

MCU power is branched from supply through 10 ohm reistor and has a bypass cap 100nf it works fine except 1 incident of eeprom adress 0 damage, I dont use address 0 anymore I hope I didn't miss anything

 

Ok, the vcc of 4.5v is common for battery powered projects, 3s AAA batteries, so I was asking if you monitored the battery voltage....  NA for this power source.

Why 4.5v and not 5.0v?  are you losing 0.5v thru the 10 ohm resistor (that would be a 1/2 amp mpu load, not likely...) 

I would add a 10 - 100uf after the 10 ohm resistor, an use 100nf caps close to both vcc/gnd and avcc/gnd pin pairs.

 

I guess this is drifting off topic, as you asked in OP about possible EEPROM damage, which is no, but you could have data corruption, but that is already handled, you said.

Post a picture of your pcb, we may see something and can add some additional hints.

 

Jim

 

 

Mission: Improving the readiness of hams world wide : flinthillsradioinc.com

Interests: Ham Radio, Solar power, futures & currency trading - whats yours?

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Jim thanks for guides .

 

ki0bk wrote:
Why 4.5v and not 5.0v?  are you losing 0.5v thru the 10 ohm resistor (that would be a 1/2 amp mpu load, not likely...)
 

main load requirement is 4.5V 2A, SD regulator is fixed to 4.5V 

I used 10 ohm to decouple MCU from main load, precaution to reduce likely ripples, MCU is about 10 mA 

 

ki0bk wrote:
I would add a 10 - 100uf after the 10 ohm resistor,
 

is 1u-10u ok for MCU? doesn't it affect BOD operation ? cause it will smooth the voltage fall ramp

 

ki0bk wrote:
, an use 100nf caps close to both vcc/gnd and avcc/gnd pin pairs.
 

I put one 100n exactly as u mentioned close to VCC, but not to AVCC,

datasheet says :

"1.1.7 AVCC: AVCC is the supply voltage pin for the A/D converter, PC3:0, and ADC7:6. It should be externally connected to VCC, even if

the ADC is not used. If the ADC is used, it should be connected to VCC through a low-pass filter. Note that PC6..4 use digital
supply voltage, VCC."

 

I interpreted AVCC always must be connect to VCC , but 100n is needed only if ADC is used, I dont use ADC

 

 

 

 

Attachment(s): 

Majid

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

m.majid wrote:
I used 10 ohm to decouple MCU from main load, ...
Instead, the recommendation's a ferrite bead.

Atmel AVR042: AVR Hardware Design Considerations [APPLICATION NOTE]

http://ww1.microchip.com/downloads/en/appnotes/atmel-2521-avr-hardware-design-considerations_applicationnote_avr042.pdf

(page 5)

Figure 2-2. Decoupling with Series Inductor

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

gchapman wrote:
Atmel AVR042: AVR Hardware Design Considerations

 

very useful appnote , thanks

 

new name AN2519 Rev 08/2017:

http://ww1.microchip.com/downloads/en/AppNotes/00002519A.pdf 

 

choosing true ferrite bead is quite complicated!

 

 

Majid

Last Edited: Fri. Dec 29, 2017 - 05:31 AM