Use rtc_lock to protect RTC operations