Commit d79105d7 authored by robert-hh's avatar robert-hh Committed by Damien George

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.
parent cdd95ce7
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
#define TIMER_MIN_PERIOD 1 #define TIMER_MIN_PERIOD 1
#define alarm_callback PIT_IRQHandler #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 #define PIT_IRQ_ID PIT_IRQn
typedef struct _machine_timer_obj_t { typedef struct _machine_timer_obj_t {
...@@ -194,8 +194,6 @@ void machine_timer_init_PIT(void) { ...@@ -194,8 +194,6 @@ void machine_timer_init_PIT(void) {
// PIT timer // PIT timer
// Enable clock gate for GPIO1 // Enable clock gate for GPIO1
CLOCK_EnableClock(kCLOCK_Gpio1); // ? CLOCK_EnableClock(kCLOCK_Gpio1); // ?
// Set PERCLK_CLK source to OSC_CLK
CLOCK_SetMux(kCLOCK_PerclkMux, 1U);
// Set PERCLK_CLK divider to 1 // Set PERCLK_CLK divider to 1
CLOCK_SetDiv(kCLOCK_PerclkDiv, 0U); CLOCK_SetDiv(kCLOCK_PerclkDiv, 0U);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment