Do NOT attempt to change the fuses. If you connect an ISP programmer, you'll almost certainly destroy the bootloader. PJRC doesn't distribute that code, so this effectively ruins the board.
I always say that first, because it's so important. Again, DO NOT ATTEMPT TO CHANGE THE FUSES. I know you're doing something else... but for anyone who finds this thread looking for Teensy's fuse setting info, this warning is important. Don't connect an ISP programmer, as it will only cause a lot of grief.
The fuses CPU speed setting is merely an initial value for the clock prescaler. You can easily change the clock speed at the beginning of your program. There's no need to change the fuses. The fuses cause the CPU speed to start at 2 MHz, which allows Teensy 2.0 to boot up and run at lower voltages where 16 MHz isn't officially supported (but probably works anyway). Every C language example PJRC distributes, as well as every program built with Teensyduino, configures the CPU speed at startup, so the value in the fuses is only used for a very brief moment as the chip boots up.
Now, with all that warning and disclaimer stuff out of the way, here's the fuse settings used on Teensy 2.0:
Code:
#define FUSE_MSB 0b11011111 // pg 350, bootloader, 512 bytes, using HWB
#define FUSE_LSB 0b01011111 // pg 350, pg29 (8-16 MHz xtal), pg 31
#define FUSE_EXT 0b11110100 // pg 349, pg 51 (2.4V), HWB enabled
#define LOCK_BITS 0b11001100 // protected
Regarding this question....
The boards.txt file only sets F_CPU, so it seems that Teensyduino must be looking at the CPU speed and then setting the fuses correctly.
Actually, boards.txt has several lines that populate the Tools > CPU Speed menu, and cause your selection from that menu to set F_CPU. So it can be 16, 8, 4, 2, or 1 MHz, depending on whatever you select from that menu.
Inside the code, in hardware/teensy/cores/teensy/pins_teensy.c, the CPU speed is configure with this:
Code:
void _init_Teensyduino_internal_(void)
{
cli();
CLKPR = 0x80;
CLKPR = CPU_PRESCALER;
The value for CPU_PRESCALER is defined in wiring_private.h:
Code:
#if F_CPU == 16000000L
#define ADC_PRESCALER 0x07
#define CPU_PRESCALER 0x00
#elif F_CPU == 8000000L
#define ADC_PRESCALER 0x06
#define CPU_PRESCALER 0x01
#elif F_CPU == 4000000L
#define ADC_PRESCALER 0x05
#define CPU_PRESCALER 0x02
#elif F_CPU == 2000000L
#define ADC_PRESCALER 0x04
#define CPU_PRESCALER 0x03
#elif F_CPU == 1000000L
#define ADC_PRESCALER 0x03
#define CPU_PRESCALER 0x04
#else
#error "Teensyduino only supports 16, 8, 4, 2, 1 MHz. Please edit boards.txt"
#endif
If you're writing your own program, you probably can just hard-code the value you need.