浏览代码

Merge pull request #338 from Defragster/patch-1

Drop CPU speed and TEMP when faulted offline
teensy4-core
Paul Stoffregen 6 年前
父节点
当前提交
529d466336
没有帐户链接到提交者的电子邮件
共有 1 个文件被更改,包括 6 次插入2 次删除
  1. +6
    -2
      teensy4/startup.c

+ 6
- 2
teensy4/startup.c 查看文件

@@ -302,6 +302,8 @@ void unused_interrupt_vector(void)
printf(" %x\n", addr);
#endif
#if 1
if ( F_CPU_ACTUAL >= 600000000 )
set_arm_clock(100000000);
IOMUXC_SW_MUX_CTL_PAD_GPIO_B0_03 = 5; // pin 13
IOMUXC_SW_PAD_CTL_PAD_GPIO_B0_03 = IOMUXC_PAD_DSE(7);
GPIO2_GDIR |= (1<<3);
@@ -309,11 +311,13 @@ void unused_interrupt_vector(void)
while (1) {
volatile uint32_t n;
GPIO2_DR_SET = (1<<3); //digitalWrite(13, HIGH);
for (n=0; n < 2000000; n++) ;
for (n=0; n < 2000000/6; n++) ;
GPIO2_DR_CLEAR = (1<<3); //digitalWrite(13, LOW);
for (n=0; n < 1500000; n++) ;
for (n=0; n < 1500000/6; n++) ;
}
#else
if ( F_CPU_ACTUAL >= 600000000 )
set_arm_clock(100000000);
while (1) {
}
#endif

正在加载...
取消
保存