Additional info about the setup…
I’ve got an ATTiny841 running on an external 3v3 supply, acting as the power/sleep manager (bringing ~EN down) and an I2C slave to the Boron.
At the end of a wake/sense/publish cycle, the Boron requests a shutdown for X seconds from the power manager slave.
Should this call somehow fail, the main loop would just repeat – so if the Boron was staying on, I’d get a bunch of publishes and see the LED do its thing.
The '841 sleeps the Boron by configuring its connection to the ~EN pin as an output and taking it low. It wakes the Boron after time X simply by releasing the pin (goes into high-Z as an input). When ~EN is released, the line sits at some high voltage (~3.8V). When everything is frozen, shorting it ~EN ground manually has no effect.
This '841 power manager also has two watchdog functions.
Post power-up, it expects an interaction from the Boron within 60 seconds. If this fails to happen, power is cycled through the ~EN pin (5 seconds pulled low) and we try again.
Assuming the Boron did power up and interact with the slave within the allotted time, the power manager has a second timer and expects to be asked to shutdown within 10 minutes. Should this fail to happen, this second watchdog is triggered and power is cycled.
The power manager keeps track of how often the watchdog is tripped and reports this to the Boron on request.
When it’s locked up, and I short the Boron 3v3 out to finally get it going again, the normal loop goes through and I get a report through AWS/MQTT.
I can then see the watchdog trip count, and it is indeed proportional to the amount of time the Boron has been locked up.
Put together, these would indicate that:
- the boron isn’t simply running the whole time: it goes down, or at a minimum halts normal code processing, as the LED and connect/publish activity stops
- the power manager is running correctly and continuously, keeping track of watchdog triggers, and actually bringing the ~EN pin low for seconds at a time without managing to reboot the nRF52840
Hopefully, this info can rule out the obvious solutions and help isolate what’s actually going on, or at least help you hint me on where to investigate next.
Gracias,
Pat D