浏览代码

Support Tools > CPU Speed menu for Teensy 4.0

main
PaulStoffregen 5 年前
父节点
当前提交
f88ef12dcd
共有 2 个文件被更改,包括 7 次插入7 次删除
  1. +4
    -4
      teensy4/clockspeed.c
  2. +3
    -3
      teensy4/startup.c

+ 4
- 4
teensy4/clockspeed.c 查看文件

@@ -10,11 +10,11 @@ volatile uint32_t F_BUS_ACTUAL = 132000000;

// Define these to increase the voltage when attempting overclocking
// The frequency step is how quickly to increase voltage per frequency
// The datasheet says 1300 is the absolute maximum voltage. The hardware
// can actually create up to 1575, but going over 1300 risks damage!
// The datasheet says 1600 is the absolute maximum voltage. The hardware
// can actually create up to 1575. But 1300 is the recommended limit.
// (earlier versions of the datasheet said 1300 was the absolute max)
#define OVERCLOCK_STEPSIZE 28000000
#define OVERCLOCK_MAX_VOLT 1300
//#define OVERCLOCK_MAX_VOLT 1575 // Danger Will Robinson!
#define OVERCLOCK_MAX_VOLT 1575


uint32_t set_arm_clock(uint32_t frequency);

+ 3
- 3
teensy4/startup.c 查看文件

@@ -96,9 +96,9 @@ void ResetHandler(void)
configure_systick();
usb_pll_start();
reset_PFD(); //TODO: is this really needed?
set_arm_clock(600000000);
//set_arm_clock(984000000); Ludicrous Speed
#ifdef F_CPU
set_arm_clock(F_CPU);
#endif

asm volatile("nop\n nop\n nop\n nop": : :"memory"); // why oh why?


正在加载...
取消
保存