File tree Expand file tree Collapse file tree 2 files changed +12
-10
lines changed
targets/TARGET_Analog_Devices
TARGET_ADUCM302X/TARGET_ADUCM3029/bsp/rtc
TARGET_ADUCM4X50/TARGET_ADUCM4050/bsp/rtc Expand file tree Collapse file tree 2 files changed +12
-10
lines changed Original file line number Diff line number Diff line change 6
6
* @date: $Date: 2016-07-26 13:09:22 -0400 (Tue, 26 Jul 2016) $
7
7
*----------------------------------------------------------------------------
8
8
*
9
- Copyright (c) 2010-2016 Analog Devices, Inc.
9
+ Copyright (c) 2010-2018 Analog Devices, Inc.
10
10
11
11
All rights reserved.
12
12
@@ -304,18 +304,19 @@ ADI_RTC_RESULT adi_rtc_Open(
304
304
305
305
pDevice -> pRTCRegs -> SR0 = ADI_RTC_SR3_IRQ_STATUS_MASK ;
306
306
SYNC_AFTER_WRITE (SR0 ,BITM_RTC_SR0_WSYNCSR0 )
307
-
307
+ /* Preserve RTC counter value while re-initialization
308
308
pDevice->pRTCRegs->CNT0 = 0u;
309
309
pDevice->pRTCRegs->CNT1 = 0u;
310
310
SYNC_AFTER_WRITE(SR0,BITM_RTC_SR0_WSYNCCNT0)
311
-
311
+ */
312
312
/* local pointer to instance data */
313
313
aRTCDeviceInfo [DeviceNumber ].hDevice = pDevice ;
314
314
pDevice -> pDeviceInfo = & aRTCDeviceInfo [DeviceNumber ];
315
315
316
- /* Use static configuration to initialize the RTC */
316
+ /* Do not use static configuration to
317
+ preserve RTC counter value while re-initialization
317
318
rtc_init(pDevice,&aRTCConfig[DeviceNumber]);
318
-
319
+ */
319
320
/* store handle at application handle pointer */
320
321
* phDevice = pDevice ;
321
322
pDevice -> eIRQn = aRTCDeviceInfo [DeviceNumber ].eIRQn ;
Original file line number Diff line number Diff line change 6
6
* @date: $Date: 2016-07-26 13:09:22 -0400 (Tue, 26 Jul 2016) $
7
7
*----------------------------------------------------------------------------
8
8
*
9
- Copyright (c) 2010-2016 Analog Devices, Inc.
9
+ Copyright (c) 2010-2018 Analog Devices, Inc.
10
10
11
11
All rights reserved.
12
12
@@ -218,18 +218,19 @@ ADI_RTC_RESULT adi_rtc_Open(
218
218
219
219
pDevice -> pRTCRegs -> SR0 = ADI_RTC_SR3_IRQ_STATUS_MASK ;
220
220
SYNC_AFTER_WRITE (SR0 ,BITM_RTC_SR0_WSYNCSR0 )
221
-
221
+ /* Preserve RTC counter value while re-initialization
222
222
pDevice->pRTCRegs->CNT0 = 0u;
223
223
pDevice->pRTCRegs->CNT1 = 0u;
224
224
SYNC_AFTER_WRITE(SR0,BITM_RTC_SR0_WSYNCCNT0)
225
-
225
+ */
226
226
/* local pointer to instance data */
227
227
aRTCDeviceInfo [DeviceNumber ].hDevice = pDevice ;
228
228
pDevice -> pDeviceInfo = & aRTCDeviceInfo [DeviceNumber ];
229
229
230
- /* Use static configuration to initialize the RTC */
230
+ /* Do not use static configuration to
231
+ preserve RTC counter value while re-initialization
231
232
rtc_init(pDevice,&aRTCConfig[DeviceNumber]);
232
-
233
+ */
233
234
/* store handle at application handle pointer */
234
235
* phDevice = pDevice ;
235
236
pDevice -> eIRQn = aRTCDeviceInfo [DeviceNumber ].eIRQn ;
You can’t perform that action at this time.
0 commit comments