If I am willing to lose accuracy with the built in delay functions, is it absolutely critical to know the clock speed at compile time?
I'm trying to write some software that will function on two different board types (same MCU) with two different speed crystals. At power up, the board will read an identifier out of EEPROM to tell the software what board type it is running on, which will configure the rest of the software behavior (including setting the baud rates appropriately for its UART interfaces). Is there any other drawback to having an incorrect clock specified at run time?
I would probably specify something halfway between the two crystal frequencies.