From ba1820777ca0624754ae326c24ada3a90b7d484b Mon Sep 17 00:00:00 2001 From: MCUdude Date: Sat, 11 Apr 2020 16:37:56 +0200 Subject: [PATCH] Add support for 4, 2 and 1 MHz external clock Closes #129 --- README.md | 3 ++ avr/boards.txt | 99 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 102 insertions(+) diff --git a/README.md b/README.md index da4682c6d..a17abed4c 100644 --- a/README.md +++ b/README.md @@ -66,8 +66,11 @@ You might experience upload issues when using the internal oscillator. It's fact | 11.0592 MHz | External crystal/oscillator | Great clock for UART communication with no error | | 8 MHz | External crystal/oscillator | Common clock when working with 3.3V | | 7.3728 MHz | External crystal/oscillator | Great clock for UART communication with no error | +| 4 MHz | External crystal/oscillator | | | 3.6864 MHz | External crystal/oscillator | Great clock for UART communication with no error | +| 2 MHz | External crystal/oscillator | | | 1.8432 MHz | External crystal/oscillator | Great clock for UART communication with no error | +| 1 MHz | External crystal/oscillator | | | 8 MHz | Internal oscillator | Might cause UART upload issues. See comment above this table | | 4 MHz | Internal oscillator | Derived from the 8 MHz internal oscillator | | 2 MHz | Internal oscillator | Derived from the 8 MHz internal oscillator | diff --git a/avr/boards.txt b/avr/boards.txt index 949e81e76..8f6308dec 100644 --- a/avr/boards.txt +++ b/avr/boards.txt @@ -172,6 +172,13 @@ menu.bootloader=Bootloader 328.menu.clock.7_3728MHz_external.build.clock_speed={build.f_cpu} 328.menu.clock.7_3728MHz_external.build.f_cpu=7372800L +328.menu.clock.4MHz_external=External 4 MHz +328.menu.clock.4MHz_external.upload.speed=9600 +328.menu.clock.4MHz_external.bootloader.low_fuses=0b1111{bootloader.cksel_bits} +328.menu.clock.4MHz_external.build.clkpr= +328.menu.clock.4MHz_external.build.clock_speed={build.f_cpu} +328.menu.clock.4MHz_external.build.f_cpu=4000000L + 328.menu.clock.3_6864MHz_external=External 3.6864 MHz 328.menu.clock.3_6864MHz_external.upload.speed=115200 328.menu.clock.3_6864MHz_external.bootloader.low_fuses=0b1111{bootloader.cksel_bits} @@ -179,6 +186,13 @@ menu.bootloader=Bootloader 328.menu.clock.3_6864MHz_external.build.clock_speed={build.f_cpu} 328.menu.clock.3_6864MHz_external.build.f_cpu=3686400L +328.menu.clock.2MHz_external=External 2 MHz +328.menu.clock.2MHz_external.upload.speed=9600 +328.menu.clock.2MHz_external.bootloader.low_fuses=0b1111{bootloader.cksel_bits} +328.menu.clock.2MHz_external.build.clkpr= +328.menu.clock.2MHz_external.build.clock_speed={build.f_cpu} +328.menu.clock.2MHz_external.build.f_cpu=2000000L + 328.menu.clock.1_8432MHz_external=External 1.8432 MHz 328.menu.clock.1_8432MHz_external.upload.speed=115200 328.menu.clock.1_8432MHz_external.bootloader.low_fuses=0b1111{bootloader.cksel_bits} @@ -186,6 +200,13 @@ menu.bootloader=Bootloader 328.menu.clock.1_8432MHz_external.build.clock_speed={build.f_cpu} 328.menu.clock.1_8432MHz_external.build.f_cpu=1843200L +328.menu.clock.1MHz_external=External 1 MHz +328.menu.clock.1MHz_external.upload.speed=9600 +328.menu.clock.1MHz_external.bootloader.low_fuses=0b1111{bootloader.cksel_bits} +328.menu.clock.1MHz_external.build.clkpr= +328.menu.clock.1MHz_external.build.clock_speed={build.f_cpu} +328.menu.clock.1MHz_external.build.f_cpu=1000000L + 328.menu.clock.8MHz_internal=Internal 8 MHz 328.menu.clock.8MHz_internal.upload.speed=38400 328.menu.clock.8MHz_internal.bootloader.low_fuses=0xe2 @@ -341,6 +362,13 @@ menu.bootloader=Bootloader 168.menu.clock.7_3728MHz_external.build.clock_speed={build.f_cpu} 168.menu.clock.7_3728MHz_external.build.f_cpu=7372800L +168.menu.clock.4MHz_external=External 4 MHz +168.menu.clock.4MHz_external.upload.speed=9600 +168.menu.clock.4MHz_external.bootloader.low_fuses=0b1111{bootloader.cksel_bits} +168.menu.clock.4MHz_external.build.clkpr= +168.menu.clock.4MHz_external.build.clock_speed={build.f_cpu} +168.menu.clock.4MHz_external.build.f_cpu=4000000L + 168.menu.clock.3_6864MHz_external=External 3.6864 MHz 168.menu.clock.3_6864MHz_external.upload.speed=115200 168.menu.clock.3_6864MHz_external.bootloader.low_fuses=0b1111{bootloader.cksel_bits} @@ -348,6 +376,13 @@ menu.bootloader=Bootloader 168.menu.clock.3_6864MHz_external.build.clock_speed={build.f_cpu} 168.menu.clock.3_6864MHz_external.build.f_cpu=3686400L +168.menu.clock.2MHz_external=External 2 MHz +168.menu.clock.2MHz_external.upload.speed=9600 +168.menu.clock.2MHz_external.bootloader.low_fuses=0b1111{bootloader.cksel_bits} +168.menu.clock.2MHz_external.build.clkpr= +168.menu.clock.2MHz_external.build.clock_speed={build.f_cpu} +168.menu.clock.2MHz_external.build.f_cpu=2000000L + 168.menu.clock.1_8432MHz_external=External 1.8432 MHz 168.menu.clock.1_8432MHz_external.upload.speed=115200 168.menu.clock.1_8432MHz_external.bootloader.low_fuses=0b1111{bootloader.cksel_bits} @@ -355,6 +390,13 @@ menu.bootloader=Bootloader 168.menu.clock.1_8432MHz_external.build.clock_speed={build.f_cpu} 168.menu.clock.1_8432MHz_external.build.f_cpu=1843200L +168.menu.clock.1MHz_external=External 1 MHz +168.menu.clock.1MHz_external.upload.speed=9600 +168.menu.clock.1MHz_external.bootloader.low_fuses=0b1111{bootloader.cksel_bits} +168.menu.clock.1MHz_external.build.clkpr= +168.menu.clock.1MHz_external.build.clock_speed={build.f_cpu} +168.menu.clock.1MHz_external.build.f_cpu=1000000L + 168.menu.clock.8MHz_internal=Internal 8 MHz 168.menu.clock.8MHz_internal.upload.speed=38400 168.menu.clock.8MHz_internal.bootloader.low_fuses=0xe2 @@ -509,6 +551,13 @@ menu.bootloader=Bootloader 88.menu.clock.7_3728MHz_external.build.clock_speed={build.f_cpu} 88.menu.clock.7_3728MHz_external.build.f_cpu=7372800L +88.menu.clock.4MHz_external=External 4 MHz +88.menu.clock.4MHz_external.upload.speed=9600 +88.menu.clock.4MHz_external.bootloader.low_fuses=0b1111{bootloader.cksel_bits} +88.menu.clock.4MHz_external.build.clkpr= +88.menu.clock.4MHz_external.build.clock_speed={build.f_cpu} +88.menu.clock.4MHz_external.build.f_cpu=4000000L + 88.menu.clock.3_6864MHz_external=External 3.6864 MHz 88.menu.clock.3_6864MHz_external.upload.speed=115200 88.menu.clock.3_6864MHz_external.bootloader.low_fuses=0b1111{bootloader.cksel_bits} @@ -516,6 +565,13 @@ menu.bootloader=Bootloader 88.menu.clock.3_6864MHz_external.build.clock_speed={build.f_cpu} 88.menu.clock.3_6864MHz_external.build.f_cpu=3686400L +88.menu.clock.2MHz_external=External 2 MHz +88.menu.clock.2MHz_external.upload.speed=9600 +88.menu.clock.2MHz_external.bootloader.low_fuses=0b1111{bootloader.cksel_bits} +88.menu.clock.2MHz_external.build.clkpr= +88.menu.clock.2MHz_external.build.clock_speed={build.f_cpu} +88.menu.clock.2MHz_external.build.f_cpu=2000000L + 88.menu.clock.1_8432MHz_external=External 1.8432 MHz 88.menu.clock.1_8432MHz_external.upload.speed=115200 88.menu.clock.1_8432MHz_external.bootloader.low_fuses=0b1111{bootloader.cksel_bits} @@ -523,6 +579,13 @@ menu.bootloader=Bootloader 88.menu.clock.1_8432MHz_external.build.clock_speed={build.f_cpu} 88.menu.clock.1_8432MHz_external.build.f_cpu=1843200L +88.menu.clock.1MHz_external=External 1 MHz +88.menu.clock.1MHz_external.upload.speed=9600 +88.menu.clock.1MHz_external.bootloader.low_fuses=0b1111{bootloader.cksel_bits} +88.menu.clock.1MHz_external.build.clkpr= +88.menu.clock.1MHz_external.build.clock_speed={build.f_cpu} +88.menu.clock.1MHz_external.build.f_cpu=1000000L + 88.menu.clock.8MHz_internal=Internal 8 MHz 88.menu.clock.8MHz_internal.upload.speed=38400 88.menu.clock.8MHz_internal.bootloader.low_fuses=0xe2 @@ -664,18 +727,36 @@ menu.bootloader=Bootloader 48.menu.clock.7_3728MHz_external.build.clkpr= 48.menu.clock.7_3728MHz_external.build.f_cpu=7372800L +48.menu.clock.4MHz_external=External 4 MHz +48.menu.clock.4MHz_external.upload.speed=9600 +48.menu.clock.4MHz_external.bootloader.low_fuses=0b1111{bootloader.cksel_bits} +48.menu.clock.4MHz_external.build.clkpr= +48.menu.clock.4MHz_external.build.f_cpu=4000000L + 48.menu.clock.3_6864MHz_external=External 3.6864 MHz 48.menu.clock.3_6864MHz_external.upload.speed=115200 48.menu.clock.3_6864MHz_external.bootloader.low_fuses=0b1111{bootloader.cksel_bits} 48.menu.clock.3_6864MHz_external.build.clkpr= 48.menu.clock.3_6864MHz_external.build.f_cpu=3686400L +48.menu.clock.2MHz_external=External 2 MHz +48.menu.clock.2MHz_external.upload.speed=9600 +48.menu.clock.2MHz_external.bootloader.low_fuses=0b1111{bootloader.cksel_bits} +48.menu.clock.2MHz_external.build.clkpr= +48.menu.clock.2MHz_external.build.f_cpu=2000000L + 48.menu.clock.1_8432MHz_external=External 1.8432 MHz 48.menu.clock.1_8432MHz_external.upload.speed=115200 48.menu.clock.1_8432MHz_external.bootloader.low_fuses=0b1111{bootloader.cksel_bits} 48.menu.clock.1_8432MHz_external.build.clkpr= 48.menu.clock.1_8432MHz_external.build.f_cpu=1843200L +48.menu.clock.1MHz_external=External 1 MHz +48.menu.clock.1MHz_external.upload.speed=9600 +48.menu.clock.1MHz_external.bootloader.low_fuses=0b1111{bootloader.cksel_bits} +48.menu.clock.1MHz_external.build.clkpr= +48.menu.clock.1MHz_external.build.f_cpu=1000000L + 48.menu.clock.8MHz_internal=Internal 8 MHz 48.menu.clock.8MHz_internal.upload.speed=38400 48.menu.clock.8MHz_internal.bootloader.low_fuses=0xe2 @@ -803,18 +884,36 @@ menu.bootloader=Bootloader 8.menu.clock.7_3728MHz_external.bootloader.ckopt_bit=0 8.menu.clock.7_3728MHz_external.build.f_cpu=7372800L +8.menu.clock.4MHz_external=External 4 MHz +8.menu.clock.4MHz_external.upload.speed=9600 +8.menu.clock.4MHz_external.bootloader.sut_cksel_bits=111111 +8.menu.clock.4MHz_external.bootloader.ckopt_bit=0 +8.menu.clock.4MHz_external.build.f_cpu=4000000L + 8.menu.clock.3_6864MHz_external=External 3.6864 MHz 8.menu.clock.3_6864MHz_external.upload.speed=115200 8.menu.clock.3_6864MHz_external.bootloader.sut_cksel_bits=111111 8.menu.clock.3_6864MHz_external.bootloader.ckopt_bit=0 8.menu.clock.3_6864MHz_external.build.f_cpu=3686400L +8.menu.clock.2MHz_external=External 2 MHz +8.menu.clock.2MHz_external.upload.speed=9600 +8.menu.clock.2MHz_external.bootloader.sut_cksel_bits=111111 +8.menu.clock.2MHz_external.bootloader.ckopt_bit=0 +8.menu.clock.2MHz_external.build.f_cpu=2000000L + 8.menu.clock.1_8432MHz_external=External 1.8432 MHz 8.menu.clock.1_8432MHz_external.upload.speed=115200 8.menu.clock.1_8432MHz_external.bootloader.sut_cksel_bits=111111 8.menu.clock.1_8432MHz_external.bootloader.ckopt_bit=0 8.menu.clock.1_8432MHz_external.build.f_cpu=1843200L +8.menu.clock.1MHz_external=External 1 MHz +8.menu.clock.1MHz_external.upload.speed=9600 +8.menu.clock.1MHz_external.bootloader.sut_cksel_bits=111111 +8.menu.clock.1MHz_external.bootloader.ckopt_bit=0 +8.menu.clock.1MHz_external.build.f_cpu=1000000L + 8.menu.clock.8MHz_internal=Internal 8 MHz 8.menu.clock.8MHz_internal.upload.speed=38400 8.menu.clock.8MHz_internal.bootloader.sut_cksel_bits=100100