BOD speed, size of filter cap on vcc when powering down?

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

Will BOD save eeprom from corruption without fail or is there a standard filter/charge storage cap value on VCC for added measure when discharging? I read somewhere in the forums that BOD takes 2ms to complete.

 

I worked for a musician who had a kiwi-mod board for one of his music synthesizers and it was an early run without the BOD fuse set and had data corruption after a few power downs.

Luckily i could reprogram it after getting the hex code from the manufacture.

-William

 

~William

Last Edited: Mon. Feb 19, 2018 - 04:48 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

vertamps wrote:
I read somewhere in the forums that BOD takes 2ms to complete.
Depends on the MCU or external BOD.

ATXMEGA128A1U, tBOD, detection time :

sampled = 1ms typ (no min, no max), 1.2microA typ (no min, no max)

continuous = 400ns typ (no min, no max), 126microA typ (no min, no max)

 

It's been said that some MCU BOD are poor or marginal (qualifier - not a statement about AVR)

 

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

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

vertamps wrote:
Will BOD save eeprom from corruption

Surely, that depends on how well you use it?

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Say i were to shut off power to the MCU rapidly through a transistor powering the chip without a filter cap on vcc, is this an example that is open for eeprom corruption regardless of BOD settings?

Im actually gonna test this out and also see what having certain caps on vcc will do to it while viewing the discharge rate shown my oscilloscope.

 

Currently working on a project with an Atmega328p. Running at 8Mhz it is within the safe operating voltage threshold of the project by a great deal.

10mhz safe operation says 2.7Vdc and above in the data sheet.

 

It is run on a 3.7v battery, and goes into sleep mode at 3.2v. (adc checking a resistor divider).

The only time it will see less than 2.7v is with the battery disconnected.

 

 

~William

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

vertamps wrote:
is this an example that is open for eeprom corruption regardless of BOD settings?

IMO/IME you are mixing things up.  It isn't the power cycling that is corrupting EEPROM.  Rather, if you do not have a BOD and the supplyV drops, eventually the supplyV gets below usable operating range for the particular AVR model.  At that point, things start to fail.  One of the things that happens is that EEAR fails.

 

I'm a bit interested in "BOD takes 2ms to complete".  What does that mean?  That the supplyV needs to be below the threshold for 2ms before a BOD reset is triggered?  So what, I say--the AVR isn't going to turn pins-up 2ms after supplyV happens to drop below an arbitrary (and imprecise) BOD level.  If you think that is slow, it is probably purposeful--I'd want some "debounce"/confirmation of a real event before doing something drastic like a forced reset.

 

Note that with all of the above it doesn't matter how big a capacitor you use.

 

Now, if you intend to detect an impending power loss and take action such as racing to save important stuff to EEPROM, that is a bit of a different discussion.

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

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

gchapman wrote:

vertamps wrote:

I read somewhere in the forums that BOD takes 2ms to complete.

 

Depends on the MCU or external BOD.

ATXMEGA128A1U, tBOD, detection time :

sampled = 1ms typ (no min, no max), 1.2microA typ (no min, no max)

continuous = 400ns typ (no min, no max), 126microA typ (no min, no max)

 

It's been said that some MCU BOD are poor or marginal (qualifier - not a statement about AVR)

 

 

I never really thought much about BOD trip time.  The Mega88 family datasheet text says "immediately", and the table gives 2us typical.

 

 

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

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

theusch wrote:
... and the table gives 2us typical.
Same for mega328P with 50mV typ for BOD hysteresis.

C = Q / V

C = dQ / dV

C = dQ/dt / dV/dt

C = i / dV/dt

C = i / (50mV / 2us)

i = I for constant current load

 

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