发现是我理解错了,CPU clock speed 不等于外部晶振的频率。 但是我把这些宏定义无论让哪个起作用,
- -----------------------------------------------------------------------------*/
- //#define CPU_RATE 6.667L // for a 150MHz CPU clock speed (SYSCLKOUT)
- //#define CPU_RATE 7.143L // for a 140MHz CPU clock speed (SYSCLKOUT)
- //#define CPU_RATE 8.333L // for a 120MHz CPU clock speed (SYSCLKOUT)
- #define CPU_RATE 10.000L // for a 100MHz CPU clock speed (SYSCLKOUT)
- //#define CPU_RATE 13.330L // for a 75MHz CPU clock speed (SYSCLKOUT)
- //#define CPU_RATE 20.000L // for a 50MHz CPU clock speed (SYSCLKOUT)
- //#define CPU_RATE 33.333L // for a 30MHz CPU clock speed (SYSCLKOUT)
- //#define CPU_RATE 41.667L // for a 24MHz CPU clock speed (SYSCLKOUT)
- //#define CPU_RATE 50.000L // for a 20MHz CPU clock speed (SYSCLKOUT)
- //#define CPU_RATE 66.667L // for a 15MHz CPU clock speed (SYSCLKOUT)
- //#define CPU_RATE 100.000L // for a 10MHz CPU clock speed (SYSCLKOUT)
延时的clock都没变