Hi,
Setting up DMA is okay, implementing the isr to update the buffer with my data is okay
but
the Compiler halts at
set_audioClock(c0, c1, c2);
What header must I include?
The closest thing I could find that resembles set_audioClock(c0, c1, c2);
is:
void set_audioClock(int nfact, int32_t nmult, uint32_t ndiv, bool force = false); // sets PLL4
but I have no idea where the code for set_audioClock is.
Setting up DMA is okay, implementing the isr to update the buffer with my data is okay
but
the Compiler halts at
set_audioClock(c0, c1, c2);
What header must I include?
The closest thing I could find that resembles set_audioClock(c0, c1, c2);
is:
void set_audioClock(int nfact, int32_t nmult, uint32_t ndiv, bool force = false); // sets PLL4
but I have no idea where the code for set_audioClock is.
Code:
//PLL:
int fs = 44100.0f;//AUDIO_SAMPLE_RATE_EXACT;
// PLL between 27*24 = 648MHz und 54*24=1296MHz
int n1 = 4; //SAI prescaler 4 => (n1*n2) = multiple of 4
int n2 = 1 + (24000000 * 27) / (fs * 256 * n1);
double C = ((double)fs * 256 * n1 * n2) / 24000000;
int c0 = C;
int c2 = 10000;
int c1 = C * c2 - (c0 * c2);
set_audioClock(c0, c1, c2);
Last edited: