Bootloader and MCU clock speed

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

I have been looking and search bootloaders for AVR out there. And there are a number of them, e.g., https://www.avrfreaks.net/index.p... . I have also scanned through the Bootloader FAQ posted by AVRFreaks.net . But, I can't seem to find a definite answer of having a bootloader that be possible to use the maximum clock frequency an MCU offers.

In my case, I have the ATMEGA644, which can have a max clock freq of 20Mhz. There are serial and USB bootloaders, but they require clock frequencies well below the 20Mhz, especially USB booloaders, which seem to require 12Mhz.

So, how would one a bootloader that works at a clock speed below an MCU's max, then have the MCU's application run at max speed? Surely, I can't mess with the fuses. Huge delays in the bootloader, that is, waste cycles?

By the way, suggestion of bootloaders are appreciated.

Thanks

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The clock speed is tied to hardware constraints, not to the bootloader. For USB, 12MHz is a magic number as that is the bit rate, for serial, baud rate friendly frequencies are chosen eg 11.0592MHz. So if you want your bootloader to work at 20MHz, don't expect to bit bash USB and your choice of serial baud rates may be limited.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Kartman wrote:
The clock speed is tied to hardware constraints, not to the bootloader. For USB, 12MHz is a magic number as that is the bit rate, for serial, baud rate friendly frequencies are chosen eg 11.0592MHz. So if you want your bootloader to work at 20MHz, don't expect to bit bash USB and your choice of serial baud rates may be limited.

Right...I understand that. Thanks. What I am saying is: Saying, I installed a 12Mhz crystal to make sure the bit rates (1.5Mbps, by the way) to work out nicely. But, the application that I am going to run after the bootloader has written to the flash requires a 20Mhz clock speed. What would I do? Change crystal to 20Mhz then?

So, I am looking for some graceful solution on this. That is stick in the 20Mhz crystal permanently. For UART bootloader, that is no problem, because the baudrate can be configured even with a 20Mhz crystal installed. For USB, uhmm...

I guess I have to modify a chosen bootloader to work with 20Mhz clock speed.