Time to do a little rant!

AVR bootloader basics



Who got to the good idea of writing AtMega bootloader that works on 16MHz and runs code you wrote for cpu with CLK div 8 ?

I wasted way more time on this than I should have… The boot-loader I am talking about is the standard Atmel usb boot-loader that comes with aforementioned cpus.

If you would like to pass the problem  (for example UART going nuts) while still using the boot-loader  just add following lines to your main configuration part:

// Remove CLKDIV8
 CLKPR = 0x80;
 CLKPR = 0x00;

 // DISABLE JTAG - take control of F port
Tagged with:

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>