浏览代码

Undo PIT timer usage by ROM startup, fixes >2 IntervalTimer instances

https://forum.pjrc.com/threads/57360-Teensy4-IntervalTimer-Channels-Problem
teensy4-core
PaulStoffregen 5 年前
父节点
当前提交
87017725d6
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. +8
    -0
      teensy4/startup.c

+ 8
- 0
teensy4/startup.c 查看文件

@@ -83,6 +83,14 @@ void ResetHandler(void)
IOMUXC_GPR_GPR29 = 0xFFFFFFFF;
#endif

// Undo PIT timer usage by ROM startup
CCM_CCGR1 |= CCM_CCGR1_PIT(CCM_CCGR_ON);
PIT_MCR = 0;
PIT_TCTRL0 = 0;
PIT_TCTRL1 = 0;
PIT_TCTRL2 = 0;
PIT_TCTRL3 = 0;

// must enable PRINT_DEBUG_STUFF in debug/print.h
printf_debug_init();
printf("\n***********IMXRT Startup**********\n");

正在加载...
取消
保存