gfroerli / firmware

Firmware for the water temperature sensor project
GNU General Public License v3.0
6 stars 1 forks source link

Handle RN2483 errors #34

Open rnestler opened 6 years ago

rnestler commented 6 years ago

Currently we do not handle RN2483 errors at all in the firmware, except logging to serial, leading to a dysfunctional sensor in the field. Maybe it would be enough to send a reset to the RN2483 after an error?

dbrgn commented 6 years ago

Right now I don't think we can really reset it if it does not answer to commands.

It would be great if we could somehow hard-reset the RN or even the entire electronics using the LDO. What do you think?

rnestler commented 6 years ago

Right now I don't think we can really reset it if it does not answer to commands.

How about that method:

https://github.com/gfroerli/firmware/blob/bb79bba6bd6b86bdc57dd72b5b99fe3bd8dad702/lib/RN2483/RN2483.cpp#L325

Or

https://github.com/gfroerli/firmware/blob/bb79bba6bd6b86bdc57dd72b5b99fe3bd8dad702/lib/RN2483/RN2483.cpp#L233

dbrgn commented 6 years ago

We can try. However, we don't know for what reason the RN got stuck.

I'm not sure if the break condition actually resets the device or just wakes it up from sleep. I'd think the latter.

dbrgn commented 2 years ago

Currently the LDO cannot be turned off through software.

@rnestler do you think we should make it possible to temporarily pull down the EN pin of the LDO, in order to be able to self-reset the entire electronics? (It's important that the reset is only temporary though. Maybe by discharging a capacitor connected to the enable pin?)

OTOH maybe that's a bit overengineered. I'm not sure.