Browse Source

initial cache-support

dds
Frank Bösing 5 years ago
parent
commit
c99b7b7204
2 changed files with 8 additions and 1 deletions
  1. +1
    -1
      utility/imxrt_hw.cpp
  2. +7
    -0
      utility/imxrt_hw.h

+ 1
- 1
utility/imxrt_hw.cpp View File

CCM_ANALOG_PLL_AUDIO = 0; CCM_ANALOG_PLL_AUDIO = 0;
//CCM_ANALOG_PLL_AUDIO |= CCM_ANALOG_PLL_AUDIO_BYPASS; //CCM_ANALOG_PLL_AUDIO |= CCM_ANALOG_PLL_AUDIO_BYPASS;
CCM_ANALOG_PLL_AUDIO |= CCM_ANALOG_PLL_AUDIO_ENABLE 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_DIV_SELECT(nfact);


CCM_ANALOG_PLL_AUDIO_NUM = nmult & CCM_ANALOG_PLL_AUDIO_NUM_MASK; CCM_ANALOG_PLL_AUDIO_NUM = nmult & CCM_ANALOG_PLL_AUDIO_NUM_MASK;

+ 7
- 0
utility/imxrt_hw.h View File

#ifndef imxr_hw_h_ #ifndef imxr_hw_h_
#define imxr_hw_h_ #define imxr_hw_h_


#define IMXRT_CACHE_ENABLED 2 // 0=disabled, 1=WT, 2= WB

#include <Arduino.h> #include <Arduino.h>
#include <imxrt.h> #include <imxrt.h>


void set_audioClock(int nfact, int32_t nmult, uint32_t ndiv); // sets PLL4 void set_audioClock(int nfact, int32_t nmult, uint32_t ndiv); // sets PLL4


#endif #endif

#else
//No IMXRT
#define IMXRT_CACHE_ENABLED 0
#endif #endif

Loading…
Cancel
Save