Page 1 of 2
40 MHz Crystal mandatory?
Posted: Tue Jul 18, 2017 3:34 am
by hassan789
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.
Re: 40 MHz Crystal mandatory?
Posted: Tue Jul 18, 2017 3:39 am
by WiFive
Re: 40 MHz Crystal mandatory?
Posted: Tue Jul 18, 2017 4:07 am
by hassan789
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....
Re: 40 MHz Crystal mandatory?
Posted: Tue Jul 18, 2017 6:09 am
by ESP_Sprite
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?
Re: 40 MHz Crystal mandatory?
Posted: Tue Jul 18, 2017 6:51 am
by loboris
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).
Re: 40 MHz Crystal mandatory?
Posted: Tue Jul 18, 2017 9:32 am
by ESP_Sprite
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.
Re: 40 MHz Crystal mandatory?
Posted: Tue Jul 18, 2017 3:29 pm
by loboris
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...
Re: 40 MHz Crystal mandatory?
Posted: Wed Jul 19, 2017 1:47 am
by ESP_Sprite
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.
Re: 40 MHz Crystal mandatory?
Posted: Thu Jul 20, 2017 2:08 am
by hassan789
Thanks ESP_SPRITE
I will wait for your feedback
For now I will assume, 40MHz is superior
Re: 40 MHz Crystal mandatory?
Posted: Mon Jul 24, 2017 3:18 am
by ESP_Sprite
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.