rtc_clk_apll_enable函数调用失败

ESP_igrr
Posts: 2071
Joined: Tue Dec 01, 2015 8:37 am

Re: rtc_clk_apll_enable函数调用失败

Postby ESP_igrr » Tue Apr 18, 2017 8:20 am

rtc_clk_apll_enable is used to enable/disable APLL (Audio PLL); Audio PLL can be used as a clock source for I2S peripheral. Not related to I2C :)

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: rtc_clk_apll_enable函数调用失败

Postby WiFive » Tue Apr 18, 2017 8:35 am

To be more specific all the I2C references are related to the internal control bus, not i2c peripheral.

https://github.com/espressif/esp-idf/bl ... _clk.h#L29

BuddyCasino
Posts: 263
Joined: Sun Jun 19, 2016 12:00 am

Re: rtc_clk_apll_enable函数调用失败

Postby BuddyCasino » Tue Apr 18, 2017 8:42 am

WiFive wrote:To be more specific all the I2C references are related to the internal control bus, not i2c peripheral.
I see, thanks for the explanation. So when I call rtc_clk_apll_enable(), is it a "global" setting, or do I have to specifically connect it to the I2S clock domain somehow?

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: rtc_clk_apll_enable函数调用失败

Postby WiFive » Tue Apr 18, 2017 8:49 am

I2S_CLKA_ENA Set this bit to enable clk_apll. (R/W)

https://github.com/espressif/esp-idf/bl ... i2s.c#L161

User avatar
Jakobsen
Posts: 89
Joined: Mon Jan 16, 2017 8:12 am

Re: rtc_clk_apll_enable函数调用失败

Postby Jakobsen » Tue Apr 18, 2017 8:59 am

Hi
To my understand on rev_0 hardware the APLL resolution is not good enough for generating a 2.8224 Mhz i2s clock due to bug on sdm1 and sdm0.
On rev_0 we can use normal PLL to generate i2s clock close to 2.822 MHz but it will have clock jitter. I did measurements on noise floor due to that clock jitter and hear a 16-18 dB higher audible noise floor compared to Raspberry PI2 setup.

When we have rev_1 device set enable and configure APLL for 2.822 MHz (or what ever we need) and let the i2s hardware use APLL clock as clock source - All that will just be done internal in the i2s driver layer.

Is that correct?
/j
Analog Digital IC designer / DevOps @ Merus Audio, Copenhagen, Denmark.
We do novel and best in class Audio amplifiers for consumer products.
Programmed assembler for C-64 back in 1980's, learned some electronics - hacking since then

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: rtc_clk_apll_enable函数调用失败

Postby WiFive » Tue Apr 18, 2017 11:19 am

Jakobsen wrote:Hi
To my understand on rev_0 hardware the APLL resolution is not good enough for generating a 2.8224 Mhz i2s clock due to bug on sdm1 and sdm0.
Yes sounds right, my only question was in the meantime could you use APLL to get a better starting freq for I2S clock divider to achieve a marginal improvement of bck jitter or not worth it.

BuddyCasino
Posts: 263
Joined: Sun Jun 19, 2016 12:00 am

Re: rtc_clk_apll_enable函数调用失败

Postby BuddyCasino » Tue Apr 18, 2017 11:34 am

Alright then, where do you get the new rev1 chips from? Does the the DevkitC v2 always use the new revision? It seems to be sold out everywhere I looked.

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: rtc_clk_apll_enable函数调用失败

Postby WiFive » Tue Apr 18, 2017 12:35 pm

Rev1 not really available yet, only hint is some products quoting mid may.

User avatar
Jakobsen
Posts: 89
Joined: Mon Jan 16, 2017 8:12 am

Re: rtc_clk_apll_enable函数调用失败

Postby Jakobsen » Tue Apr 18, 2017 1:19 pm

Hi All

Audio using normal PLL on rev_0 is OK for prototyping and to get the party started.

Your will hear a 'hiss' type noise if you dare to face ear close to speaker. But when your crank up the volume, noise it is covered.

Below 1KHz sine using 32 sample lookup table on ESP32 rev_0 PLL clock - 24bits@44.1k sample-rate in to Merus audio digital input power amplifier (MA12040P)
Image

Below raspberry pi2 i2s output same setup. Only noise floor. Raspberry Pi2 not considered audiophile due to clock jitter on i2s_bck!
Image

/j
Analog Digital IC designer / DevOps @ Merus Audio, Copenhagen, Denmark.
We do novel and best in class Audio amplifiers for consumer products.
Programmed assembler for C-64 back in 1980's, learned some electronics - hacking since then

Who is online

Users browsing this forum: jsmith56x, sterisa and 284 guests