diff options
| author | robert-hh <robert@hammelrath.com> | 2021-06-02 09:00:05 +0200 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2021-06-03 13:03:02 +1000 |
| commit | d79105d7c0f68e65ff175b752d9895241e355c08 (patch) | |
| tree | 9fccfaf3c706c4450d3e39551e5f219ee47bebad | |
| parent | cdd95ce73705ec8dc5249a7e22092a8ce374576d (diff) | |
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.
| -rw-r--r-- | ports/mimxrt/machine_timer.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/ports/mimxrt/machine_timer.c b/ports/mimxrt/machine_timer.c index 260873ae6..334a020c1 100644 --- a/ports/mimxrt/machine_timer.c +++ b/ports/mimxrt/machine_timer.c @@ -36,7 +36,7 @@ #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); |
