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.
pull/7324/head
robert-hh 2021-06-02 09:00:05 +02:00 zatwierdzone przez Damien George
rodzic cdd95ce737
commit d79105d7c0
1 zmienionych plików z 1 dodań i 3 usunięć

Wyświetl plik

@ -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);