Open Okamensky opened 4 years ago
Probably the fact that the receive has timed out (or succeeded) is not being detected. This is supposed to be detected via state of the DIO pins, such that interrupts could theoretically be used.
But LMiC typically doesn't actually use interrupts, but merely poll the pin states in the function that should enable them, which gets called over and over from a typically busy looping scheduler.
There are a few likely causes of failure:
Settings of the LoRa chip getting corrupted so that the RX attempt does not happen or more likely such that the DIO bits are no longer driven at completion, for example due to rare glitches on the SPI.
MCU pin states getting mixed up such that they no longer read the DIOs, perhaps as a result of entering/exiting a sleep mode, especially a wakeup from sleep mode that might be implemented as something very nearly a "reset"
Other logic bugs.
I'd consider making the polling of the IO's print out state DIO state, and perhaps even poll relevant flag registers via SPI. You could also add logic to give up after a maximum plausible time and re-configure the radio. Or simply configure the radio from scratch every time you wake up to transmit (sleeping in between transmit and the RX windows is of relatively little value compared to the complexity - most MCU's don't consume that much power running for a second or two every few minutes, but in an extreme case doing so might be worth the trouble, only after everything else works well)
Hello,
I am making an Atmega328p+GPS+BMP180 node using RFM95 module.
The MCU is put to deep sleep for 5 minutes in
and after deep sleep I update the ticks
The whole system works, but sometimes it gets stuck after printing
to the Serial output. Sometimes it happens after 180 cycles, 80 or even 10...
My pin configuration is as follows:
I also changed the clock error:
Do you have any idea why this might be happening? I am using a single channel ESP32 gateway at home and have put lmic to single channel. But I have had this problem even when I tested it with all channels and regular gateways in my city.