Power consumption LoraWan example

computechnic
Wed, 20 Jan 2021 12:54:20 +0000
Mbed OS

Hello everyone,

I’m using the LoRa example. I have the exact same problem as the last commenter on this post: How to get <340uA in deepsleep for DISCO_L072CZ_LRWAN1 · Issue #119 · ARMmbed/mbed-os-example-lorawan · GitHub

I have the following code for testing:

mbed_stats_cpu_t stats;
mbed_stats_cpu_get(&stats);

if (lorawan.initialize(&ev_queue) != LORAWAN_STATUS_OK)
{
    printf("\r\n LoRa initialization failed! \r\n");
    return -1;
}

while(true)
{
   ThisThread::sleep_for(10s);
   mbed_stats_cpu_get(&stats);
   printf("Uptime: %llu ", stats.uptime / 1000);
   printf("Sleep time: %llu ", stats.sleep_time / 1000);
   printf("Deep Sleep: %llu\n", stats.deep_sleep_time / 1000);
}

The above code leads to a current of 0.430uA. If i remove the lorawan.initialize, the current drops to 70uA. Which is still no perfect but much better. According to the printf statements in both cases i’m entering the deep sleep mode. The above is only a code for testing but the exact same thing happends when using the lora example and entering the dispatch forever loop. The current between sending is 0.430uA. Which is way too high for a battery powered application.

Any idea why the lorawan initialization increases the deep sleep power consumption by that much?
How can i solve this? Any help would be appreciated.

Greetings Marco

4 posts - 2 participants