Does network.WLAN.deinit() turn off WiFi radio part of ESP32 in 1.6.13.b1?



  • I am trying to figure out if network.WLAN.deinit() turns off WiFi radio part of ESP32 in 1.6.13.b1.

    I am using following method for power consumption measurement:
    http://community.silabs.com/t5/32-bit-MCU/How-to-use-an-STK-to-measure-current-consumption-on-your-own/td-p/98363

    boot.py:

    import os
    from machine import UART
    uart = UART(0, 115200)
    os.dupterm(uart)
    

    main.py:

    import pycom
    from network import WLAN
    
    pycom.heartbeat(False)
    wlan = WLAN()
    wlan.deinit()
    

    After connecting STK board as power source to Expansion Board 2.0 with LoPy through battery JST connector I observed current spike immediately:
    alt text

    Or after some time:
    alt text
    alt text

    In case of not calling wlan.deinit() in main.py current spikes appear immediately and are repeating periodically:
    alt text

    It seems that network.WLAN.deinit() makes some difference in power consumption patter. What could be causing those remaining spikes in case WLAN is initialized?



  • Last sentence should be:
    What could be causing those remaining spikes in case WLAN is NOT initialized?


Log in to reply
 

Looks like your connection to Pycom Forum was lost, please wait while we try to reconnect.