Arduino: error: pll_cal exceeds 2ms!!!

Created on 30 Sep 2016  Â·  20Comments  Â·  Source: esp8266/Arduino

---------------------------- Remove above -----------------------------

Basic Infos

Hardware

Hardware: ESP-12F
Core Version: last update 2.2

Description

just after soldering the fresh ESP-12F on the board and upload the helloworld example of library , its throw
error: pll_cal exceeds 2ms!!!
in every couple of second without any crash and exception, instead no connection lunched whereas serial print shows its work and gain the ip address , I've checked couple of lib example as well and also regard to this link put the wifi_set_sleep_type(NONE_SLEEP_T); inside setup but no success
is it possible the module had broken ?

Settings in IDE

Module: ?Generic ESP8266 Module?
Flash Size: ?2MB/1MB?
CPU Frequency: ?80Mhz?
Flash Mode: ?qio?
Flash Frequency: ?40Mhz?
Upload Using: ?OTA / SERIAL?
Reset Method: ?ck / nodemcu?

error: pll_cal exceeds 2ms!!!

waiting for feedback

Most helpful comment

Hi

I had the same issue and I was able to resolve it by replacing the libphy.a file (as brought into attention by @middelink) in the SDK that comes with the arduino libraries for ESP8266.
As of now, the ESP8266 arduino libraries come with SDK version 1.5.3_16_04_18. I downloaded the SDK version 2.0.0_16_08_10 from the Espressif website from here: http://bbs.espressif.com/viewtopic.php?f=46&t=2451. I replaced the old file "C:\Users\[user]\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\tools\sdk\lib\libphy.a" with the new one "ESP8266_NONOS_SDK_V2.0.0_16_08_10.zip\ESP8266_NONOS_SDK\lib\libphy.a". I compiled and uploaded my arduino code again and the issue was resolved! :)
Hope it helps!

All 20 comments

This comes directly out of the SDK libphy.a, so I don't think it is an Arduino library issue. You might want to try and wipe the entire flash area, in case there is some residual settings left. Not knowing your environment I don't know how you want to do that though.

Good luck.

thanks for reply @middelink , I erase the module with this code esptool.py -p com23 erase_flash ,the error vanished but module not work neither of any AP or Station mode, do you think module is broken ? do you know any other solution ?
tnx

It depends entirely on your code I would say.

Did you try, say https://github.com/esp8266/Arduino/tree/master/libraries/ESP8266WebServer/examples/HelloServer (and filled in the right constant around line 6/7? If you did and it doesn't connect, yeah, you likely zapped something. And for SoftAP testing, use something like https://github.com/esp8266/Arduino/tree/master/libraries/DNSServer/examples/CaptivePortalAdvanced/CaptivePortalAdvanced.ino. Try both, nothing works? > bricked...

yes I did both of those example and I thinks its wifi bricked but its other function work well and can use for no wifi MCU chip
is it weird the one core section of MUC bricked and remain works fine?

Hi

I had the same issue and I was able to resolve it by replacing the libphy.a file (as brought into attention by @middelink) in the SDK that comes with the arduino libraries for ESP8266.
As of now, the ESP8266 arduino libraries come with SDK version 1.5.3_16_04_18. I downloaded the SDK version 2.0.0_16_08_10 from the Espressif website from here: http://bbs.espressif.com/viewtopic.php?f=46&t=2451. I replaced the old file "C:\Users\[user]\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\tools\sdk\lib\libphy.a" with the new one "ESP8266_NONOS_SDK_V2.0.0_16_08_10.zip\ESP8266_NONOS_SDK\lib\libphy.a". I compiled and uploaded my arduino code again and the issue was resolved! :)
Hope it helps!

@middelink , @arsalanhassanawan , I change my usb-serial cable and its work fine now , this is so odd , is not ?
also for some sketch always throw exception and serial garbage whereas with fix usb-serial module work fine
how come serial hardware links can affect on sketch ?

Well, actually, if you take the power from USB as well, it might be that the other cable simply has too much voltage drop @300mA peak. If you have a good scope, you can verify. Or slap a big ass capacitor on your circuit :)

Hi all. To get away "error: pll_cal exceeds 2ms!!!", just let esp8266 power pin got 3.3v power before ch_pd pin. The "error: pll_cal exceeds 2ms!!!" won't bother you anymore. Hahaha.

@arsalanhassanawan: thank you!!!! After 2 day of headache you solution works!!!!

now trying other version of the core

All, the latest git is already on sdk 2.0.0, so it should be using the libphy referenced here. Please give that a try.
You should not be just replacing the libphy in a prior version of the core. The sdk 2.0.0 requires certain wifi radio calibration calls, which I believe don't exist in prior versions of the core.

@hongo2 please edit your post and add markup, the schematic isn't clear as it is.

the divider didnt work at the end

I see that you're supplying 5V to the Vin, and then also using a resistor
dividor connected on the 3.3V pin. Am I reading that right?
I'm not an expert on wiring the nodemcu, but if I am reading it right, I
don't think you're supposed to. Supplying 5V to Vin powers the on board
regulator, which in turn gives you the 3.3V on the pin. If so, adding the
resistor divider only loads the regulator output, which worsens the voltage
for the ESP itself. That can mess with the wifi radio.

Anyways, please report here the behavior with latest git to see if the
pll_cal error is gone.

On Sep 16, 2017 5:13 PM, "hongo2" notifications@github.com wrote:

hi @devyte https://github.com/devyte check this out:

esp8266 nodemcu error: pll_cal exceeds 2ms!!! schematics solution

[image: esp8266 nodemcu error pll_cal exceeds 2ms schematics solution]
https://user-images.githubusercontent.com/4730869/30515614-e4f280cc-9b01-11e7-80d2-8391c91d7292.png

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/esp8266/Arduino/issues/2566#issuecomment-329992151,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AQC6Bs9d823So9UvsDgqEjsZQlZD2rWVks5sjCvggaJpZM4KLDfB
.

@devyte
the divider is not the solution I was using v2.3
http://arduino.esp8266.com/stable/package_esp8266com_index.json

now installed latest git version original branch,
https://github.com/esp8266/Arduino/commit/eebc5ec593a8c739f8da2612a0e25ff4dab982fb

and seems to be working ok now without any hardware mods.

keep you posted, thanks

@hongo2 was this resolved with latest git?

yes it was, but another error came up when connect more than 4 clients, i
get an error saying max_connection it does not happen with the release

On Oct 12, 2017 2:31 AM, "Develo" notifications@github.com wrote:

@hongo2 https://github.com/hongo2 was this resolved with latest git?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/esp8266/Arduino/issues/2566#issuecomment-336024985,
or mute
the thread
https://github.com/notifications/unsubscribe-auth/AEgv9YRCt9X_bZlvGXxSAZzwOdnQw56qks5sraQggaJpZM4KLDfB
.

with the release i connected 8 clients with no problems when used as
hotspot, so i am compiling the clients with latest git and hotspot sever
with release

On Thu, Oct 12, 2017 at 9:11 AM, Ricardo Lerch ricardo.lerch@gmail.com
wrote:

yes it was, but another error came up when connect more than 4 clients, i
get an error saying max_connection it does not happen with the release

On Oct 12, 2017 2:31 AM, "Develo" notifications@github.com wrote:

@hongo2 https://github.com/hongo2 was this resolved with latest git?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/esp8266/Arduino/issues/2566#issuecomment-336024985,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEgv9YRCt9X_bZlvGXxSAZzwOdnQw56qks5sraQggaJpZM4KLDfB
.

@hongo2 from here:
bool softAP(const char* ssid, const char* passphrase = NULL, int channel = 1, int ssid_hidden = 0, int max_connection = 4);

thanks @devyte

I am setting up AP like this...,
works great on release, but on latest git gives max_connection error, what should I do to use latest git on both devices AP and Client ?

struct softap_config config;
wifi_softap_get_config(&config); // Get config first.
config.max_connection = 32; // how many stations can connect to ESP8266 softAP at most.
wifi_softap_set_config(&config); // Set ESP8266 softap config

WiFi.mode(WIFI_AP_STA);
WiFi.softAP(apName,apPassword);

@hongo2 except for very specific cases, you should NOT be mixing SDK and Arduino calls. In this case, this:

struct softap_config config;
wifi_softap_get_config(&config); // Get config first.
config.max_connection = 32; // how many stations can connect to ESP8266 softAP at most.
wifi_softap_set_config(&config); // Set ESP8266 softap config

is getting overriden by this:
WiFi.softAP(apName,apPassword);
I showed you the signature fo the softAP() method for a reason. Just do this:
WiFi.softAP(apName, apPassword, 1, 0, 8);
that will setup the AP on channel 1, not hidden, and allow 8 clients. It's not a good idea to go above 8 due to mem constraints.

I think the original issue has been resolved, and we've strayed far beyond into code support, so I'm closing now.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gosewski picture gosewski  Â·  3Comments

tttapa picture tttapa  Â·  3Comments

hulkco picture hulkco  Â·  3Comments

tiestvangool picture tiestvangool  Â·  3Comments

mreschka picture mreschka  Â·  3Comments