TwiMaster is now based on the NRFX TWI driver, as it handles more edge cases and workarounds for errors on the bus.

Reset the TWI bus after the soft-reset of the motion sensor to workaround issues on the TWI bus.
This commit is contained in:
Jean-François Milants
2021-04-08 20:07:24 +02:00
parent 1d7576de64
commit 9ac4be8b75
7 changed files with 67 additions and 207 deletions

View File

@@ -84,11 +84,15 @@ void SystemTask::Work() {
touchPanel.Init();
batteryController.Init();
motorController.Init();
motionSensor.SoftReset();
// Reset the TWI device because the motion sensor chip most probably crashed it...
twiMaster.Sleep();
twiMaster.Init();
motionSensor.Init();
settingsController.Init();
displayApp = std::make_unique<Pinetime::Applications::DisplayApp>(lcd, lvgl, touchPanel, batteryController, bleController,
dateTimeController, watchdogView, *this, notificationManager,
heartRateController, settingsController, motionController);