The LPC55s28 DMA transmits USB data through ADAU1761 waveform abnormality

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

The LPC55s28 DMA transmits USB data through ADAU1761 waveform abnormality

跳至解决方案
706 次查看
MHY_0878
Contributor I

Hello seniors, I am using PC audio software to send audio data to MCU through USB, MCU automatically carries audio data to I2S through DMA, the data enters the ADAU1761 through I2S, and outputs through DAC, but the problem now is that the data waveform is incorrect after the audio data is transmitted to the ADAU1761 through USB. A few days ago, I have been testing DMA to transfer I2S data, and confirmed that DMA is no problem to transfer I2S data, but now the possible problem is that the format of USB transfer data does not match the format of DMA transmission.

My I2S configuration is 12.288mhz for MCLK, 48khz for LRCK, 3.072mhz for BCLK, left-aligned, frame length 64 bits, 24 bits of valid data, and the remaining 8 bits of 0 padding, DMA transmission is 32-bit transmission, USB partial configuration is 24-bit depth, 48khz sample rate.

Please give me your advice.
Thank you.

Attach my code at the end

0 项奖励
回复
1 解答
655 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @MHY_0878 

now the possible problem is that the format of USB transfer data does not match the format of DMA transmission.

->> The most likely issue is a mismatch between the USB data format and the I2S/DMA configuration. Carefully verify the data formats at each stage (USB, MCU, I2S, and ADAU1761) and use debugging tools to identify where the waveform becomes incorrect. Once the mismatch is identified, adjust the software to ensure compatibility.

For example 

  • Use a logic analyzer or debug tool to capture the USB data stream and verify its format.
  • Since DMA is configured for 32-bit transmission, ensure the MCU is correctly handling the 24-bit audio data with 8-bit padding.
  • If the USB data is 24-bit without padding, you may need to add the 8-bit padding in the MCU before sending it to I2S.
  • Use a logic analyzer to capture the I2S signals (MCLK, BCLK, LRCK, and data) and compare them with the expected waveform.

 

BR

Alice

在原帖中查看解决方案

0 项奖励
回复
2 回复数
656 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @MHY_0878 

now the possible problem is that the format of USB transfer data does not match the format of DMA transmission.

->> The most likely issue is a mismatch between the USB data format and the I2S/DMA configuration. Carefully verify the data formats at each stage (USB, MCU, I2S, and ADAU1761) and use debugging tools to identify where the waveform becomes incorrect. Once the mismatch is identified, adjust the software to ensure compatibility.

For example 

  • Use a logic analyzer or debug tool to capture the USB data stream and verify its format.
  • Since DMA is configured for 32-bit transmission, ensure the MCU is correctly handling the 24-bit audio data with 8-bit padding.
  • If the USB data is 24-bit without padding, you may need to add the 8-bit padding in the MCU before sending it to I2S.
  • Use a logic analyzer to capture the I2S signals (MCLK, BCLK, LRCK, and data) and compare them with the expected waveform.

 

BR

Alice

0 项奖励
回复
570 次查看
MHY_0878
Contributor I
Thank you for your reply, the issue has been resolved.
MHY
0 项奖励
回复