Closed AryanNordic closed 7 years ago
in m_batt_meas_handler() everything after sd_power_system_off is unreachable. Probably should delete it.
Hi, and thank you for the feedback. We have the system reset there for the error case if sleep mode enter fails. If that happens something is terrible wrong, and the best solution would be to reset.
The only way this could happen is when you are debugging, where system off is emulated. In those cases it is best to add a while(1); after the sleep function as suggested by specs. Nevertheless, this is just a nitpick and not a bug, so it is OK, if you want to keep it as it is.
sleep_mode_enter will never return as it makes the chip go to system off. wakeup will automatically cause a system reset.