Hello all,
I'm using esp32 only for wifi scan (no connection) and I'd like to minimise the inrush current at start-up.
I've used 1ohm shunt to measure current at first start-up and found that depending on the antenna situation the RF calibration takes different time : about 15ms when touched with finger and about 5ms when free space (see attached, zoom on 400mA pulse).
After first scan I can go deep sleep and subsequent wake-up don't trig RF cal so this 400mA pulse is not there.
Is RF calibration required for RX only usage ? What does it do ?
How can I disable it (found some info in your documentation but not really up to date) ?
Any help will be highly appreciated
Have a good day,
Inrush current at wifi start for RX only ? Disable RF calibration ?
Inrush current at wifi start for RX only ? Disable RF calibration ?
- Attachments
-
- first_scan_full.png (8.64 KiB) Viewed 5873 times
-
- free_space.png (10.46 KiB) Viewed 5873 times
-
- finger_touch.png (12.86 KiB) Viewed 5873 times
Re: Inrush current at wifi start for RX only ? Disable RF calibration ?
So, this is a long time since the original post, but having solved this issue myself, I thought to share it.
As no RF calibration is performed when waking from deep sleep, we use this to prevent the RF calibration.
On boot set up a wake method and initialise a boot counter in RTC memory.
Increment boot counter and if this is first boot, go to sleep.
According to the wake method, system will immediately wake, increment boot count, and therefore not sleep this time, so can initialise RF system without calibration.
As no RF calibration is performed when waking from deep sleep, we use this to prevent the RF calibration.
On boot set up a wake method and initialise a boot counter in RTC memory.
Increment boot counter and if this is first boot, go to sleep.
According to the wake method, system will immediately wake, increment boot count, and therefore not sleep this time, so can initialise RF system without calibration.
Code: Select all
RTC_DATA_ATTR int bootCount = 0;
void setup() {
pinMode(GPIO_NUM_33,INPUT_PULLUP); // use this to wake - pull low on startup to keep it asleep if required.
esp_sleep_enable_ext0_wakeup(GPIO_NUM_33,1); // set this pin to wake if high
++bootCount;
if(bootCount==1) { // if first boot...
esp_deep_sleep_start(); // go to sleep
}
// continue with setup.
}
Re: Inrush current at wifi start for RX only ? Disable RF calibration ?
Hello,
Thank you 6l3nhx.
Nice workaround !
Works perfectly.
I made it with timer and disabling the image validation this ack takes 10µWh instead of 20µWh for RF calibration but max current is 50mA instead of 350mA ^^ Battery powered device under -20°C thank you
Thank you 6l3nhx.
Nice workaround !
Works perfectly.
I made it with timer and disabling the image validation this ack takes 10µWh instead of 20µWh for RF calibration but max current is 50mA instead of 350mA ^^ Battery powered device under -20°C thank you
Code: Select all
void app_main(void)
{
++bootCount;
if(bootCount==1) { // if first boot...
esp_sleep_enable_timer_wakeup(1000);
esp_deep_sleep_start();
}
Who is online
Users browsing this forum: No registered users and 268 guests