Go Down

Topic: Optiboot for 8MHz 3.3V Arduino Pro Mini (Read 9576 times) previous topic - next topic

pert

Does anybody know if it's possible to get bootloader working on 8Mhz with 115200bps speed? Is there any fundamental obstacles?
Are you using an external clock source or the internal oscillator?

westfw

Quote
Does anybody know if it's possible to get bootloader working on 8Mhz with 115200bps speed? Is there any fundamental obstacles?
There is a fundamental obstacle.   The baud rate generator works by dividing the CPU click speed by an integer, yielding a clock that is supposed to be 8x or 16x the desired baud rate.  When the integers get small, the "step" between the bit rates that you can actually set gets large.  At 8MHz, you have a choice of 125kbps or 111111bps - both are pretty far off the actual rate; depending on whether the "other side" of the serial connection is off as well, and in which direction, the speed difference is enough that it can't work.
If your destination supports it, running at 125000bps might work a lot better.

tomgrey

Hi,
Hex file with required setting for fuse bits.

Helbino

#33
Jun 26, 2020, 03:15 am Last Edit: Jun 26, 2020, 03:16 am by Helbino
Edit: didn't realized that the thread was necro'd.

I JUST wrote a guide on this!

https://www.instructables.com/id/Standalone-Arduino-33V-W-External-8-MHz-Clock-Bein/

You'll want to go to step 3 for bootloader specifics.

swilson8686

The ONLY solution I have ever found to load optiboot on an Arduino Pro Mini running at 8MHz and 3.3V is to use the optiboot code provided on the previous page by fanofard titled =[Optiboot 6.2] Arduino Pro or Pro Mini (3.3V, 8 MHz) w/ ATmega328p for 56K

In addition to using that optiboot file I needed to modify the boards.txt file and insert the following code which differs slightly from fanofard's suggestion (I modified fuse settings and fixed a couple of missing lines):

pro328.upload.protocol=arduino
pro328.upload.maximum_size=32256
pro328.upload.speed=57600
pro328.bootloader.low_fuses=0xFF
pro328.bootloader.high_fuses=0xD6
pro328.bootloader.extended_fuses=0xFE
pro328.bootloader.path=optiboot
pro328.bootloader.file=optiboot/optiboot_atmega328_pro_8MHz_56k.hex
pro328.bootloader.unlock_bits=0x3F
pro328.bootloader.lock_bits=0x0F
pro328.build.mcu=atmega328p
pro328.build.f_cpu=8000000L
pro328.build.core=arduino:arduino
pro328.build.variant=arduino:standard
pro328.build.board=AVR_PRO328
pro328.bootloader.tool=avrdude

I successfully used the sketch ArduinoISP by Randall Bohn on an Arduino UNO to create an Arduino as ISP burner.

All of the other solutions including Nick Gammon's excellent code (which I use for other boards), MCUdude's MiniCore, and Helbino's solution above have all failed for this particular Arduino board. The problem with all of the proposed solutions is either the WatchDog Timer in Arduino will not reboot the Arduino, millis() function is way off in timing, or optiboot does not install.

Go Up