@@ -40,7 +40,7 @@ void set_audioClock(int nfact, int32_t nmult, uint32_t ndiv) // sets PLL4 | |||
CCM_ANALOG_PLL_AUDIO = 0; | |||
//CCM_ANALOG_PLL_AUDIO |= CCM_ANALOG_PLL_AUDIO_BYPASS; | |||
CCM_ANALOG_PLL_AUDIO |= CCM_ANALOG_PLL_AUDIO_ENABLE | |||
| CCM_ANALOG_PLL_AUDIO_POST_DIV_SELECT(2) // 0: 1/4; 1: 1/2; 0: 1/1 | |||
| CCM_ANALOG_PLL_AUDIO_POST_DIV_SELECT(2) // 2: 1/4; 1: 1/2; 0: 1/1 | |||
| CCM_ANALOG_PLL_AUDIO_DIV_SELECT(nfact); | |||
CCM_ANALOG_PLL_AUDIO_NUM = nmult & CCM_ANALOG_PLL_AUDIO_NUM_MASK; |
@@ -32,10 +32,17 @@ | |||
#ifndef imxr_hw_h_ | |||
#define imxr_hw_h_ | |||
#define IMXRT_CACHE_ENABLED 2 // 0=disabled, 1=WT, 2= WB | |||
#include <Arduino.h> | |||
#include <imxrt.h> | |||
void set_audioClock(int nfact, int32_t nmult, uint32_t ndiv); // sets PLL4 | |||
#endif | |||
#else | |||
//No IMXRT | |||
#define IMXRT_CACHE_ENABLED 0 | |||
#endif | |||