RT600 usb_device_audio_speaker CTIMER_SOF_TOGGLE

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

RT600 usb_device_audio_speaker CTIMER_SOF_TOGGLE

Jump to solution
893 Views
qingyunliu
Contributor I

AN13364 describe PLL adjust method according SOF in RT600, but from demo usb_device_audio_speaker , API 'CTIME_SOF_TOGGLE_HANDLER_PLL' make me confused.

could someone explain it briefly?

AN 13364.png

Labels (1)
0 Kudos
Reply
1 Solution
859 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

As the AN13364 points out in section 2.4 KL27 clock distribution, The format of USB audio device used in this example is a two-channel 48 K/24 bit data stream. If the I2S interface is configured as 48K/24 bit, the corresponding I2S_BCLK = 48 K * 24 * 2 = 2.034 M.

This is the I2S_BCLK clock route, assuming that the I2S clock divider is 1:

xiangjun_rong_0-1671088207907.png

Assume that the input clock is 16m_irc, after the Audio PLL, Audio_PLL_Divider, the output clock is 2.034MHz. But the 16m_irc frequency is not accurate and subject to temperature, so the I2S_BCLK maybe is not 2.034mhz. for example, it is 2.03Mhz, in the case, more and more data will be blocked in the buffer.

You can use a Ctimer or SCTimer or whatever, which has capture function, you can connect the USB_Toggle signal to the capture pin of Ctimer or SCTimer, connect the I2S_BCLK to input pin of Ctimer or SCTimer as tick signal, the Ctimer or SCTimer can count the external I2S_BCLK and enable capture function. In the capture ISR of Ctimer or SCTime which is triggered by the 1KHz USB_Toggle signal, the captured value will be 2034. If the capture is not 2034, you can modify the fractional value of audio_PLL to change I2S_BCLK frequency, in the end, the I2S)BCLK will reach to 2.034MHz.

Hope I explain it clearly.

BR

XiangJun Rong

 

 

View solution in original post

0 Kudos
Reply
3 Replies
860 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

As the AN13364 points out in section 2.4 KL27 clock distribution, The format of USB audio device used in this example is a two-channel 48 K/24 bit data stream. If the I2S interface is configured as 48K/24 bit, the corresponding I2S_BCLK = 48 K * 24 * 2 = 2.034 M.

This is the I2S_BCLK clock route, assuming that the I2S clock divider is 1:

xiangjun_rong_0-1671088207907.png

Assume that the input clock is 16m_irc, after the Audio PLL, Audio_PLL_Divider, the output clock is 2.034MHz. But the 16m_irc frequency is not accurate and subject to temperature, so the I2S_BCLK maybe is not 2.034mhz. for example, it is 2.03Mhz, in the case, more and more data will be blocked in the buffer.

You can use a Ctimer or SCTimer or whatever, which has capture function, you can connect the USB_Toggle signal to the capture pin of Ctimer or SCTimer, connect the I2S_BCLK to input pin of Ctimer or SCTimer as tick signal, the Ctimer or SCTimer can count the external I2S_BCLK and enable capture function. In the capture ISR of Ctimer or SCTime which is triggered by the 1KHz USB_Toggle signal, the captured value will be 2034. If the capture is not 2034, you can modify the fractional value of audio_PLL to change I2S_BCLK frequency, in the end, the I2S)BCLK will reach to 2.034MHz.

Hope I explain it clearly.

BR

XiangJun Rong

 

 

0 Kudos
Reply
666 Views
qingyunliu
Contributor I
hi xiangjun,

I can not found method as AN13364 noted: LPC54608 demo, could you mind tell me witch demo show this method?
0 Kudos
Reply
844 Views
qingyunliu
Contributor I
hi xiangjun,
thanks for you reply.
0 Kudos
Reply