Closed va7ta closed 1 year ago
Greetings,
As an effort to rule out EMI as the cause of the intermittent sender crashes I subsequently decided to enclose the sender in an RF tight aluminum box. The LoRa antenna was placed externally to isolate it from the PCB as shown in the photos. This significantly reduced the PCB EMI exposure to the LoRa transmission.
The failures still occur as shown by the photos. In this instance the sender crashed after 18,912 transmissions which was after a operational period of about 3 hours.
As power cycling the sender without disturbing the receiver restores normal operation it is clear that the failures occur within the sender and that a sender firmware instability is probable as:
Possibly an external watch dog timer (WDT) is worthy of consideration to provide resets when necessary.
Subsequently I ran another test and this time it got up to 39,302 transmissions (roughly 18 hrs.) before the sender crashed. Once it crashes a reset is needed to restore the sender to normal operation. It would seem that for this sender version the addition of an effective external WDT supervisor IC should be considered.
Upon removing the WiFi code module that I had installed I found the LoRa sender code ran for days with over 100,000 transmissions without failing. There is apparently an incompatibility between the WiFi driver and the LoRa code that was causing the crashes.
I previously posted about this about a week ago and then closed the issue a day later as I decided I should do more testing to ensure that what I am seeing is not a hardware issue. I decide to swap sender/receiver functions between my two TTGO-LORA32 modules to confirm the sender failure occurred when running on either module. I also decided to use an alternate USB power source to ensure it wasn't being caused by a power glitch from a flakey power source. The sender failures continued to occur after running for random periods of time. Some failures occurred after a few hours and some failure-free periods extended much longer, more than 12 hours.
To restore I need to reset the sender either by cycling the USB port power source or pressing reset. The last transmission that is sent during the crash is typically garbled.
I wonder if there is a memory leak or a buffer over run that is causing the failures? The random nature of the failures is puzzling and probably difficult to track down. I wonder if there might be an EMI issue.
Considering the usual remotely installed sender applications I wonder if a watch dog timer could be implemented within the code to protect against this type of failure? Or would an external WDT be necessary?