Go Down

Topic: [SOLVED] atmega8 slow bootloader? (Read 1 time) previous topic - next topic

b0bbykey

Apr 25, 2011, 07:30 pm Last Edit: Apr 26, 2011, 03:30 pm by b0bbykey Reason: 1
I burned bootloader to atmega8 with ponyprog2000, then uploaded testing sketch with usb-ttl, it works fine but the bootloader seems to be VERY slow, it takes about 10 seconds. On arduino nano (atmega168) and arduino mega (atmega2560) it takes only 2 seconds.
I burned bootloader from hardware\arduino\bootloaders\atmega8\ATmegaBOOT.hex.
Atmega8 in this circuit is working from external ceramic 16mhz resonator (ZTT 16.0MX). Is it normal that boot process takes so long or I'm doing smth wrong? I've googled atmega8 slow boot and have found nothing, pls help.

MarkT

Probably the wrong version of the bootloader - for instance the Arduino Mini 4 has an 8 second wait for reset-button press in its bootloader since it doesn't have auto-reset circuit.
[ I won't respond to messages, use the forum please ]

b0bbykey

#2
Apr 26, 2011, 03:28 pm Last Edit: Apr 26, 2011, 03:31 pm by b0bbykey Reason: 1

Probably the wrong version of the bootloader - for instance the Arduino Mini 4 has an 8 second wait for reset-button press in its bootloader since it doesn't have auto-reset circuit.


You were right! I took this "slow" bootloader from arduino-021 distribution. It seems to have intentional delay here it is if I am not mistaken:

Code: [Select]
char getch(void)
{
 /* m8 */
uint32_t count = 0;
 while(!(inb(UCSRA) & _BV(RXC))) {
/* HACKME:: here is a good place to count times*/
count++;
if (count > MAX_TIME_COUNT)
app_start();
 }
 return (inb(UDR));
}


I've found another bootloader on the net, here it is if anybody is in need http://www.ngcoders.com/downloads/arduino-atmega8-bootloader-2-second-autoreset.

Thanks for the help!

casemod


tf68

Optiboot supports the mega8. It is included with the IDE. arduino-1.0.5/hardware/arduino/bootloaders/optiboot

Go Up