BOD value in boards.txt

I am making a battery project and so I need to migrate from using the Uno rev3 to a barebones board. The microprocessor will work from 4.5 to 5.5 volts and I thought it safest to use the most up to date version, Arduino IDE 1.8.13, for loading the bootloader. I wanted to check that the BOD was set to the appropriate setting (4.3 v) but notice that the setting in boards.txt is:
yun.bootloader.extended-fuses=0xfb.
I am assuming that I need to change this to 0xfc to get it to work at 4.3v but I am wondering what the present setting does. According to the datasheet it is “Reserved”, whatever that means.
I notice that for older versions of Arduino IDE the fuse was set differently. In version 1.0.6 it was set to 0x05 (equating to 2.7v) which would seem to be the best default value for a universal project board. Please can anyone shed any light on why it changed and what the 0xfb setting does? Also please can someone confirm that 0xfc is the most appropriate setting for my project. Many thanks in anticipation

paulluk:
I am making a battery project and so I need to migrate from using the Uno rev3 to a barebones board.

but notice that the setting in boards.txt is:
yun.bootloader.extended-fuses=0xfb.

That setting is for the ATmega32U4-based Arduino Yun board. Does your barebones board use the ATmega32U4, or does it use the ATmega328P like the Uno?

328P:
Unprogrammed fuse bits read back as 1.
4.3V = 100.
So I think you want 1111 1100 = 0xfc

I don't know what happens if you use a Reserved value.
The chip will perform at 16 MHz down to 3.8V, so 4.3V as a brownout level seems the best best choice. Weird/odd things may happen below that.

uno.bootloader.extended_fuses=0xFD
is the line to change if you are bootloading the 328P as an Uno (I bootload my 328P projects as Uno also).
FD is the older rev 0x05, which is 2.7V for the folks that used their 16 MHz clocked-boards at 3.3V.

OK, if we're going down the path of assuming @paulluk is actually using an ATmega328P, then I'll give my advice accordingly: If you want to do this the easy way, just use MiniCore. It has all the options for BOD for the ATmega328P already set up for you, just select the one you want from the Tools > BOD menu in the Arduino IDE.

Installation and usage instructions at the link above.

Yes, that is another good option. I use the similar MightyCore for 1284P boards, it works very well.

I'm still running v1.8.8 of the IDE. I needed to run AVRdude at one point, and when I used 0x5 for the fuse it gave me a notice/warning saying that reserved (i.e. - unused) bits should be programmed as off, which is binary 1. I think either way will work, but the modern practice appears to be to program unused fuse bits as 1. All the used fuse bits are active low as far as I can tell, so it makes sense to have unused bits set high, which is off.

Many thanks for all your help and suggestions. My project is using the ATMega328P-U chip, I had not heard of the Yun board before. I am surprised that the default download via the Arduino website has the fuses set for the Yun rather than the Uno. I was advised to use the most up to date IDE but perhaps an older version (based on the Uno) would be a better starting point. Your advice would be appreciated. I will take a look at the minicore but I am now concerned that other fuse settings may be inappropriate.

paulluk:
I am surprised that the default download via the Arduino website has the fuses set for the Yun rather than the Uno.

It doesn't. If you scroll down in that file you'll discover that it has definitions for multiple boards. The first key in the property is the board ID, which creates a namespace for that board identification. You only looked at the first board definition, which happens to be the Yun.

You can see here the board definition for the Uno:

uno.name=Arduino Uno

uno.vid.0=0x2341
uno.pid.0=0x0043
uno.vid.1=0x2341
uno.pid.1=0x0001
uno.vid.2=0x2A03
uno.pid.2=0x0043
uno.vid.3=0x2341
uno.pid.3=0x0243

uno.upload.tool=avrdude
uno.upload.protocol=arduino
uno.upload.maximum_size=32256
uno.upload.maximum_data_size=2048
uno.upload.speed=115200

uno.bootloader.tool=avrdude
uno.bootloader.low_fuses=0xFF
uno.bootloader.high_fuses=0xDE
uno.bootloader.extended_fuses=0xFD
uno.bootloader.unlock_bits=0x3F
uno.bootloader.lock_bits=0x0F
uno.bootloader.file=optiboot/optiboot_atmega328.hex

uno.build.mcu=atmega328p
uno.build.f_cpu=16000000L
uno.build.board=AVR_UNO
uno.build.core=arduino
uno.build.variant=standard

Notice how it has a different board ID key: "uno"

You can learn all about it here:
https://arduino.github.io/arduino-cli/latest/platform-specification/#boardstxt

paulluk:
I was advised to use the most up to date IDE but perhaps an older version (based on the Uno) would be a better starting point.

It has nothing to do with the Arduino IDE version.

paulluk:
I will take a look at the minicore but I am now concerned that other fuse settings may be inappropriate.

MiniCore provides board option menus for all the most useful fuse settings.

But if you like the hands-on approach, that's fine too. MiniCore will be fast and easy and less likely to result in a bricked microcontroller way, but I think playing around with the Arduino boards platform system is lots of fun and you might also find the knowledge you gain to be valuable.

Thanks, yes, I now see my mistake. It is set at 0xfd for the Uno , as I would have expected. I will look at the Minicore and the github link to platform specs.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.