Debugging Techniques and Troubleshooting#
Common Issues#
RTC not incrementing
Fix: Ensure the Calendar block is not power gated (Check power manager configuration via Simplicity Studio UC for power gated peripherals).
Alarms not firing
Fix: Alarm interrupt not enabled, or wakeup source not registered with the Power Manager.
Unexpected drift
Fix: Prefer external 32.768 kHz XTAL; if using RC, enable Calendar calibration; re-tune load caps as needed.
System not waking from sleep
Fix: Inspect wake-source configuration (second based wakeup/Alarm based wakeup) in Power Manager via Simplicity Studio UC.
NWP timing mismatch (Wi-Fi/BLE)
Fix: Populate/validate the 32.768 kHz XO; verify listen-interval/TWT/connection-interval stability.
Debugging Aids#
APIs
sl_si91x_calendar_get_time()— Confirm Calendar is advancing.sl_si91x_calendar_get_alarm()— Inspect alarm configuration.sl_si91x_sysrtc_get_counter()— Read raw SYSRTC counter.sl_sleeptimer_get_tick_count()— Check RTOS tick alignment.sl_si91x_power_manager_get_current_state()— Read current power state.
Registers See Reference Manual
Calendar: Time read registers, alarm registers, and Calendar power control.
SYSRTC: Compare registers and interrupt/status flags.
Helpful peripherals
Watchdog Timer (WDT): Safety net for misconfigured sleep/wake flows.
Best Practices#
Use an external 32.768 kHz oscillator for all module based designs.
If using RC, enable Calendar calibration; a 15-30 s cadence with temperature-based retrigger is a good starting point.
For hardware validation, probe the 32 kHz path with a high-impedance active probe (< 1 pF) to confirm startup / stability.
Cross-check crystal selection and layout with AN1335 - RS9116 & SiWx917 Crystal Selection Guide and the latest data sheet / errata.