Hi,
when I feed the I2S with PCM data, I found the audio speed is much more faster than it should be, but after I modified the board init frequency, it goes slower, I tried from 180MHz to 48MHz(the function I used is BOARD_BootClockFROHF48M/96M, BOARD_BootClockPLL180M();). So, what's the right way to configure the I2S clock?
Best Regards,
Rui
Hi rui wang,
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi rui wang.
Thanks for your reply.
I was wondering if you can describe the steps of replicating the phenomenon and illustrate the sampled output wave,
it will help me to work it out.
Have a great day,
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Jeremy,
Sorry for the late response, I reused the i2s_interrupt_transfer demo from the SDK, and did some modifications.
1, init the i2s device as the demo.
2, use another thread to push the pcm raw data to the i2s peripherial like this:
void audio_data_push(uint8_t* buff, uint32_t len)
{
status_t stat = kStatus_Fail;
s_TxTransfer.data = buff;
s_TxTransfer.dataSize = len;
while(stat == kStatus_Fail){
stat = I2S_TxTransferNonBlocking(DEMO_I2S_TX, &s_TxHandle, s_TxTransfer);
if(stat == kStatus_Fail){
vTaskDelay(0);
}
}
}
and this works good, but after I modify the boot clock, the audio will play abnormally.
BOARD_BootClockFROHF48M(); // too slow
BOARD_BootClockFROHF96M(); //normal
BOARD_BootClockPLL180M(); //too fast
then what other parameters should I set if I modify the demo boot clock?
Thanks.
Best Regards,
Rui
Hi rui wang,
Thanks for your reply.
Before answer your question, Whether you can tell me which chip and version of SDK you built.
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Jeremy,
the board LPCXpresso54608, OM13092, applied from eeboard, http://www.mouser.cn/new/nxp-semiconductors/nxp-lpcxpresso54608/
and the SDK Version: KSDK 2.3.0 (2017-11-16),
I use MCUXpressoIDE_10.1.0_589 environment for the project.
Hi rui wang,
In the SDK, the clock of I2S is from the audio_pll_clk which is configured in the CLOCK_SetupAudioPLLData(), however
the BOARD_BootClockFROHF48M/96M, BOARD_BootClockPLL180M() are used to configure the SystemCoreClock.
Hope this is clear.
Have a great day,
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------