diff --git a/arch b/arch index f9a3a1463b2..a8666b5bb68 160000 --- a/arch +++ b/arch @@ -1 +1 @@ -Subproject commit f9a3a1463b24b8da63f2a7577d0b4ce0131a1069 +Subproject commit a8666b5bb6841d514d1fccedb0071df38d78217a diff --git a/drivers/timers/pcf85263.c b/drivers/timers/pcf85263.c index 8d5db98e6d4..ab89fd47158 100644 --- a/drivers/timers/pcf85263.c +++ b/drivers/timers/pcf85263.c @@ -408,6 +408,7 @@ int up_rtc_settime(FAR const struct timespec *tp) struct tm newtm; time_t newtime; uint8_t buffer[9]; + uint8_t cmd; uint8_t seconds; int ret; @@ -449,7 +450,7 @@ int up_rtc_settime(FAR const struct timespec *tp) rtc_dumptime(&tm, "New time"); /* Construct the message */ - /* Write starting with the seconds regiser */ + /* Write starting with the 100ths of seconds register */ buffer[0] = PCF85263_RTC_100TH_SECONDS; @@ -498,9 +499,11 @@ int up_rtc_settime(FAR const struct timespec *tp) /* Read back the seconds register */ + cmd = PCF85263_RTC_SECONDS; + msg[1].addr = PCF85263_I2C_ADDRESS; msg[1].flags = 0; - msg[1].buffer = buffer; + msg[1].buffer = &cmd; msg[1].length = 1; msg[2].addr = PCF85263_I2C_ADDRESS;