在线时间828 小时
UID3079326
注册时间2015-2-11
NXP金币28
TA的每日心情 | 奋斗 2025-5-7 09:07 |
---|
签到天数: 353 天 连续签到: 1 天 [LV.8]以坛为家I
金牌会员
 
- 积分
- 5785
- 最后登录
- 2025-5-7
|
发表于 2017-10-13 11:20:54
|
显示全部楼层
第一个公式的由来
主频98304000
2457600 是 I2S最大MCLK时钟 256fs 即96K*256。
所以有个宏定义
- #define LPC54110_IIS_MUL LPC54110_MAIN_CLOCK/24576000
复制代码
这个结果是4。
在
- static I2S_AUDIO_FORMAT_T audio_fmt_tx = {
- I2S_TX, /*!< Data direction: tx or rx */
- NORMAL_MASTER, /*!< Master / Slave configuration */
- I2S_CLASSIC, /*!< I2S mode */
- false, /*!< right channel data in low portion of FIFO */
- false, /*!< left justify data in FIFO */
- false, /*!< data source is the D-Mic subsystem */
- false, /*!< SCK polarity */
- false, /*!< WS polarity */
- 16*LPC54110_IIS_MUL, /*!< Flexcomm function clock divider */
- 2, /*!< Channel Number - 1 is mono, 2 is stereo */
- 16, /*!< Word Width */
- 32, /*!< Frame Width */
- 0, /*!< Data position in the frame */
- 5, /*!< FIFO depth (fifo config) */
- };
复制代码
16*4==64,即分频64,为什么分频64。
因为位时钟SCK为48k*2*16==1.536MHz。正好是主时钟分频64后的值。
绕来绕去,最终的原因是
MCLK使用了96K采样率时钟。而位时钟使用了48K采样率
In general, the I2S can support:
• Standard sample rates such as 16, 22.05, 32, 44.1, 48, and 96 kHz, and others.
• External MCLK inputs up to approximately 25 MHz (256 fs of a 96 kHz sample rate)
and more. Refer to a specific device data sheet for details.
真绕啊 |
|