40 MHz Crystal mandatory?

User avatar
hassan789
Posts: 154
Joined: Thu Jun 29, 2017 2:15 am

40 MHz Crystal mandatory?

Postby hassan789 » Tue Jul 18, 2017 3:34 am

Per the hardware design guide, they are recommending a 40MHz crystal.
However, all the designs and dev boards I see use a 26MHz crystal. Can someone explain this?

Notes: I am using the D2WD chip.
Attachments
Capture.JPG
Capture.JPG (79.25 KiB) Viewed 6656 times

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

Re: 40 MHz Crystal mandatory?

Postby WiFive » Tue Jul 18, 2017 3:39 am


User avatar
hassan789
Posts: 154
Joined: Thu Jun 29, 2017 2:15 am

Re: 40 MHz Crystal mandatory?

Postby hassan789 » Tue Jul 18, 2017 4:07 am

I read that thread, it didn't really answer any questions. Unless I missed something. I know that the menuconfig has the option to support 26MHz too... is it better to use the 40MHz? I would rather use the 26MHz....

ESP_Sprite
Posts: 4027
Joined: Thu Nov 26, 2015 4:08 am

Re: 40 MHz Crystal mandatory?

Postby ESP_Sprite » Tue Jul 18, 2017 6:09 am

I think the design guidelines are outdated; I'll ask the documentation team if they can update them.

Edit: one of the things that does come to mind is that if you want to have low-power operations but WiFi/BT enabled, with 40MHz, you can run the CPU at crystal speed without needing the PLL. WiFi etc won't function at 26MHz, so with a crystal like that you're forced to use the next step up, which is 80MHz from the internal PLL. Not true, WiFi/BT need the 80MHz APB to be up.

More edit: We do have support for 26MHz crystals, but it's not used much yet, so there may be issues. Can I ask where you saw those ESP32 boards that use 26MHz crystals?

User avatar
loboris
Posts: 514
Joined: Wed Dec 21, 2016 7:40 pm

Re: 40 MHz Crystal mandatory?

Postby loboris » Tue Jul 18, 2017 6:51 am

ESP_Sprite wrote:Can I ask where you saw those ESP32 boards that use 26MHz crystals?
SparkFun ESP32 Thing and some Widora Air clones uses 26MHz crystans...
I've had no issues with them (yet).

ESP_Sprite
Posts: 4027
Joined: Thu Nov 26, 2015 4:08 am

Re: 40 MHz Crystal mandatory?

Postby ESP_Sprite » Tue Jul 18, 2017 9:32 am

Fyi, 26MHz crystals can work (as the Sparkfun Thing etc demonstrate) but may have a somewhat more limited operation range, which is why we advise the 40MHz crystals. I'll ask my colleagues for more details and I'll post them as soon as I know them.

User avatar
loboris
Posts: 514
Joined: Wed Dec 21, 2016 7:40 pm

Re: 40 MHz Crystal mandatory?

Postby loboris » Tue Jul 18, 2017 3:29 pm

ESP_Sprite wrote:...but may have a somewhat more limited operation range...
Are you referring to the WiFi range? I've actually noticed worse WiFi performance on ESP32 Thing compared to ESP-WROVER-KIT...

ESP_Sprite
Posts: 4027
Joined: Thu Nov 26, 2015 4:08 am

Re: 40 MHz Crystal mandatory?

Postby ESP_Sprite » Wed Jul 19, 2017 1:47 am

I meant more wrt temperature, supply voltage etc, but it may also affect the WiFi range for all I know. I'm still talking to the HW/RF engineers to figure out what the exact issue is, if any.

User avatar
hassan789
Posts: 154
Joined: Thu Jun 29, 2017 2:15 am

Re: 40 MHz Crystal mandatory?

Postby hassan789 » Thu Jul 20, 2017 2:08 am

Thanks ESP_SPRITE
I will wait for your feedback

For now I will assume, 40MHz is superior

ESP_Sprite
Posts: 4027
Joined: Thu Nov 26, 2015 4:08 am

Re: 40 MHz Crystal mandatory?

Postby ESP_Sprite » Mon Jul 24, 2017 3:18 am

To come back to this: It seems that the issue is that our phy code from a while back (=end of 2016) had an issue where some ESP32s failed to lock their PLL when conencted to a 26MHz crystal. The end result would be that you'd have no BL/WiFi connectivity: you would see no WiFi APs and BT communications would always fail. We have fixed that issue in the phy code and from what I can tell esp-idf v2.0 and later should have this fix. The reason why we still advise 40MHz is that we haven't properly verified it: it looks like 26MHz works perfectly fine but before we tell people it is safe to use, we need to see if we do not see issues over the entire voltage and temperature range.

Who is online

Users browsing this forum: No registered users and 14 guests