Commit 0a0df9d5 authored by Robert Sprowson's avatar Robert Sprowson
Browse files

Leave clock alone if RTC driver is active

Variant of previous fix but that doesn't corrupt R0.
Retagged as SDCMOS-0_12.
parent 2bfa4eae
......@@ -299,10 +299,6 @@ TryInit ROUT
TEQ r14, r5
BNE %B50
; If there's no RTC, try restoring the time from the HAL timestamp
SWI XRTC_Features
BVC %F60 ; V clear -> RTC driver is active
; Read size of pseudo CMOS in HAL
MOV r2, sp
MOV r3, #4
......@@ -310,6 +306,10 @@ TryInit ROUT
BVS %F60
LDR r6, [sp]
; If there's no RTC, try restoring the time from the HAL timestamp
SWI XRTC_Features
BVC %F60 ; V clear -> RTC driver is active
; Read the last timestamp
MOV r0, #OSGBPB_ReadFromGiven
MOV r2, sp
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment