The RTC and RTT share the same peripheral, so they can also share the same code. This is needed to integrate the Tamper Detection into common RTC/RTT code.