Closed elFallino closed 7 years ago
the stack is not started, just the radio. You should not power the esp from FTDI though. Get a proper LDO to 3.3V
I added a 3.3V buck converter, but radio was not started automagically in previous version, was it? If so, I still think that it would be better to keep radio disabled until user code activates WiFi / BT.
The difference from the previous version is in RF calibration process. Now it takes slightly longer and needs more current.
The latest version is also running at 240mhz vs 160mhz previously which means it draws more power overall too, I know that will be configurable in the future. My Espressif dev board draws 160ma now from 120ma previously.
Do you have plans/is it possible to have the RF calibration and all radio functions not start up until they are called/initialized by the Arduino IDE? maybe this is already possible from the IDF directly?
There seems to be a regression in the ESP-IDF that wifi initialization only works correctly when it is called pretty early on. Someone (myself or one of my colleagues) will look into this next week. Once we fix this, WiFi initialization can be moved to a later stage, when e.g. WiFi.begin is called. @me-no-dev has already done all the work on Arduino side, we just need to figure out what goes wrong with WiFi init. Once WiFi init is moved from startup code, we can postpone RF init as well.
Edit: ESP-IDF does have an option not to initialize RF in startup code.
The force has been restored! Do not include WiFi.h and phy will not start.
Now the dev board only draws 80ma at 240mhz when previously it was 150ma with WiFi always on :) I have a speed comparison of some different Arduino boards including current build of ESP32 here if you're interested: https://hilo90mhz.com/arduino-esp32-esp8266-101-speed-test-comparison-chart/
Oh this is really good! I can tell I need to optimize pinMode pulls to drop it under 1us :) What I would really like to see in the table are some STM32 MCUs :) Other than that ESP32 seem to top them all :P
I'm guessing something changed in the pinMode function since earlier Nov as my previous test shows it 0.526 us even at the lower clock speed.. I was having trouble getting the STM32Duino core working with some STM32 dev boards so cant include those yet.. But I did just add a comparison to the Teensy 3.6 board with NXP K66 Cortex M4 that someone else ran these same tests on. The ESP32 compares pretty well against that chip, some areas are a little slower, some faster. I bet there is room for improvement with some optimization too ;)
yes pinMode has changed because some pins have pull up/down settings elsewhere. I'll try to improve speed there, but some pins will always pinMode slower than others. If you pinMode pins 16 or 17 you will see a difference (closer to what you had before). I can probably run this against STM32F1 board
Thank you for solving this issue. Where can I buy you a beer? :)
I live in Bulgaria. You coming by? :D
@clowrey here are my measurements with the latest commits (note I pinMode pin 16 which is not RTC pin) Added a couple STMs
Great! Can you share the google docs file so I can copy some of the results into my spreadsheet for comparison? It might be neat to create a record of improvements from current to future versions of the Arduino ESP32 core
it's not a google doc :) https://www.icloud.com/numbers/0wwqzBkq_vjYwtaYOmhyF8FqA#Untitled
Hello ,
is there a way to keep WIFI switched off for EPS8266? I did not find any kind of documentation so far. I want to start WIFI in the Arduino sketch later on once needed.
Thanks, Peter
ESP8266?
Sorry yes, typo.
Why ask here :) this is the ESP32 repository. ESP8266 Arduino is here
Minor detail
@me-no-dev In regards to your Numbers spreadsheet, I believe the NRF52832 is 64Mhz. (Not sure if your original clock speed was in reference to something else though...)
http://infocenter.nordicsemi.com/pdf/nRF52832_PS_v1.3.pdf 7.2.1 CPU performance The CPU clock speed is 64 MHz.
@pctj101 It was mostly already made spreadsheet. I added some of the boards, but not the NRF :) do not have one
I am having similar bug. This time I lost wifi connection and the router rebooted and got on track. My esp32 displayed correctly and also updated me through the serial monitor that I am connected, however, my esp itself just got stock without actually doing anything. Below is the message print_out:
Connecting to MQTT... [D][WiFiGeneric.cpp:336] _eventCallback(): Event: 5 - STA_DISCONNECTED [W][WiFiGeneric.cpp:351] _eventCallback(): Reason: 201 - NO_AP_FOUND [D][WiFiGeneric.cpp:336] _eventCallback(): Event: 0 - WIFI_READY [D][WiFiGeneric.cpp:336] _eventCallback(): Event: 2 - STA_START [D][WiFiGeneric.cpp:336] _eventCallback(): Event: 2 - STA_START [D][WiFiGeneric.cpp:336] _eventCallback(): Event: 5 - STA_DISCONNECTED [W][WiFiGeneric.cpp:351] _eventCallback(): Reason: 201 - NO_AP_FOUND [D][WiFiGeneric.cpp:336] _eventCallback(): Event: 0 - WIFI_READY [D][WiFiGeneric.cpp:336] _eventCallback(): Event: 2 - STA_START [D][WiFiGeneric.cpp:336] _eventCallback(): Event: 2 - STA_START [D][WiFiGeneric.cpp:336] _eventCallback(): Event: 5 - STA_DISCONNECTED [W][WiFiGeneric.cpp:351] _eventCallback(): Reason: 201 - NO_AP_FOUND [D][WiFiGeneric.cpp:336] _eventCallback(): Event: 0 - WIFI_READY [D][WiFiGeneric.cpp:336] _eventCallback(): Event: 2 - STA_START [D][WiFiGeneric.cpp:336] _eventCallback(): Event: 2 - STA_START [D][WiFiGeneric.cpp:336] _eventCallback(): Event: 5 - STA_DISCONNECTED [W][WiFiGeneric.cpp:351] _eventCallback(): Reason: 201 - NO_AP_FOUND [D][WiFiGeneric.cpp:336] _eventCallback(): Event: 0 - WIFI_READY [D][WiFiGeneric.cpp:336] _eventCallback(): Event: 2 - STA_START [D][WiFiGeneric.cpp:336] _eventCallback(): Event: 2 - STA_START [D][WiFiGeneric.cpp:336] _eventCallback(): Event: 5 - STA_DISCONNECTED [W][WiFiGeneric.cpp:351] _eventCallback(): Reason: 201 - NO_AP_FOUND [D][WiFiGeneric.cpp:336] _eventCallback(): Event: 0 - WIFI_READY [D][WiFiGeneric.cpp:336] _eventCallback(): Event: 2 - STA_START [D][WiFiGeneric.cpp:336] _eventCallback(): Event: 2 - STA_START [D][WiFiGeneric.cpp:336] _eventCallback(): Event: 5 - STA_DISCONNECTED [W][WiFiGeneric.cpp:351] _eventCallback(): Reason: 201 - NO_AP_FOUND [D][WiFiGeneric.cpp:336] _eventCallback(): Event: 0 - WIFI_READY [D][WiFiGeneric.cpp:336] _eventCallback(): Event: 2 - STA_START [D][WiFiGeneric.cpp:336] _eventCallback(): Event: 2 - STA_START [D][WiFiGeneric.cpp:336] _eventCallback(): Event: 5 - STA_DISCONNECTED [W][WiFiGeneric.cpp:351] _eventCallback(): Reason: 201 - NO_AP_FOUND [D][WiFiGeneric.cpp:336] _eventCallback(): Event: 0 - WIFI_READY [D][WiFiGeneric.cpp:336] _eventCallback(): Event: 2 - STA_START [D][WiFiGeneric.cpp:336] _eventCallback(): Event: 2 - STA_START [D][WiFiGeneric.cpp:336] _eventCallback(): Event: 5 - STA_DISCONNECTED [W][WiFiGeneric.cpp:351] _eventCallback(): Reason: 201 - NO_AP_FOUND [D][WiFiGeneric.cpp:336] _eventCallback(): Event: 0 - WIFI_READY [D][WiFiGeneric.cpp:336] _eventCallback(): Event: 2 - STA_START [D][WiFiGeneric.cpp:336] _eventCallback(): Event: 2 - STA_START [D][WiFiGeneric.cpp:336] _eventCallback(): Event: 5 - STA_DISCONNECTED [W][WiFiGeneric.cpp:351] _eventCallback(): Reason: 201 - NO_AP_FOUND [D][WiFiGeneric.cpp:336] _eventCallback(): Event: 0 - WIFI_READY [D][WiFiGeneric.cpp:336] _eventCallback(): Event: 2 - STA_START [D][WiFiGeneric.cpp:336] _eventCallback(): Event: 2 - STA_START [D][WiFiGeneric.cpp:336] _eventCallback(): Event: 5 - STA_DISCONNECTED [W][WiFiGeneric.cpp:351] _eventCallback(): Reason: 201 - NO_AP_FOUND [D][WiFiGeneric.cpp:336] _eventCallback(): Event: 0 - WIFI_READY [D][WiFiGeneric.cpp:336] _eventCallback(): Event: 2 - STA_START [D][WiFiGeneric.cpp:336] _eventCallback(): Event: 2 - STA_START [D][WiFiGeneric.cpp:336] _eventCallback(): Event: 5 - STA_DISCONNECTED [W][WiFiGeneric.cpp:351] _eventCallback(): Reason: 201 - NO_AP_FOUND [D][WiFiGeneric.cpp:336] _eventCallback(): Event: 0 - WIFI_READY [D][WiFiGeneric.cpp:336] _eventCallback(): Event: 2 - STA_START [D][WiFiGeneric.cpp:336] _eventCallback(): Event: 2 - STA_START [D][WiFiGeneric.cpp:336] _eventCallback(): Event: 5 - STA_DISCONNECTED [W][WiFiGeneric.cpp:351] _eventCallback(): Reason: 201 - NO_AP_FOUND [D][WiFiGeneric.cpp:336] _eventCallback(): Event: 0 - WIFI_READY [D][WiFiGeneric.cpp:336] _eventCallback(): Event: 2 - STA_START [D][WiFiGeneric.cpp:336] _eventCallback(): Event: 2 - STA_START [D][WiFiGeneric.cpp:336] _eventCallback(): Event: 5 - STA_DISCONNECTED [W][WiFiGeneric.cpp:351] _eventCallback(): Reason: 201 - NO_AP_FOUND [D][WiFiGeneric.cpp:336] _eventCallback(): Event: 0 - WIFI_READY [D][WiFiGeneric.cpp:336] _eventCallback(): Event: 2 - STA_START [D][WiFiGeneric.cpp:336] _eventCallback(): Event: 2 - STA_START [D][WiFiGeneric.cpp:336] _eventCallback(): Event: 4 - STA_CONNECTED [D][WiFiGeneric.cpp:336] _eventCallback(): Event: 7 - STA_GOT_IP [D][WiFiGeneric.cpp:379] _eventCallback(): STA IP: 192.168.0.142, MASK: 255.255.255.0, GW: 192.168.0.1
I updated today and now the esp32 fails to boot. It seems that the FTDI adapter can not provide enough energy. I already had that problem before (with previous versions of this plugin) as I tried to run a sketch that uses WIFI without additional power source.
So I guess that the latest commits enable WiFi by default. In that case I think that WiFi should explicit be enabled by user code.