Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions src/systemtask/SystemTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -310,14 +310,14 @@ void SystemTask::Work() {
if (state != SystemTaskState::GoingToSleep) {
break;
}
if (BootloaderVersion::IsValid()) {
// First versions of the bootloader do not expose their version and cannot initialize the SPI NOR FLASH
// if it's in sleep mode. Avoid bricked device by disabling sleep mode on these versions.
spiNorFlash.Sleep();
}

// Must keep SPI awake when still updating the display for always on
// Must keep SPI and flash awake when still updating the display for always on
if (msg == Messages::OnDisplayTaskSleeping) {
if (BootloaderVersion::IsValid()) {
// First versions of the bootloader do not expose their version and cannot initialize the SPI NOR FLASH
// if it's in sleep mode. Avoid bricked device by disabling sleep mode on these versions.
spiNorFlash.Sleep();
}
spi.Sleep();
}

Expand Down Expand Up @@ -409,14 +409,13 @@ void SystemTask::GoToRunning() {
// SPI only switched off when entering Sleeping, not AOD or GoingToSleep
if (state == SystemTaskState::Sleeping) {
spi.Wakeup();
spiNorFlash.Wakeup();
}

// Double Tap needs the touch screen to be in normal mode
if (!settingsController.isWakeUpModeOn(Pinetime::Controllers::Settings::WakeUpMode::DoubleTap)) {
touchPanel.Wakeup();
}

spiNorFlash.Wakeup();
}

displayApp.PushMessage(Pinetime::Applications::Display::Messages::GoToRunning);
Expand Down
Loading