Square or Sinewave

If you are using a standard Arduino bard then check to make sure you have the latest version, you should see this code at the beginning of the FrequencyTimer2.cpp file:

#if defined(__AVR_ATmega328P__)
// A mega328 is mostly like an mega168, in terms of peripherals
#define __AVR_ATmega168__
#endif

Download the latest version if yours does not have that code at the beginning.

If you are running the latest code, can you say what board are you using?