0
\$\begingroup\$

I'm working with ATmega1280 (Datasheet link) Currently I'm using the internal RC-oscillator at 8MHz

I'm also using Telit LE910 for sending data that can take up to 2A (from the Telit hardware user guide).


Telit hardware user guide


You can see my voltage drop in the ignition state of the modem: Voltage drop


My supply voltage is 3.3V from a battery and I have a lot of EEPROM writes, so I want to protect my EEPROM.

Preventing EEPROM corruption


And flash corruption: Preventing flash corruption


I'm facing EEPROM corruption on low battery conditions, therefore my Brown-out level is at 2.5-2.9 (the line corresponding to 101).

My question is if I'm using the CLKPR – Clock Prescale Register with a division factor of 2 for receiving a 4MHz clock.
Can I switch to Brown-out level corresponding to 4MHz 1.7-2.0 (line 110)?


BODLEVEL Fuse Coding



The BOD detection takes place in the reset logic?
So even in 8MHz the BODLEVEL will refer to the clock after the Prescaler(4MHz)?


Clock distribution Reset logic Maximum Frequency vs. VCC


The safe zone is for the Vcc frequency after the Prescaler?

\$\endgroup\$
5
  • \$\begingroup\$ Does the note (1) right below that table you copied answer your question? \$\endgroup\$
    – Justme
    Feb 7 at 12:19
  • \$\begingroup\$ Therefore my Brown-out level is at 2.5-2.9 What I am missing is the supply voltage you're going to use. The supply voltage then determines what the maximum MCU clock speed (that's not the RC oscillator!) can be. Then you select the Brown-Out level somewhat below your supply voltage. So "110" means BOD = 1.8 V, so you can use a supply of 2.2 V (a bit above the 2.0 V maximum BOD level). That 2.2 V supply then means a clock up to a certain value can be used reliably. \$\endgroup\$ Feb 7 at 12:23
  • \$\begingroup\$ @Bimpelrekkie add supply voltage (3.3V) \$\endgroup\$ Feb 7 at 12:36
  • \$\begingroup\$ @Justme, no that's what I'm asking and giving this note so no need to look for it in the datasheet \$\endgroup\$ Feb 7 at 12:38
  • \$\begingroup\$ @Daniel Surizon -- see datasheet page 357-358, "max F_CPU vs Vcc" -- at 4MHz you can go down to Vcc = 1.8V on the ATmega1280V, and 2.7V on the ATmega1280 \$\endgroup\$
    – Pete W
    Feb 8 at 0:04
2
\$\begingroup\$

Brown-out detection and frequency are two independent things. Another core aspect to consider is the operating voltage. Your operating voltage determines possible frequencies (higher voltage allows higher frequency, but nothing stops you from using max voltage with the lower freq of course).

BOD is nothing more but a voltage at which the MCU will stay in reset and not run the program (and eat a few orders of magnitude less power).

You can have an ATMega328P (arduino uno) run at 5V with 1MHz or 8MHz, and you can have BOD at 1.8V, 2.7V or 4.3V (or completely off, then it may go unstable near its lowest operating voltage spec)

Alternatively, you can run the same MCU from 3.3V and you, obviously, can have only 1.8V or 2.7V BOD; If you set BOD to 4.3V with Vcc=3.3V, your MCU will stay in forever reset until you apply >4.3V to it. If it's soldered onto its own PCB, you'll have hard time returning it back to life, possibly will have to solder it out (you could damage 3.3V regulator powering the MCU if you apply 5V there obviously).

Frequency doesn't have much to do with it, it's only that if you need higher frequency, you may need to go for max Vcc, so you can set BOD to higher level too. Your BOD options are determined by Vcc. And Vcc MAY or MAY NOT depend on desired frequency.

Of course, this logic applies to your MCU as well, nothing new about it. Yet again, if you're powering the MCU from the voltage regulator, you probably don't need BOD at all since the Vcc will always be the same (unless the regulator input voltage falls, but it's better not to go out of input voltage spec of the regulator or make sure it's safe that way).

\$\endgroup\$
3
  • \$\begingroup\$ Hi, I edited the question to emphasize the connection \$\endgroup\$ Feb 8 at 6:31
  • 1
    \$\begingroup\$ which doesn't change my reply in any way; it still holds true; there is no direct connection between clock and bod. Your question is about Vcc and frequency now. And I think you're looking for this: avrfreaks.net/forum/… (Yes, what matters for determining legit Vcc levels is the clock AFTER prescaler) \$\endgroup\$
    – Ilya
    Feb 8 at 8:55
  • \$\begingroup\$ that's exactly it \$\endgroup\$ Feb 8 at 9:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.