mimxrt/machine_timer: Leave the Timer clock source at IPG clock.
Setting it to OSC_CLK interferes the utime module's functionality.  This is
still an area demanding an understanding.
#define TIMER_MIN_PERIOD 1
#define alarm_callback PIT_IRQHandler
-#define PIT_SOURCE_CLOCK CLOCK_GetFreq(kCLOCK_OscClk)
+#define PIT_SOURCE_CLOCK CLOCK_GetIpgFreq()
#define PIT_IRQ_ID PIT_IRQn
typedef struct _machine_timer_obj_t {
@@ -194,8 +194,6 @@ void machine_timer_init_PIT(void) {
// PIT timer
// Enable clock gate for GPIO1
CLOCK_EnableClock(kCLOCK_Gpio1); // ?
- // Set PERCLK_CLK source to OSC_CLK
- CLOCK_SetMux(kCLOCK_PerclkMux, 1U);
// Set PERCLK_CLK divider to 1
CLOCK_SetDiv(kCLOCK_PerclkDiv, 0U);
