💬 Various bootloader files based on Optiboot 6.2
-
@carlierd
I am almost certain that you are NOT using my boards.txt because you put the bootloaders outside the reach of the IDE (must be in the sketchfolder and within the hardware subfolder of the sketches folder).@GertSanders
No doubt that I using your file as I got the same problem as @alexsh1 with the arduino pin file.Look at my board choice:

I find this method very good for deployment but only when it's working ;)
I check the bootloader with Nick Gammon sketch and it seems good.
David. -
@carlierd
I am almost certain that you are NOT using my boards.txt because you put the bootloaders outside the reach of the IDE (must be in the sketchfolder and within the hardware subfolder of the sketches folder).@GertSanders One more question on the LED connected on B0.
When you wrote that the LED lit on arduino reset, it's when the reset button is pushed ? when the arduino start ? or both ?
David.
-
@GertSanders One more question on the LED connected on B0.
When you wrote that the LED lit on arduino reset, it's when the reset button is pushed ? when the arduino start ? or both ?
David.
When the atmega328 is reset, the LED will flash three times if the boot loader is in memory. This also happens when you send a new sketch via the Arduino IDE to the atmega328.
So if you connect pin 1 shortly to GND, the led should flash.
The first time you load a boot loader, the atmega328 will "loop" between the startup procedure of the boot loader (and will flash the led), and then try to load the sketch. If there never is a sketch, it will start the boot loader again and again ...
-
When the atmega328 is reset, the LED will flash three times if the boot loader is in memory. This also happens when you send a new sketch via the Arduino IDE to the atmega328.
So if you connect pin 1 shortly to GND, the led should flash.
The first time you load a boot loader, the atmega328 will "loop" between the startup procedure of the boot loader (and will flash the led), and then try to load the sketch. If there never is a sketch, it will start the boot loader again and again ...
So it confirms that your bootloader was correctly burnt in the atmega as the first time I failed to upload a sketch the LED flash three time again and again !
Thanks !David.
-
Hello,
I tested two bootloaders today:
- optiboot_atmega328_08M_038400_B0.hex
- optiboot_atmega328_01M_009600_B0.hex
But I am pretty sure you already tested them.
I got some issue with 1MHz bootloader but probably because I am using signing feature.
I will check the forum to be sure.David.
-
Hello,
I tested two bootloaders today:
- optiboot_atmega328_08M_038400_B0.hex
- optiboot_atmega328_01M_009600_B0.hex
But I am pretty sure you already tested them.
I got some issue with 1MHz bootloader but probably because I am using signing feature.
I will check the forum to be sure.David.
@carlierd
Indeed I am using these two boot loaders already. The 1Mhz in my very slim nodes and the 8Mhz in the red board battery based nodes.
I also use the 16Mhz in my AC based board (as a repeater or as SMS gateway).
I will make an AC board with a 20Mhz crystal just to test the faster versions of the bootloader. -
@carlierd
Indeed I am using these two boot loaders already. The 1Mhz in my very slim nodes and the 8Mhz in the red board battery based nodes.
I also use the 16Mhz in my AC based board (as a repeater or as SMS gateway).
I will make an AC board with a 20Mhz crystal just to test the faster versions of the bootloader.Hello, as I got some issue with the 1MHz bootloader, I tried without the signing feature and I still got st=fail.
One question for you, perhaps stupid but I need to be sure ;)
Do you need to set the same serial speed on both node and gateway ?David.
-
Hello, as I got some issue with the 1MHz bootloader, I tried without the signing feature and I still got st=fail.
One question for you, perhaps stupid but I need to be sure ;)
Do you need to set the same serial speed on both node and gateway ?David.
@carlierd
No, the serial speed is not something relevant for the radio communication.
When I compile the boot loader, I just need to choose the CPU frequency and make sure I also choose an upload speed which is compatible with that CPU frequency. Some combinations of CPU frequency and upload speed give errors and the error rate of the serial upload communication can not be above 2% or AVRDUDE will fail.
For node to gateway communication (and your ST=FAIL errors) this is not relevant.
ST=FAIL errors can (in my case) be reduced by lowering the power output of the radio on the node (is default set to MAX, I put it mostly to HIGH).
st=fail errors can also be the result of poor power to the radio. -
@carlierd
No, the serial speed is not something relevant for the radio communication.
When I compile the boot loader, I just need to choose the CPU frequency and make sure I also choose an upload speed which is compatible with that CPU frequency. Some combinations of CPU frequency and upload speed give errors and the error rate of the serial upload communication can not be above 2% or AVRDUDE will fail.
For node to gateway communication (and your ST=FAIL errors) this is not relevant.
ST=FAIL errors can (in my case) be reduced by lowering the power output of the radio on the node (is default set to MAX, I put it mostly to HIGH).
st=fail errors can also be the result of poor power to the radio.@GertSanders said:
ST=FAIL errors can (in my case) be reduced by lowering the power output of the radio on the node (is default set to MAX, I put it mostly to HIGH).
st=fail errors can also be the result of poor power to the radio.Or just a bad radio. There is a huge thread on the forum about fake radio modules.
I have gone through quite a few - what a waste of time.... -
I am using RFM69. No fake as it's working perfectly at other frequency.
@GertSanders
I tried three different configurations:- 16 MHz with crystal
- 8 MHz internal
- 1 MHz internal (with some st=fail)
I measured power consumption in sleep mode and found that it's very close to 4uA with all configurations. So why using the 1 MHz ? Do you have better consumption when using 1 MHz ?
The best configuration for me will be the 8 MHz internal as it avoid to used the crystal.
David.
-
I am using RFM69. No fake as it's working perfectly at other frequency.
@GertSanders
I tried three different configurations:- 16 MHz with crystal
- 8 MHz internal
- 1 MHz internal (with some st=fail)
I measured power consumption in sleep mode and found that it's very close to 4uA with all configurations. So why using the 1 MHz ? Do you have better consumption when using 1 MHz ?
The best configuration for me will be the 8 MHz internal as it avoid to used the crystal.
David.
@carlierd
In sleep mode it does not matter which frequency is used. The watchdog timer runs off its own clock and that is the same for all three cases. The fact that you get around 4 uA is just because you still have a watchdogtimer running. With full deep sleep and complete shutdown of the radio we should see 1-2 uA if external pullup of more then 2MOhm is used.
The mcu frequency is important for the active time. Higher frequency means faster startup and faster completion of tasks.
8Mhz is a good compromise as the internal oscillator is less powerhungry then fullswing crystal.
And you need less parts. -
I am using RFM69. No fake as it's working perfectly at other frequency.
@GertSanders
I tried three different configurations:- 16 MHz with crystal
- 8 MHz internal
- 1 MHz internal (with some st=fail)
I measured power consumption in sleep mode and found that it's very close to 4uA with all configurations. So why using the 1 MHz ? Do you have better consumption when using 1 MHz ?
The best configuration for me will be the 8 MHz internal as it avoid to used the crystal.
David.
@carlierd, all that i can say is; do not rely on serial communication working. I'm running my custom made node on 8MHz internal, can use the serial monitor but i can not upload via serial. Only ISP uploads using programmer.
-
@carlierd, all that i can say is; do not rely on serial communication working. I'm running my custom made node on 8MHz internal, can use the serial monitor but i can not upload via serial. Only ISP uploads using programmer.
@Samuel235
I have no issues with ftdi uploads at 8Mhz internal and 38k upload speed on my nodes. Even for 25k byte sketches. -
@Samuel235
I have no issues with ftdi uploads at 8Mhz internal and 38k upload speed on my nodes. Even for 25k byte sketches.@GertSanders said:
@Samuel235
I have no issues with ftdi uploads at 8Mhz internal and 38k upload speed on my nodes. Even for 25k byte sketches.I've been told that it should work but atmel do not advise it or support it apparently. There are chances that it wont work and mine doesn't. I had the discussion regarding it in my nodes topic but the conversation just dropped off and went stale.
-
@GertSanders said:
@Samuel235
I have no issues with ftdi uploads at 8Mhz internal and 38k upload speed on my nodes. Even for 25k byte sketches.I've been told that it should work but atmel do not advise it or support it apparently. There are chances that it wont work and mine doesn't. I had the discussion regarding it in my nodes topic but the conversation just dropped off and went stale.
@Samuel235
That depends on the upload speed. At higher speeds the error on the frequency of the internal oscillator gets more important. It can be off by several percent (from 8mhz) and then avrdude can fail. I have experimented with 9600 baud and there the deviation of the internal 8mhz has to be severe before the serial uploads starts to feel the effect.
So try using a 8Mhz boot loader prepared for an 9600 baud upload. -
@Samuel235
That depends on the upload speed. At higher speeds the error on the frequency of the internal oscillator gets more important. It can be off by several percent (from 8mhz) and then avrdude can fail. I have experimented with 9600 baud and there the deviation of the internal 8mhz has to be severe before the serial uploads starts to feel the effect.
So try using a 8Mhz boot loader prepared for an 9600 baud upload.@GertSanders, i did do, that's the latest solution i tried. No joy.
-
@carlierd
In sleep mode it does not matter which frequency is used. The watchdog timer runs off its own clock and that is the same for all three cases. The fact that you get around 4 uA is just because you still have a watchdogtimer running. With full deep sleep and complete shutdown of the radio we should see 1-2 uA if external pullup of more then 2MOhm is used.
The mcu frequency is important for the active time. Higher frequency means faster startup and faster completion of tasks.
8Mhz is a good compromise as the internal oscillator is less powerhungry then fullswing crystal.
And you need less parts.@GertSanders Thanks for explanation. It confirms what I imagine !
I am using a 10MOhm resistor but not the full deep sleep as I want to periodically send the battery.
I will try it because 1-2 uA is very low ;) -
@carlierd, all that i can say is; do not rely on serial communication working. I'm running my custom made node on 8MHz internal, can use the serial monitor but i can not upload via serial. Only ISP uploads using programmer.
@Samuel235 No issue to with the FTDI.
I just found a small problem due to the Arduino IDE. As I often change board (from UNO to different bootloader) I discover that the menu is sometime not coherent with the real setting. So I found that selecting two or three times board parameters (including port) is the solution to avoid communication issue. -
@GertSanders, i did do, that's the latest solution i tried. No joy.
@Samuel235
Would you want to try a bootloader with an upload speed of 4800 ? I can make that for 8Mhz if you want (just to test)?