Lora SX1278 sleep current high. #1378
Unanswered
anandspathak
asked this question in
Q&A
Replies: 1 comment
-
56mA is way high for a do-nothing sketch with a radio on idle, do you have a schematic to show what & how you've wired up? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Dear jgromes,
i am using lora sx1278 with STM32G070KBT6 microcontroller on custom pcb with only lora connected. Using stm32 official core.
Successfully initialized and working on SPI_2. No issue on sending and receiving using interrupt mode. Everything is working good except I am facing strange issue when I put lora to sleep. In sleep mode current is 56 milli amp...
My test code is below for your kind reference:
#include "STM32LowPower.h"
#include <IWatchdog.h>
#include <SPI.h>
#include <RadioLib.h>
#include <HardwareSerial.h>
SPIClass SPI_2(PB7, PB6, PB8);
SX1278 radio = new Module(PB9, PB3, PA15, PB4, SPI_2);
HardwareSerial Serial1(PA10, PA9);
void setup() {
Serial1.begin(9600);
SPI_2.begin();
LowPower.begin();
Serial1.print(F("[SX1278] Initializing ... "));
int state = radio.begin();
if (state == RADIOLIB_ERR_NONE) {
Serial1.println(F("success!"));
} else {
Serial1.print(F("failed, code "));
Serial1.println(state);
while (true)
;
}
}
void loop() {
delay(2000);
radio.sleep();
LowPower.deepSleep(5000); // during this time i get 56 milli amp current.
}
i replaced lora module with new one...still same issue of high sleep current.
Earlier when i was using atmega328 the sleep current was under 10uA. But i migrated to STM32 I am facing this issue.
**Please note that I tested sleep current of bare microcontroller, its below 5uA... I think that i am using SPI2 while library is using SPI1 default so this might be some issue i am unaware of.
I need your kind suggestion in this matter. By the way i am using your encryption and decryption ECB mode methods, working good...
Thanks,
Regards,
Anand Pathak,
"BHARAT"
Beta Was this translation helpful? Give feedback.
All reactions