Skip to content

Watch randomly reboots or dies when using stop mode on Obelix #452

@gmarull

Description

@gmarull

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When stop mode is enabled, some erratic behavior is observed on Obelix:

  • Screen will turn black and watch freezes (requires hard restart by pressing back button for 10s)
  • Watch will reset, entering bootloader again

When reset occurs, it seems to take a while to recover, see:

D B 21:52:01.101 gatt_client_discovery.c:345> Found descriptor 10000001-328e-0fbb-c642-1aa6699bdada (hdl: 0x3d)
D B 21:52:01.175 gatt_client_discovery.c:345> Found descriptor 0x2900 (hdl: 0x3e)
D B 21:52:01.175 gatt_client_discovery.c:345> Found descriptor 0x2902 (hdl: 0x3f)
D B 21:52:01.179 gatt_client_discovery.c:358> Descriptor discovery done   
D B 21:52:01.246 gatt_client_discovery.c:345> Found descriptor badbadba-dbad-badb-adba-badbadbadbad (hdl: 0x42)
D B 21:52:01.246 gatt_client_discovery.c:358> Descriptor discovery done          
I M 21:52:01.257 kernel_le_client.c:312> Service changed Indication: type: 1 status: 0
D M 21:52:01.257 kernel_le_client.c:288> Found an instance of DIS at 0xa-0xe!
D M 21:52:01.261 dis.c:38> In DIS service discovery CB                   
D M 21:52:01.261 kernel_le_client.c:288> Found an instance of ANCS at 0x19-0x22!
D M 21:52:01.261 ancs.c:815> In ANCS service discovery CB                      
D M 21:52:01.265 gatt_client_subscriptions.c:640> Added BLE subscription for handle 0x21
D M 21:52:01.265 gatt_client_subscriptions.c:640> Added BLE subscription for handle 0x1e
D M 21:52:01.269 kernel_le_client.c:288> Found an instance of AMS at 0x23-0x2e!
D M 21:52:01.269 ams.c:573> In AMS service discovery CB                           
D M 21:52:01.273 gatt_client_subscriptions.c:640> Added BLE subscription for handle 0x29
I M 21:52:01.273 kernel_le_client.c:285> Found an instance of PPoG at 0x39-0x3f!
D B 21:52:01.316 gatt_client_discovery.c:208> Subscribed to service changed       
21:51:24.447 * * 01:00:00.000 PBLBOOT:0> I: PebbleOS bootloader 0.9.13     
21:51:24.591 * * 01:00:00.000 PBLBOOT:0> I: slot0 firmware valid (0x12021000, 1762891814)
21:51:24.595 * * 01:00:00.000 PBLBOOT:0> I: Loading slot0 firmware @ 0x12021000
* M 21:52:02.925 main.c:138> PebbleOS
* M 21:52:02.925 main.c:140> v4.9.78-1-gd117053c0-dirty(slot0)
* M 21:52:02.925 main.c:145> (c) 2013-2025 The PebbleOS contributors
* M 21:52:02.925 main.c:146>  
21:51:29.262 * * 01:00:00.000 PBLBOOT:0> I: PebbleOS bootloader 0.9.13
21:51:29.423 * * 01:00:00.000 PBLBOOT:0> I: slot0 firmware valid (0x12021000, 1762891814)
21:51:29.427 * * 01:00:00.000 PBLBOOT:0> I: Loading slot0 firmware @ 0x12021000
* M 21:52:06.820 main.c:138> PebbleOS
* M 21:52:06.820 main.c:140> v4.9.78-1-gd117053c0-dirty(slot0)
* M 21:52:06.820 main.c:145> (c) 2013-2025 The PebbleOS contributors
* M 21:52:06.820 main.c:146>  
21:51:34.092 * * 01:00:00.000 PBLBOOT:0> I: PebbleOS bootloader 0.9.13
21:51:34.239 * * 01:00:00.000 PBLBOOT:0> I: slot0 firmware valid (0x12021000, 1762891814)
21:51:34.243 * * 01:00:00.000 PBLBOOT:0> I: Loading slot0 firmware @ 0x12021000
* M 21:52:10.820 main.c:138> PebbleOS
* M 21:52:10.820 main.c:140> v4.9.78-1-gd117053c0-dirty(slot0)
* M 21:52:10.820 main.c:145> (c) 2013-2025 The PebbleOS contributors
* M 21:52:10.824 main.c:146>  
21:51:38.926 * * 01:00:00.000 PBLBOOT:0> I: PebbleOS bootloader 0.9.13
21:51:39.071 * * 01:00:00.000 PBLBOOT:0> I: slot0 firmware valid (0x12021000, 1762891814)
21:51:39.073 * * 01:00:00.000 PBLBOOT:0> I: Loading slot0 firmware @ 0x12021000
* M 21:52:14.820 main.c:138> PebbleOS
* M 21:52:14.820 main.c:140> v4.9.78-1-gd117053c0-dirty(slot0)
* M 21:52:14.820 main.c:145> (c) 2013-2025 The PebbleOS contributors
* M 21:52:14.820 main.c:146>  
D M 21:52:14.582 new_timer.c:126> NT: Initializing
I M 21:52:14.609 qspi.c:167> Flash is GD25Q256E
D M 21:52:14.738 cst816.c:215> cst816 fw version:0x4
D M 21:52:14.742 lsm6dso.c:287> LSM6DSO: Sensor detected successfully (WHO_AM_I=0x6c) 
D M 21:52:14.753 lsm6dso.c:376> LSM6DSO: Initialization complete
D M 21:52:14.777 mmc5603nj.c:64> MMC5603NJ: Initialization complete
21:51:39.952 I M 21:52:14.867 debug.c:194> v4.9.78-1-gd117053c0-dirty (platform: 243, hw: obelix, sn: GMARULLOBLX1, pcba: GMARULLOBLX1)
21:51:39.957 I M 21:52:14.871 debug.c:204> BUILD ID: 7836f54fcdd655f654d0fed4e3e1d7778316a6d1
21:51:39.961 I M 21:52:14.871 reboot_reason.c:171> We don't know why we Dangerously rebooted.

Expected Behavior

Watch works as expected

Steps To Reproduce

First apply this patch, so that stop mode is always enabled even on non-release builds (note console RX won't work, but TX will work):

diff --git a/src/fw/drivers/sf32lb52/uart.c b/src/fw/drivers/sf32lb52/uart.c
index f2e41c729..f5abe7e6b 100644
--- a/src/fw/drivers/sf32lb52/uart.c
+++ b/src/fw/drivers/sf32lb52/uart.c
@@ -38,14 +38,14 @@ static void prv_init(UARTDevice *dev, uint32_t mode) {
     case UART_MODE_TX_RX:
       HAL_PIN_Set(dev->tx.pad, dev->tx.func, dev->tx.flags, 1);
       HAL_PIN_Set(dev->rx.pad, dev->rx.func, dev->rx.flags, 1);
-      stop_mode_disable(InhibitorDbgSerial);
+      //stop_mode_disable(InhibitorDbgSerial);
       break;
     case UART_MODE_TX:
       HAL_PIN_Set(dev->tx.pad, dev->tx.func, dev->tx.flags, 1);
       break;
     case UART_MODE_RX:
       HAL_PIN_Set(dev->rx.pad, dev->rx.func, dev->rx.flags, 1);
-      stop_mode_disable(InhibitorDbgSerial);
+      //stop_mode_disable(InhibitorDbgSerial);
       break;
     default:
       WTF;

Then revert 25d476d

Then build firmware and flash it. The problem appears to be frequent when connecting to a phone (during or after service discovery).

Version

d117053

Host OS

N/A

Watch

Pebble Time 2 (Obelix)

Anything else?

No response

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions