

I have checked both the code and the schematics of TWR-Audio-SGTL board, the SGTL5000 codec works in slave mode and synchronous mode, in other words, the Kinetis I2S interface genertates both the bit clock and frame clock, the receiver/transmitter of the codec use the same frame/bit clock. What Am I doing wrong? Do I need any additional configuration?Īs you described that the codec generates noise when the core/system frequency exceeds 168mHz, I suppose that the bit clock frequency of codec is incorrect. SAI_TransferSendEDMA(DEMO_SAI, &txHandle, &xfer) Here I have the same problem with noises at coreClock >168MHz, moreover i can play sound only once At 168MHz and lower everything runs ok for a long time. SAI_TransferSendNonBlocking(DEMO_SAI, &txHandle, &xfer) I heard some noises and after few playing loops like this I've checked all three examples (boards/twrk65f180m/driver_examples/sai ) and in all cases had some problems. er32kSrc = 2U /* ERCLK32K selection, use RTC.

pllFllFrac = 0U /* PLLFLLSEL clock divider fraction */ pllFllDiv = 0U /* PLLFLLSEL clock divider divisor */ vdiv) ĬLOCK_BootToPeeMode( kMCG_OscselOsc, kMCG_PllClkSelPll0, &g_pllConfig) Īssert( kMCG_ModePEE = CLOCK_GetMode()) enableMode = kOSC_ErClkEnable ĬLOCK_CalcPllDiv(g_xtal0Freq, BOARD_MCGOUTCLK_FREQ, &g_pllConfig. OscConfig.workMode = kOSC_ModeOscLowPower Hardware: Kinetis K26, XTAL 8MHz run at 180MHz in PEE mode, codec - SGTL5000. KSDK build with online builder: SDK_2.0_MK26FN2M0xxx18ĭemo runs under FreeRTOS (I copied examples code to created sound task). I have following problems with SAI examples on my board (custom).
