stm32-hal-libraries
stm32-hal-libraries copied to clipboard
LoRa deep sleep
Hello. I use your library to test SX1276 LoRa modules on STM32L031. It seems to be working fine, however I have got one question saving current consumption. For my particular application, when the sender sends a message, I want it to enter deep sleep. I use the following code for sending a message:
uint8_t res2 = lora_send_packet(&lora, (uint8_t *)"test", 4);
if (res2 != LORA_OK) {
printf("send failed \n");
}
else{
printf("send sucessfull \n");
//enter sleep mode
}
Is there a function that I need to call to put the SX1276 into low power mode or it goes to low power mode automatically after sending a message? I would very much appreciate clarification. Thanks in advance.