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