Module17: added a 100ms sleep after power off to prevent the board from rebooting.

Fix #230.
pull/238/head
Silvano Seva 2024-01-30 21:58:38 +01:00
rodzic 31d9b909f7
commit 202a199442
1 zmienionych plików z 6 dodań i 0 usunięć

Wyświetl plik

@ -104,7 +104,13 @@ void platform_terminate()
nvm_terminate();
audio_terminate();
/*
* Cut off the power switch then wait 100ms to allow the 3.3V rail to
* effectively go down to 0V. Without this delay, the board fails to power
* off because the main() function returns, triggering an OS reboot.
*/
gpio_clearPin(POWER_SW);
sleepFor(0, 100);
}
uint16_t platform_getVbat()