I’m starting to use RAK3172 module for a battery powered application and this consumes ~7.7uA, far from the ~1,7uA claimed.
I’m using 2 GPIO pins with interrupts for external events and up to 3 timers (RAK_TIMER_0,1,2). GPIOs go to push buttons so doesn’t consume until pressed.
At setup end I have: api.system.lpm.set(1);
And in the loop: api.system.scheduler.task.destroy();
I have made some tests in order to lower the consumption with no success. I have removed the timers and the exact I have the same exact consumption.
Can anybody please guide me in how to reduce this figure? I’m using only the RUI3 api.
(1) 1.7uA is the MCU in low power mode, no application running, I never got a RAK3172 with a custom application down to that value
(2) Do the two GPIO’s for the interrupts have pull-ups or pull-down resistors? If yes, how many Ohm are the resistors.
That will not cause the additional 6uA you see.
I am guessing it is from the LoRa antenna RF switch + some other pull-ups/pull-downs that are inside the RAK3172 .
I was going to try and help but for some reason I cannot find the SX1262.c or SX126x.c files for RAK3172, only the headers? Is it opensource, where can I find it?
Anyways, for RAK11720 and RAK4630 (and I am assuming on the RAK3172) there was an issue and I had mentioned it to support. Basically here is what is happening: SX126xAntSwOn() and SX126xAntSwOff() functions are not being used. I changed my local build of RAK11720 so I am more efficient, I saw a 6uA current draw drop when the RADIO_ANT_SW is correctly toggled using the SX126xAntSwOn() and SX126xAntSwOff() functions.
I assume you have modified the mentioned SX1262.c files, right? And not simply called “SX126xANTSwOn or Off” in your code? I guess you’d need to have those c-files at hand to compile successfully.
I mentioned this bug to the team in May of this year, so who knows when it will get fixed. I dont know why, but I thought all the files are open source for the latest RUI3 versions? If we can get @beegee to tell us how to access the files: sx126x-board.c and sx126x.c files for RAK3172, then we should be good to do it ourselves. The above instructions might also fix the issue on RUI3 with RAK4630 as well.