1970 lines
142 KiB
Plaintext
1970 lines
142 KiB
Plaintext
1 ;--------------------------------------------------------
|
|
2 ; File Created by SDCC : free open source ISO C Compiler
|
|
3 ; Version 4.5.0 #15242 (Linux)
|
|
4 ;--------------------------------------------------------
|
|
5 .module stm8l15x_rtc
|
|
6
|
|
7 ;--------------------------------------------------------
|
|
8 ; Public variables in this module
|
|
9 ;--------------------------------------------------------
|
|
10 .globl _RTC_DeInit
|
|
11 .globl _RTC_Init
|
|
12 .globl _RTC_StructInit
|
|
13 .globl _RTC_WriteProtectionCmd
|
|
14 .globl _RTC_EnterInitMode
|
|
15 .globl _RTC_ExitInitMode
|
|
16 .globl _RTC_WaitForSynchro
|
|
17 .globl _RTC_RatioCmd
|
|
18 .globl _RTC_BypassShadowCmd
|
|
19 .globl _RTC_SetTime
|
|
20 .globl _RTC_TimeStructInit
|
|
21 .globl _RTC_GetTime
|
|
22 .globl _RTC_GetSubSecond
|
|
23 .globl _RTC_SetDate
|
|
24 .globl _RTC_DateStructInit
|
|
25 .globl _RTC_GetDate
|
|
26 .globl _RTC_SetAlarm
|
|
27 .globl _RTC_AlarmStructInit
|
|
28 .globl _RTC_GetAlarm
|
|
29 .globl _RTC_AlarmCmd
|
|
30 .globl _RTC_AlarmSubSecondConfig
|
|
31 .globl _RTC_WakeUpClockConfig
|
|
32 .globl _RTC_SetWakeUpCounter
|
|
33 .globl _RTC_GetWakeUpCounter
|
|
34 .globl _RTC_WakeUpCmd
|
|
35 .globl _RTC_DayLightSavingConfig
|
|
36 .globl _RTC_GetStoreOperation
|
|
37 .globl _RTC_OutputConfig
|
|
38 .globl _RTC_SynchroShiftConfig
|
|
39 .globl _RTC_SmoothCalibConfig
|
|
40 .globl _RTC_CalibOutputConfig
|
|
41 .globl _RTC_CalibOutputCmd
|
|
42 .globl _RTC_TamperLevelConfig
|
|
43 .globl _RTC_TamperFilterConfig
|
|
44 .globl _RTC_TamperSamplingFreqConfig
|
|
45 .globl _RTC_TamperPinsPrechargeDuration
|
|
46 .globl _RTC_TamperCmd
|
|
47 .globl _RTC_ITConfig
|
|
48 .globl _RTC_GetFlagStatus
|
|
49 .globl _RTC_ClearFlag
|
|
50 .globl _RTC_GetITStatus
|
|
51 .globl _RTC_ClearITPendingBit
|
|
52 ;--------------------------------------------------------
|
|
53 ; ram data
|
|
54 ;--------------------------------------------------------
|
|
55 .area DATA
|
|
56 ;--------------------------------------------------------
|
|
57 ; ram data
|
|
58 ;--------------------------------------------------------
|
|
59 .area INITIALIZED
|
|
60 ;--------------------------------------------------------
|
|
61 ; absolute external ram data
|
|
62 ;--------------------------------------------------------
|
|
63 .area DABS (ABS)
|
|
64
|
|
65 ; default segment ordering for linker
|
|
66 .area HOME
|
|
67 .area GSINIT
|
|
68 .area GSFINAL
|
|
69 .area CONST
|
|
70 .area INITIALIZER
|
|
71 .area CODE
|
|
72
|
|
73 ;--------------------------------------------------------
|
|
74 ; global & static initialisations
|
|
75 ;--------------------------------------------------------
|
|
76 .area HOME
|
|
77 .area GSINIT
|
|
78 .area GSFINAL
|
|
79 .area GSINIT
|
|
80 ;--------------------------------------------------------
|
|
81 ; Home
|
|
82 ;--------------------------------------------------------
|
|
83 .area HOME
|
|
84 .area HOME
|
|
85 ;--------------------------------------------------------
|
|
86 ; code
|
|
87 ;--------------------------------------------------------
|
|
88 .area CODE
|
|
89 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 232: ErrorStatus RTC_DeInit(void)
|
|
90 ; -----------------------------------------
|
|
91 ; function RTC_DeInit
|
|
92 ; -----------------------------------------
|
|
000000 93 _RTC_DeInit:
|
|
94 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 239: RTC->WPR = 0xCA;
|
|
000000 35 CA 51 59 [ 1] 95 mov 0x5159+0, #0xca
|
|
96 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 240: RTC->WPR = 0x53;
|
|
000004 35 53 51 59 [ 1] 97 mov 0x5159+0, #0x53
|
|
98 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 243: if (RTC_EnterInitMode() == ERROR)
|
|
000008 CDr01r35 [ 4] 99 call _RTC_EnterInitMode
|
|
00000B 4D [ 1] 100 tnz a
|
|
00000C 26 06 [ 1] 101 jrne 00121$
|
|
102 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 245: status = ERROR;
|
|
00000E 4F [ 1] 103 clr a
|
|
104 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 247: RTC->WPR = 0xFF;
|
|
00000F 35 FF 51 59 [ 1] 105 mov 0x5159+0, #0xff
|
|
000013 81 [ 4] 106 ret
|
|
000014 107 00121$:
|
|
108 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 252: RTC->TR1 = RTC_TR1_RESET_VALUE;
|
|
000014 35 00 51 40 [ 1] 109 mov 0x5140+0, #0x00
|
|
110 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 253: RTC->TR2 = RTC_TR2_RESET_VALUE;
|
|
000018 35 00 51 41 [ 1] 111 mov 0x5141+0, #0x00
|
|
112 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 254: RTC->TR3 = RTC_TR3_RESET_VALUE;
|
|
00001C 35 00 51 42 [ 1] 113 mov 0x5142+0, #0x00
|
|
114 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 257: RTC->DR1 = RTC_DR1_RESET_VALUE;
|
|
000020 35 01 51 44 [ 1] 115 mov 0x5144+0, #0x01
|
|
116 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 258: RTC->DR2 = RTC_DR2_RESET_VALUE;
|
|
000024 35 21 51 45 [ 1] 117 mov 0x5145+0, #0x21
|
|
118 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 259: RTC->DR3 = RTC_DR3_RESET_VALUE;
|
|
000028 35 00 51 46 [ 1] 119 mov 0x5146+0, #0x00
|
|
120 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 262: RTC->SPRERH = RTC_SPRERH_RESET_VALUE;
|
|
00002C 35 00 51 50 [ 1] 121 mov 0x5150+0, #0x00
|
|
122 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 263: RTC->SPRERL = RTC_SPRERL_RESET_VALUE;
|
|
000030 35 FF 51 51 [ 1] 123 mov 0x5151+0, #0xff
|
|
124 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 264: RTC->APRER = RTC_APRER_RESET_VALUE;
|
|
000034 35 7F 51 52 [ 1] 125 mov 0x5152+0, #0x7f
|
|
126 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 266: RTC->TCR1 = RTC_TCR1_RESET_VALUE;
|
|
000038 35 00 51 6C [ 1] 127 mov 0x516c+0, #0x00
|
|
128 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 267: RTC->TCR2 = RTC_TCR2_RESET_VALUE;
|
|
00003C 35 00 51 6D [ 1] 129 mov 0x516d+0, #0x00
|
|
130 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 271: RTC->CR1 = RTC_CR1_RESET_VALUE;
|
|
000040 35 00 51 48 [ 1] 131 mov 0x5148+0, #0x00
|
|
132 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 272: RTC->CR2 = RTC_CR2_RESET_VALUE;
|
|
000044 35 00 51 49 [ 1] 133 mov 0x5149+0, #0x00
|
|
134 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 273: RTC->CR3 = RTC_CR3_RESET_VALUE;
|
|
000048 35 00 51 4A [ 1] 135 mov 0x514a+0, #0x00
|
|
136 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 276: while (((RTC->ISR1 & RTC_ISR1_WUTWF) == RESET) && ( wutwfcount != WUTWF_TIMEOUT))
|
|
00004C 5F [ 1] 137 clrw x
|
|
00004D 138 00102$:
|
|
00004D 72 04 51 4C 0C [ 2] 139 btjt 0x514c, #2, 00104$
|
|
000052 A3 FF FF [ 2] 140 cpw x, #0xffff
|
|
000055 27 07 [ 1] 141 jreq 00104$
|
|
142 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 278: wutwfcount++;
|
|
000057 5C [ 1] 143 incw x
|
|
144 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 279: RTC->ISR1 = 0;
|
|
000058 35 00 51 4C [ 1] 145 mov 0x514c+0, #0x00
|
|
00005C 20 EF [ 2] 146 jra 00102$
|
|
00005E 147 00104$:
|
|
148 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 282: if ((RTC->ISR1 & RTC_ISR1_WUTWF) == RESET)
|
|
00005E 72 04 51 4C 06 [ 2] 149 btjt 0x514c, #2, 00118$
|
|
150 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 284: status = ERROR;
|
|
000063 4F [ 1] 151 clr a
|
|
152 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 286: RTC->WPR = 0xFF;
|
|
000064 35 FF 51 59 [ 1] 153 mov 0x5159+0, #0xff
|
|
000068 81 [ 4] 154 ret
|
|
000069 155 00118$:
|
|
156 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 291: RTC->CR1 = RTC_CR1_RESET_VALUE;
|
|
000069 35 00 51 48 [ 1] 157 mov 0x5148+0, #0x00
|
|
158 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 294: RTC->WUTRH = RTC_WUTRH_RESET_VALUE;
|
|
00006D 35 FF 51 54 [ 1] 159 mov 0x5154+0, #0xff
|
|
160 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 295: RTC->WUTRL = RTC_WUTRL_RESET_VALUE;
|
|
000071 35 FF 51 55 [ 1] 161 mov 0x5155+0, #0xff
|
|
162 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 298: RTC->ALRMAR1 = RTC_ALRMAR1_RESET_VALUE;
|
|
000075 35 00 51 5C [ 1] 163 mov 0x515c+0, #0x00
|
|
164 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 299: RTC->ALRMAR2 = RTC_ALRMAR2_RESET_VALUE;
|
|
000079 35 00 51 5D [ 1] 165 mov 0x515d+0, #0x00
|
|
166 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 300: RTC->ALRMAR3 = RTC_ALRMAR3_RESET_VALUE;
|
|
00007D 35 00 51 5E [ 1] 167 mov 0x515e+0, #0x00
|
|
168 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 301: RTC->ALRMAR4 = RTC_ALRMAR4_RESET_VALUE;
|
|
000081 35 00 51 5F [ 1] 169 mov 0x515f+0, #0x00
|
|
170 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 303: RTC->ALRMASSRH = RTC_ALRMASSRH_RESET_VALUE;
|
|
000085 35 00 51 64 [ 1] 171 mov 0x5164+0, #0x00
|
|
172 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 304: RTC->ALRMASSRL = RTC_ALRMASSRL_RESET_VALUE;
|
|
000089 35 00 51 65 [ 1] 173 mov 0x5165+0, #0x00
|
|
174 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 305: RTC->ALRMASSMSKR = RTC_ALRMASSMSKR_RESET_VALUE;
|
|
00008D 35 00 51 66 [ 1] 175 mov 0x5166+0, #0x00
|
|
176 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 308: RTC->ISR1 = (uint8_t)0x00;
|
|
000091 35 00 51 4C [ 1] 177 mov 0x514c+0, #0x00
|
|
178 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 309: RTC->ISR2 = RTC_ISR2_RESET_VALUE;
|
|
000095 35 00 51 4D [ 1] 179 mov 0x514d+0, #0x00
|
|
180 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 311: if ((RTC->ISR1 & RTC_ISR1_RECALPF) != RESET)
|
|
000099 72 03 51 4C 0E [ 2] 181 btjf 0x514c, #1, 00110$
|
|
182 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 313: while (((RTC->ISR1 & RTC_ISR1_RECALPF) != RESET) && (recalpfcount != RECALPF_TIMEOUT))
|
|
00009E 5F [ 1] 183 clrw x
|
|
00009F 184 00106$:
|
|
00009F 72 03 51 4C 08 [ 2] 185 btjf 0x514c, #1, 00110$
|
|
0000A4 A3 FF FF [ 2] 186 cpw x, #0xffff
|
|
0000A7 27 03 [ 1] 187 jreq 00110$
|
|
188 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 315: recalpfcount++;
|
|
0000A9 5C [ 1] 189 incw x
|
|
0000AA 20 F3 [ 2] 190 jra 00106$
|
|
0000AC 191 00110$:
|
|
192 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 318: if ((RTC->ISR1 & RTC_ISR1_RECALPF) == RESET)
|
|
0000AC 72 02 51 4C 14 [ 2] 193 btjt 0x514c, #1, 00115$
|
|
194 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 320: RTC->CALRH = RTC_CALRH_RESET_VALUE;
|
|
0000B1 35 00 51 6A [ 1] 195 mov 0x516a+0, #0x00
|
|
196 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 321: RTC->CALRL = RTC_CALRL_RESET_VALUE;
|
|
0000B5 35 00 51 6B [ 1] 197 mov 0x516b+0, #0x00
|
|
198 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 323: if (RTC_WaitForSynchro() == ERROR)
|
|
0000B9 CDr01r5B [ 4] 199 call _RTC_WaitForSynchro
|
|
0000BC 4D [ 1] 200 tnz a
|
|
0000BD 26 03 [ 1] 201 jrne 00112$
|
|
202 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 325: status = ERROR;
|
|
0000BF 4F [ 1] 203 clr a
|
|
0000C0 20 04 [ 2] 204 jra 00116$
|
|
0000C2 205 00112$:
|
|
206 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 329: status = SUCCESS;
|
|
0000C2 A6 01 [ 1] 207 ld a, #0x01
|
|
208 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 334: status = ERROR;
|
|
0000C4 21 209 .byte 0x21
|
|
0000C5 210 00115$:
|
|
0000C5 4F [ 1] 211 clr a
|
|
0000C6 212 00116$:
|
|
213 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 338: RTC->WPR = 0xFF;
|
|
0000C6 35 FF 51 59 [ 1] 214 mov 0x5159+0, #0xff
|
|
215 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 343: return (ErrorStatus)status;
|
|
216 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 344: }
|
|
0000CA 81 [ 4] 217 ret
|
|
218 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 359: ErrorStatus RTC_Init(RTC_InitTypeDef* RTC_InitStruct)
|
|
219 ; -----------------------------------------
|
|
220 ; function RTC_Init
|
|
221 ; -----------------------------------------
|
|
0000CB 222 _RTC_Init:
|
|
0000CB 52 03 [ 2] 223 sub sp, #3
|
|
0000CD 1F 02 [ 2] 224 ldw (0x02, sp), x
|
|
225 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 369: RTC->WPR = 0xCA;
|
|
0000CF 35 CA 51 59 [ 1] 226 mov 0x5159+0, #0xca
|
|
227 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 370: RTC->WPR = 0x53;
|
|
0000D3 35 53 51 59 [ 1] 228 mov 0x5159+0, #0x53
|
|
229 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 373: if (RTC_EnterInitMode() == ERROR)
|
|
0000D7 CDr01r35 [ 4] 230 call _RTC_EnterInitMode
|
|
0000DA 4D [ 1] 231 tnz a
|
|
0000DB 26 03 [ 1] 232 jrne 00102$
|
|
233 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 375: status = ERROR;
|
|
0000DD 4F [ 1] 234 clr a
|
|
0000DE 20 2D [ 2] 235 jra 00103$
|
|
0000E0 236 00102$:
|
|
237 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 380: RTC->CR1 &= ((uint8_t)~( RTC_CR1_FMT ));
|
|
0000E0 72 1D 51 48 [ 1] 238 bres 0x5148, #6
|
|
239 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 383: RTC->CR1 |= ((uint8_t)(RTC_InitStruct->RTC_HourFormat));
|
|
0000E4 C6 51 48 [ 1] 240 ld a, 0x5148
|
|
0000E7 6B 01 [ 1] 241 ld (0x01, sp), a
|
|
0000E9 1E 02 [ 2] 242 ldw x, (0x02, sp)
|
|
0000EB F6 [ 1] 243 ld a, (x)
|
|
0000EC 1A 01 [ 1] 244 or a, (0x01, sp)
|
|
0000EE C7 51 48 [ 1] 245 ld 0x5148, a
|
|
246 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 386: RTC->SPRERH = (uint8_t)(RTC_InitStruct->RTC_SynchPrediv >> 8);
|
|
0000F1 1E 02 [ 2] 247 ldw x, (0x02, sp)
|
|
0000F3 5C [ 1] 248 incw x
|
|
0000F4 5C [ 1] 249 incw x
|
|
0000F5 E6 01 [ 1] 250 ld a, (0x1, x)
|
|
0000F7 F6 [ 1] 251 ld a, (x)
|
|
0000F8 C7 51 50 [ 1] 252 ld 0x5150, a
|
|
253 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 387: RTC->SPRERL = (uint8_t)(RTC_InitStruct->RTC_SynchPrediv);
|
|
0000FB E6 01 [ 1] 254 ld a, (0x1, x)
|
|
0000FD C7 51 51 [ 1] 255 ld 0x5151, a
|
|
256 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 388: RTC->APRER = (uint8_t)(RTC_InitStruct->RTC_AsynchPrediv);
|
|
000100 1E 02 [ 2] 257 ldw x, (0x02, sp)
|
|
000102 E6 01 [ 1] 258 ld a, (0x1, x)
|
|
000104 C7 51 52 [ 1] 259 ld 0x5152, a
|
|
260 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 391: RTC->ISR1 &= (uint8_t)~RTC_ISR1_INIT;
|
|
000107 72 1F 51 4C [ 1] 261 bres 0x514c, #7
|
|
262 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 393: status = SUCCESS;
|
|
00010B A6 01 [ 1] 263 ld a, #0x01
|
|
00010D 264 00103$:
|
|
265 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 397: RTC->WPR = 0xFF;
|
|
00010D 35 FF 51 59 [ 1] 266 mov 0x5159+0, #0xff
|
|
267 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 400: return (ErrorStatus)(status);
|
|
268 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 401: }
|
|
000111 5B 03 [ 2] 269 addw sp, #3
|
|
000113 81 [ 4] 270 ret
|
|
271 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 410: void RTC_StructInit(RTC_InitTypeDef* RTC_InitStruct)
|
|
272 ; -----------------------------------------
|
|
273 ; function RTC_StructInit
|
|
274 ; -----------------------------------------
|
|
000114 275 _RTC_StructInit:
|
|
000114 51 [ 1] 276 exgw x, y
|
|
277 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 413: RTC_InitStruct->RTC_HourFormat = RTC_HourFormat_24;
|
|
000115 90 7F [ 1] 278 clr (y)
|
|
279 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 416: RTC_InitStruct->RTC_AsynchPrediv = RTC_APRER_RESET_VALUE;
|
|
000117 93 [ 1] 280 ldw x, y
|
|
000118 5C [ 1] 281 incw x
|
|
000119 A6 7F [ 1] 282 ld a, #0x7f
|
|
00011B F7 [ 1] 283 ld (x), a
|
|
284 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 419: RTC_InitStruct->RTC_SynchPrediv = RTC_SPRERL_RESET_VALUE;
|
|
00011C 93 [ 1] 285 ldw x, y
|
|
00011D 90 AE 00 FF [ 2] 286 ldw y, #0x00ff
|
|
000121 EF 02 [ 2] 287 ldw (0x02, x), y
|
|
288 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 420: }
|
|
000123 81 [ 4] 289 ret
|
|
290 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 430: void RTC_WriteProtectionCmd(FunctionalState NewState)
|
|
291 ; -----------------------------------------
|
|
292 ; function RTC_WriteProtectionCmd
|
|
293 ; -----------------------------------------
|
|
000124 294 _RTC_WriteProtectionCmd:
|
|
295 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 435: if (NewState != DISABLE)
|
|
000124 4D [ 1] 296 tnz a
|
|
000125 27 05 [ 1] 297 jreq 00102$
|
|
298 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 438: RTC->WPR = RTC_WPR_EnableKey;
|
|
000127 35 FF 51 59 [ 1] 299 mov 0x5159+0, #0xff
|
|
00012B 81 [ 4] 300 ret
|
|
00012C 301 00102$:
|
|
302 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 443: RTC->WPR = RTC_WPR_DisableKey1;
|
|
00012C 35 CA 51 59 [ 1] 303 mov 0x5159+0, #0xca
|
|
304 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 444: RTC->WPR = RTC_WPR_DisableKey2;
|
|
000130 35 53 51 59 [ 1] 305 mov 0x5159+0, #0x53
|
|
306 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 446: }
|
|
000134 81 [ 4] 307 ret
|
|
308 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 458: ErrorStatus RTC_EnterInitMode(void)
|
|
309 ; -----------------------------------------
|
|
310 ; function RTC_EnterInitMode
|
|
311 ; -----------------------------------------
|
|
000135 312 _RTC_EnterInitMode:
|
|
313 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 464: if ((RTC->ISR1 & RTC_ISR1_INITF) == RESET)
|
|
000135 72 0C 51 4C 12 [ 2] 314 btjt 0x514c, #6, 00106$
|
|
315 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 467: RTC->ISR1 = (uint8_t)RTC_ISR1_INIT;
|
|
00013A 35 80 51 4C [ 1] 316 mov 0x514c+0, #0x80
|
|
317 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 470: while (((RTC->ISR1 & RTC_ISR1_INITF) == RESET) && ( initfcount != INITF_TIMEOUT))
|
|
00013E 5F [ 1] 318 clrw x
|
|
00013F 319 00102$:
|
|
00013F 72 0C 51 4C 08 [ 2] 320 btjt 0x514c, #6, 00106$
|
|
000144 A3 FF FF [ 2] 321 cpw x, #0xffff
|
|
000147 27 03 [ 1] 322 jreq 00106$
|
|
323 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 472: initfcount++;
|
|
000149 5C [ 1] 324 incw x
|
|
00014A 20 F3 [ 2] 325 jra 00102$
|
|
00014C 326 00106$:
|
|
327 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 476: if ((RTC->ISR1 & RTC_ISR1_INITF) == RESET)
|
|
00014C 72 0C 51 4C 02 [ 2] 328 btjt 0x514c, #6, 00108$
|
|
329 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 478: status = ERROR;
|
|
000151 4F [ 1] 330 clr a
|
|
000152 81 [ 4] 331 ret
|
|
000153 332 00108$:
|
|
333 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 482: status = SUCCESS;
|
|
000153 A6 01 [ 1] 334 ld a, #0x01
|
|
335 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 485: return (ErrorStatus)status;
|
|
336 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 486: }
|
|
000155 81 [ 4] 337 ret
|
|
338 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 498: void RTC_ExitInitMode(void)
|
|
339 ; -----------------------------------------
|
|
340 ; function RTC_ExitInitMode
|
|
341 ; -----------------------------------------
|
|
000156 342 _RTC_ExitInitMode:
|
|
343 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 501: RTC->ISR1 &= (uint8_t)~RTC_ISR1_INIT;
|
|
000156 72 1F 51 4C [ 1] 344 bres 0x514c, #7
|
|
345 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 502: }
|
|
00015A 81 [ 4] 346 ret
|
|
347 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 527: ErrorStatus RTC_WaitForSynchro(void)
|
|
348 ; -----------------------------------------
|
|
349 ; function RTC_WaitForSynchro
|
|
350 ; -----------------------------------------
|
|
00015B 351 _RTC_WaitForSynchro:
|
|
352 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 533: RTC->WPR = 0xCA;
|
|
00015B 35 CA 51 59 [ 1] 353 mov 0x5159+0, #0xca
|
|
354 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 534: RTC->WPR = 0x53;
|
|
00015F 35 53 51 59 [ 1] 355 mov 0x5159+0, #0x53
|
|
356 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 537: RTC->ISR1 &= (uint8_t)~(RTC_ISR1_RSF | RTC_ISR1_INIT);
|
|
000163 C6 51 4C [ 1] 357 ld a, 0x514c
|
|
000166 A4 5F [ 1] 358 and a, #0x5f
|
|
000168 C7 51 4C [ 1] 359 ld 0x514c, a
|
|
360 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 540: while (((RTC->ISR1 & RTC_ISR1_RSF) == RESET) && ( rsfcount != RSF_TIMEOUT))
|
|
00016B 5F [ 1] 361 clrw x
|
|
00016C 362 00102$:
|
|
00016C 72 0A 51 4C 08 [ 2] 363 btjt 0x514c, #5, 00104$
|
|
000171 A3 FF FF [ 2] 364 cpw x, #0xffff
|
|
000174 27 03 [ 1] 365 jreq 00104$
|
|
366 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 542: rsfcount++;
|
|
000176 5C [ 1] 367 incw x
|
|
000177 20 F3 [ 2] 368 jra 00102$
|
|
000179 369 00104$:
|
|
370 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 546: if ((RTC->ISR1 & RTC_ISR1_RSF) != RESET)
|
|
000179 72 0B 51 4C 03 [ 2] 371 btjf 0x514c, #5, 00106$
|
|
372 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 548: status = SUCCESS;
|
|
00017E A6 01 [ 1] 373 ld a, #0x01
|
|
374 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 552: status = ERROR;
|
|
000180 21 375 .byte 0x21
|
|
000181 376 00106$:
|
|
000181 4F [ 1] 377 clr a
|
|
000182 378 00107$:
|
|
379 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 556: RTC->WPR = 0xFF;
|
|
000182 35 FF 51 59 [ 1] 380 mov 0x5159+0, #0xff
|
|
381 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 558: return (ErrorStatus)status;
|
|
382 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 559: }
|
|
000186 81 [ 4] 383 ret
|
|
384 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 568: void RTC_RatioCmd(FunctionalState NewState)
|
|
385 ; -----------------------------------------
|
|
386 ; function RTC_RatioCmd
|
|
387 ; -----------------------------------------
|
|
000187 388 _RTC_RatioCmd:
|
|
000187 88 [ 1] 389 push a
|
|
000188 6B 01 [ 1] 390 ld (0x01, sp), a
|
|
391 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 574: RTC->WPR = 0xCA;
|
|
00018A 35 CA 51 59 [ 1] 392 mov 0x5159+0, #0xca
|
|
393 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 575: RTC->WPR = 0x53;
|
|
00018E 35 53 51 59 [ 1] 394 mov 0x5159+0, #0x53
|
|
395 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 580: RTC->CR1 |= (uint8_t)RTC_CR1_RATIO;
|
|
000192 C6 51 48 [ 1] 396 ld a, 0x5148
|
|
397 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 577: if (NewState != DISABLE)
|
|
000195 0D 01 [ 1] 398 tnz (0x01, sp)
|
|
000197 27 07 [ 1] 399 jreq 00102$
|
|
400 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 580: RTC->CR1 |= (uint8_t)RTC_CR1_RATIO;
|
|
000199 AA 20 [ 1] 401 or a, #0x20
|
|
00019B C7 51 48 [ 1] 402 ld 0x5148, a
|
|
00019E 20 05 [ 2] 403 jra 00103$
|
|
0001A0 404 00102$:
|
|
405 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 585: RTC->CR1 &= (uint8_t)~RTC_CR1_RATIO;
|
|
0001A0 A4 DF [ 1] 406 and a, #0xdf
|
|
0001A2 C7 51 48 [ 1] 407 ld 0x5148, a
|
|
0001A5 408 00103$:
|
|
409 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 589: RTC->WPR = 0xFF;
|
|
0001A5 35 FF 51 59 [ 1] 410 mov 0x5159+0, #0xff
|
|
411 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 590: }
|
|
0001A9 84 [ 1] 412 pop a
|
|
0001AA 81 [ 4] 413 ret
|
|
414 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 598: void RTC_BypassShadowCmd(FunctionalState NewState)
|
|
415 ; -----------------------------------------
|
|
416 ; function RTC_BypassShadowCmd
|
|
417 ; -----------------------------------------
|
|
0001AB 418 _RTC_BypassShadowCmd:
|
|
0001AB 88 [ 1] 419 push a
|
|
0001AC 6B 01 [ 1] 420 ld (0x01, sp), a
|
|
421 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 604: RTC->WPR = 0xCA;
|
|
0001AE 35 CA 51 59 [ 1] 422 mov 0x5159+0, #0xca
|
|
423 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 605: RTC->WPR = 0x53;
|
|
0001B2 35 53 51 59 [ 1] 424 mov 0x5159+0, #0x53
|
|
425 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 610: RTC->CR1 |= (uint8_t)RTC_CR1_BYPSHAD;
|
|
0001B6 C6 51 48 [ 1] 426 ld a, 0x5148
|
|
427 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 607: if (NewState != DISABLE)
|
|
0001B9 0D 01 [ 1] 428 tnz (0x01, sp)
|
|
0001BB 27 07 [ 1] 429 jreq 00102$
|
|
430 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 610: RTC->CR1 |= (uint8_t)RTC_CR1_BYPSHAD;
|
|
0001BD AA 10 [ 1] 431 or a, #0x10
|
|
0001BF C7 51 48 [ 1] 432 ld 0x5148, a
|
|
0001C2 20 05 [ 2] 433 jra 00103$
|
|
0001C4 434 00102$:
|
|
435 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 615: RTC->CR1 &= (uint8_t)~RTC_CR1_BYPSHAD;
|
|
0001C4 A4 EF [ 1] 436 and a, #0xef
|
|
0001C6 C7 51 48 [ 1] 437 ld 0x5148, a
|
|
0001C9 438 00103$:
|
|
439 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 619: RTC->WPR = 0xFF;
|
|
0001C9 35 FF 51 59 [ 1] 440 mov 0x5159+0, #0xff
|
|
441 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 620: }
|
|
0001CD 84 [ 1] 442 pop a
|
|
0001CE 81 [ 4] 443 ret
|
|
444 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 659: ErrorStatus RTC_SetTime(RTC_Format_TypeDef RTC_Format,
|
|
445 ; -----------------------------------------
|
|
446 ; function RTC_SetTime
|
|
447 ; -----------------------------------------
|
|
0001CF 448 _RTC_SetTime:
|
|
0001CF 52 06 [ 2] 449 sub sp, #6
|
|
0001D1 6B 06 [ 1] 450 ld (0x06, sp), a
|
|
0001D3 1F 04 [ 2] 451 ldw (0x04, sp), x
|
|
452 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 671: if ((RTC->CR1 & RTC_CR1_FMT) != RESET)
|
|
0001D5 C6 51 48 [ 1] 453 ld a, 0x5148
|
|
454 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 701: RTC->WPR = 0xCA;
|
|
0001D8 35 CA 51 59 [ 1] 455 mov 0x5159+0, #0xca
|
|
456 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 702: RTC->WPR = 0x53;
|
|
0001DC 35 53 51 59 [ 1] 457 mov 0x5159+0, #0x53
|
|
458 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 705: if (RTC_EnterInitMode() == ERROR)
|
|
0001E0 CDr01r35 [ 4] 459 call _RTC_EnterInitMode
|
|
0001E3 4D [ 1] 460 tnz a
|
|
0001E4 26 07 [ 1] 461 jrne 00123$
|
|
462 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 707: status = ERROR;
|
|
0001E6 4F [ 1] 463 clr a
|
|
464 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 709: RTC->WPR = 0xFF;
|
|
0001E7 35 FF 51 59 [ 1] 465 mov 0x5159+0, #0xff
|
|
0001EB 20 6B [ 2] 466 jra 00124$
|
|
0001ED 467 00123$:
|
|
468 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 714: if ((RTC->CR1 & RTC_CR1_FMT) != RESET)
|
|
0001ED 72 0D 51 48 07 [ 2] 469 btjf 0x5148, #6, 00111$
|
|
470 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 717: temp = RTC_TimeStruct->RTC_H12;
|
|
0001F2 1E 04 [ 2] 471 ldw x, (0x04, sp)
|
|
0001F4 E6 03 [ 1] 472 ld a, (0x3, x)
|
|
0001F6 6B 01 [ 1] 473 ld (0x01, sp), a
|
|
474 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 721: temp = 0;
|
|
0001F8 C5 475 .byte 0xc5
|
|
0001F9 476 00111$:
|
|
0001F9 0F 01 [ 1] 477 clr (0x01, sp)
|
|
0001FB 478 00112$:
|
|
479 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 726: RTC->TR1 = (uint8_t)(RTC_TimeStruct->RTC_Seconds);
|
|
0001FB 16 04 [ 2] 480 ldw y, (0x04, sp)
|
|
481 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 727: RTC->TR2 = (uint8_t)(RTC_TimeStruct->RTC_Minutes) ;
|
|
0001FD 1E 04 [ 2] 482 ldw x, (0x04, sp)
|
|
0001FF 5C [ 1] 483 incw x
|
|
000200 1F 02 [ 2] 484 ldw (0x02, sp), x
|
|
485 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 728: RTC->TR3 = (uint8_t)( temp | RTC_TimeStruct->RTC_Hours) ;
|
|
000202 1E 04 [ 2] 486 ldw x, (0x04, sp)
|
|
487 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 726: RTC->TR1 = (uint8_t)(RTC_TimeStruct->RTC_Seconds);
|
|
000204 90 E6 02 [ 1] 488 ld a, (0x2, y)
|
|
489 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 724: if (RTC_Format != RTC_Format_BIN)
|
|
000207 0D 06 [ 1] 490 tnz (0x06, sp)
|
|
000209 27 12 [ 1] 491 jreq 00114$
|
|
492 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 726: RTC->TR1 = (uint8_t)(RTC_TimeStruct->RTC_Seconds);
|
|
00020B C7 51 40 [ 1] 493 ld 0x5140, a
|
|
494 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 727: RTC->TR2 = (uint8_t)(RTC_TimeStruct->RTC_Minutes) ;
|
|
00020E 16 02 [ 2] 495 ldw y, (0x02, sp)
|
|
000210 90 F6 [ 1] 496 ld a, (y)
|
|
000212 C7 51 41 [ 1] 497 ld 0x5141, a
|
|
498 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 728: RTC->TR3 = (uint8_t)( temp | RTC_TimeStruct->RTC_Hours) ;
|
|
000215 F6 [ 1] 499 ld a, (x)
|
|
000216 1A 01 [ 1] 500 or a, (0x01, sp)
|
|
000218 C7 51 42 [ 1] 501 ld 0x5142, a
|
|
00021B 20 1D [ 2] 502 jra 00115$
|
|
00021D 503 00114$:
|
|
504 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 732: RTC->TR1 = (uint8_t)(ByteToBcd2(RTC_TimeStruct->RTC_Seconds));
|
|
00021D 89 [ 2] 505 pushw x
|
|
00021E CDr09r23 [ 4] 506 call _ByteToBcd2
|
|
000221 85 [ 2] 507 popw x
|
|
000222 C7 51 40 [ 1] 508 ld 0x5140, a
|
|
509 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 733: RTC->TR2 = (uint8_t)(ByteToBcd2(RTC_TimeStruct->RTC_Minutes)) ;
|
|
000225 16 02 [ 2] 510 ldw y, (0x02, sp)
|
|
000227 90 F6 [ 1] 511 ld a, (y)
|
|
000229 89 [ 2] 512 pushw x
|
|
00022A CDr09r23 [ 4] 513 call _ByteToBcd2
|
|
00022D 85 [ 2] 514 popw x
|
|
00022E C7 51 41 [ 1] 515 ld 0x5141, a
|
|
516 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 734: RTC->TR3 = (uint8_t)( temp | ByteToBcd2(RTC_TimeStruct->RTC_Hours));
|
|
000231 F6 [ 1] 517 ld a, (x)
|
|
000232 CDr09r23 [ 4] 518 call _ByteToBcd2
|
|
000235 1A 01 [ 1] 519 or a, (0x01, sp)
|
|
000237 C7 51 42 [ 1] 520 ld 0x5142, a
|
|
00023A 521 00115$:
|
|
522 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 737: (void)(RTC->DR3);
|
|
00023A C6 51 46 [ 1] 523 ld a, 0x5146
|
|
524 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 740: RTC->ISR1 &= (uint8_t)~RTC_ISR1_INIT;
|
|
00023D 72 1F 51 4C [ 1] 525 bres 0x514c, #7
|
|
526 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 743: RTC->WPR = 0xFF;
|
|
000241 35 FF 51 59 [ 1] 527 mov 0x5159+0, #0xff
|
|
528 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 746: if ((RTC->CR1 & RTC_CR1_BYPSHAD) == RESET)
|
|
000245 72 08 51 48 0C [ 2] 529 btjt 0x5148, #4, 00120$
|
|
530 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 748: if (RTC_WaitForSynchro() == ERROR)
|
|
00024A CDr01r5B [ 4] 531 call _RTC_WaitForSynchro
|
|
00024D 4D [ 1] 532 tnz a
|
|
00024E 26 03 [ 1] 533 jrne 00117$
|
|
534 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 750: status = ERROR;
|
|
000250 4F [ 1] 535 clr a
|
|
000251 20 05 [ 2] 536 jra 00124$
|
|
000253 537 00117$:
|
|
538 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 754: status = SUCCESS;
|
|
000253 A6 01 [ 1] 539 ld a, #0x01
|
|
540 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 759: status = SUCCESS;
|
|
000255 C5 541 .byte 0xc5
|
|
000256 542 00120$:
|
|
000256 A6 01 [ 1] 543 ld a, #0x01
|
|
000258 544 00124$:
|
|
545 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 763: return (ErrorStatus)status;
|
|
546 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 764: }
|
|
000258 5B 06 [ 2] 547 addw sp, #6
|
|
00025A 81 [ 4] 548 ret
|
|
549 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 775: void RTC_TimeStructInit(RTC_TimeTypeDef* RTC_TimeStruct)
|
|
550 ; -----------------------------------------
|
|
551 ; function RTC_TimeStructInit
|
|
552 ; -----------------------------------------
|
|
00025B 553 _RTC_TimeStructInit:
|
|
554 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 778: RTC_TimeStruct->RTC_H12 = RTC_H12_AM;
|
|
00025B 90 93 [ 1] 555 ldw y, x
|
|
00025D 6F 03 [ 1] 556 clr (0x0003, x)
|
|
557 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 779: RTC_TimeStruct->RTC_Hours = 0;
|
|
00025F 90 7F [ 1] 558 clr (y)
|
|
559 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 780: RTC_TimeStruct->RTC_Minutes = 0;
|
|
000261 93 [ 1] 560 ldw x, y
|
|
000262 6F 01 [ 1] 561 clr (0x01, x)
|
|
562 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 781: RTC_TimeStruct->RTC_Seconds = 0;
|
|
000264 93 [ 1] 563 ldw x, y
|
|
000265 6F 02 [ 1] 564 clr (0x02, x)
|
|
565 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 782: }
|
|
000267 81 [ 4] 566 ret
|
|
567 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 798: void RTC_GetTime(RTC_Format_TypeDef RTC_Format,
|
|
568 ; -----------------------------------------
|
|
569 ; function RTC_GetTime
|
|
570 ; -----------------------------------------
|
|
000268 571 _RTC_GetTime:
|
|
000268 52 06 [ 2] 572 sub sp, #6
|
|
00026A 6B 06 [ 1] 573 ld (0x06, sp), a
|
|
574 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 808: RTC_TimeStruct->RTC_Seconds = RTC->TR1;
|
|
00026C 90 93 [ 1] 575 ldw y, x
|
|
00026E 5C [ 1] 576 incw x
|
|
00026F 5C [ 1] 577 incw x
|
|
000270 1F 01 [ 2] 578 ldw (0x01, sp), x
|
|
000272 C6 51 40 [ 1] 579 ld a, 0x5140
|
|
000275 1E 01 [ 2] 580 ldw x, (0x01, sp)
|
|
000277 F7 [ 1] 581 ld (x), a
|
|
582 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 811: RTC_TimeStruct->RTC_Minutes = RTC->TR2;
|
|
000278 93 [ 1] 583 ldw x, y
|
|
000279 5C [ 1] 584 incw x
|
|
00027A 1F 03 [ 2] 585 ldw (0x03, sp), x
|
|
00027C C6 51 41 [ 1] 586 ld a, 0x5141
|
|
00027F 1E 03 [ 2] 587 ldw x, (0x03, sp)
|
|
000281 F7 [ 1] 588 ld (x), a
|
|
589 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 814: tmpreg = (uint8_t)RTC->TR3;
|
|
000282 C6 51 42 [ 1] 590 ld a, 0x5142
|
|
000285 6B 05 [ 1] 591 ld (0x05, sp), a
|
|
592 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 817: (void) (RTC->DR3) ;
|
|
000287 C6 51 46 [ 1] 593 ld a, 0x5146
|
|
594 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 821: RTC_TimeStruct->RTC_Hours = (uint8_t)(tmpreg & (uint8_t)~(RTC_TR3_PM));
|
|
00028A 93 [ 1] 595 ldw x, y
|
|
00028B 7B 05 [ 1] 596 ld a, (0x05, sp)
|
|
00028D A4 BF [ 1] 597 and a, #0xbf
|
|
00028F F7 [ 1] 598 ld (x), a
|
|
599 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 824: RTC_TimeStruct->RTC_H12 = (RTC_H12_TypeDef)(tmpreg & RTC_TR3_PM);
|
|
000290 72 A9 00 03 [ 2] 600 addw y, #0x0003
|
|
000294 7B 05 [ 1] 601 ld a, (0x05, sp)
|
|
000296 A4 40 [ 1] 602 and a, #0x40
|
|
000298 90 F7 [ 1] 603 ld (y), a
|
|
604 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 827: if (RTC_Format == RTC_Format_BIN)
|
|
00029A 0D 06 [ 1] 605 tnz (0x06, sp)
|
|
00029C 26 19 [ 1] 606 jrne 00103$
|
|
607 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 830: RTC_TimeStruct->RTC_Hours = (uint8_t)Bcd2ToByte(RTC_TimeStruct->RTC_Hours);
|
|
00029E F6 [ 1] 608 ld a, (x)
|
|
00029F 89 [ 2] 609 pushw x
|
|
0002A0 CDr09r36 [ 4] 610 call _Bcd2ToByte
|
|
0002A3 85 [ 2] 611 popw x
|
|
0002A4 F7 [ 1] 612 ld (x), a
|
|
613 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 831: RTC_TimeStruct->RTC_Minutes = (uint8_t)Bcd2ToByte(RTC_TimeStruct->RTC_Minutes);
|
|
0002A5 1E 03 [ 2] 614 ldw x, (0x03, sp)
|
|
0002A7 F6 [ 1] 615 ld a, (x)
|
|
0002A8 CDr09r36 [ 4] 616 call _Bcd2ToByte
|
|
0002AB 1E 03 [ 2] 617 ldw x, (0x03, sp)
|
|
0002AD F7 [ 1] 618 ld (x), a
|
|
619 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 832: RTC_TimeStruct->RTC_Seconds = (uint8_t)Bcd2ToByte(RTC_TimeStruct->RTC_Seconds);
|
|
0002AE 1E 01 [ 2] 620 ldw x, (0x01, sp)
|
|
0002B0 F6 [ 1] 621 ld a, (x)
|
|
0002B1 CDr09r36 [ 4] 622 call _Bcd2ToByte
|
|
0002B4 1E 01 [ 2] 623 ldw x, (0x01, sp)
|
|
0002B6 F7 [ 1] 624 ld (x), a
|
|
0002B7 625 00103$:
|
|
626 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 834: }
|
|
0002B7 5B 06 [ 2] 627 addw sp, #6
|
|
0002B9 81 [ 4] 628 ret
|
|
629 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 845: uint16_t RTC_GetSubSecond(void)
|
|
630 ; -----------------------------------------
|
|
631 ; function RTC_GetSubSecond
|
|
632 ; -----------------------------------------
|
|
0002BA 633 _RTC_GetSubSecond:
|
|
0002BA 89 [ 2] 634 pushw x
|
|
635 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 851: ssrhreg = RTC->SSRH;
|
|
0002BB C6 51 57 [ 1] 636 ld a, 0x5157
|
|
0002BE 95 [ 1] 637 ld xh, a
|
|
638 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 852: ssrlreg = RTC->SSRL;
|
|
0002BF C6 51 58 [ 1] 639 ld a, 0x5158
|
|
0002C2 97 [ 1] 640 ld xl, a
|
|
641 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 855: (void) (RTC->DR3);
|
|
0002C3 C6 51 46 [ 1] 642 ld a, 0x5146
|
|
643 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 858: ssrreg = (uint16_t)((uint16_t)((uint16_t)ssrhreg << 8) | (uint16_t)(ssrlreg));
|
|
0002C6 0F 02 [ 1] 644 clr (0x02, sp)
|
|
645 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 859: return (uint16_t)(ssrreg);
|
|
646 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 860: }
|
|
0002C8 5B 02 [ 2] 647 addw sp, #2
|
|
0002CA 81 [ 4] 648 ret
|
|
649 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 876: ErrorStatus RTC_SetDate(RTC_Format_TypeDef RTC_Format,
|
|
650 ; -----------------------------------------
|
|
651 ; function RTC_SetDate
|
|
652 ; -----------------------------------------
|
|
0002CB 653 _RTC_SetDate:
|
|
0002CB 52 0A [ 2] 654 sub sp, #10
|
|
0002CD 6B 0A [ 1] 655 ld (0x0a, sp), a
|
|
656 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 881: if ((RTC_Format == RTC_Format_BIN) && ((RTC_DateStruct->RTC_Month & TEN_VALUE_BCD) == TEN_VALUE_BCD))
|
|
0002CF 1F 08 [ 2] 657 ldw (0x08, sp), x
|
|
0002D1 5C [ 1] 658 incw x
|
|
0002D2 1F 01 [ 2] 659 ldw (0x01, sp), x
|
|
0002D4 0D 0A [ 1] 660 tnz (0x0a, sp)
|
|
0002D6 26 11 [ 1] 661 jrne 00106$
|
|
0002D8 1E 01 [ 2] 662 ldw x, (0x01, sp)
|
|
0002DA F6 [ 1] 663 ld a, (x)
|
|
0002DB 97 [ 1] 664 ld xl, a
|
|
0002DC 43 [ 1] 665 cpl a
|
|
0002DD A5 10 [ 1] 666 bcp a, #0x10
|
|
0002DF 26 08 [ 1] 667 jrne 00106$
|
|
668 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 883: RTC_DateStruct->RTC_Month = (RTC_Month_TypeDef)((RTC_DateStruct->RTC_Month & (uint8_t)~(TEN_VALUE_BCD)) + TEN_VALUE_BIN);
|
|
0002E1 9F [ 1] 669 ld a, xl
|
|
0002E2 A4 EF [ 1] 670 and a, #0xef
|
|
0002E4 AB 0A [ 1] 671 add a, #0x0a
|
|
0002E6 1E 01 [ 2] 672 ldw x, (0x01, sp)
|
|
0002E8 F7 [ 1] 673 ld (x), a
|
|
674 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 902: assert_param(IS_RTC_DATE_MAX(Bcd2ToByte((uint8_t)RTC_DateStruct->RTC_Date)));
|
|
0002E9 675 00106$:
|
|
676 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 907: RTC->WPR = 0xCA;
|
|
0002E9 35 CA 51 59 [ 1] 677 mov 0x5159+0, #0xca
|
|
678 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 908: RTC->WPR = 0x53;
|
|
0002ED 35 53 51 59 [ 1] 679 mov 0x5159+0, #0x53
|
|
680 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 911: if (RTC_EnterInitMode() == ERROR)
|
|
0002F1 CDr01r35 [ 4] 681 call _RTC_EnterInitMode
|
|
0002F4 4D [ 1] 682 tnz a
|
|
0002F5 26 07 [ 1] 683 jrne 00117$
|
|
684 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 913: status = ERROR;
|
|
0002F7 4F [ 1] 685 clr a
|
|
686 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 915: RTC->WPR = 0xFF;
|
|
0002F8 35 FF 51 59 [ 1] 687 mov 0x5159+0, #0xff
|
|
0002FC 20 71 [ 2] 688 jra 00118$
|
|
0002FE 689 00117$:
|
|
690 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 919: (void)(RTC->TR1);
|
|
0002FE C6 51 40 [ 1] 691 ld a, 0x5140
|
|
692 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 924: RTC->DR1 = (uint8_t)(RTC_DateStruct->RTC_Date);
|
|
000301 1E 08 [ 2] 693 ldw x, (0x08, sp)
|
|
694 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 925: RTC->DR2 = (uint8_t)((RTC_DateStruct->RTC_Month) | (uint8_t)((RTC_DateStruct->RTC_WeekDay) << 5));
|
|
000303 16 08 [ 2] 695 ldw y, (0x08, sp)
|
|
000305 17 03 [ 2] 696 ldw (0x03, sp), y
|
|
697 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 926: RTC->DR3 = (uint8_t)((RTC_DateStruct->RTC_Year));
|
|
000307 16 08 [ 2] 698 ldw y, (0x08, sp)
|
|
000309 72 A9 00 03 [ 2] 699 addw y, #0x0003
|
|
00030D 17 05 [ 2] 700 ldw (0x05, sp), y
|
|
701 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 924: RTC->DR1 = (uint8_t)(RTC_DateStruct->RTC_Date);
|
|
00030F E6 02 [ 1] 702 ld a, (0x2, x)
|
|
703 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 922: if (RTC_Format != RTC_Format_BIN)
|
|
000311 0D 0A [ 1] 704 tnz (0x0a, sp)
|
|
000313 27 1C [ 1] 705 jreq 00108$
|
|
706 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 924: RTC->DR1 = (uint8_t)(RTC_DateStruct->RTC_Date);
|
|
000315 C7 51 44 [ 1] 707 ld 0x5144, a
|
|
708 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 925: RTC->DR2 = (uint8_t)((RTC_DateStruct->RTC_Month) | (uint8_t)((RTC_DateStruct->RTC_WeekDay) << 5));
|
|
000318 1E 01 [ 2] 709 ldw x, (0x01, sp)
|
|
00031A F6 [ 1] 710 ld a, (x)
|
|
00031B 6B 07 [ 1] 711 ld (0x07, sp), a
|
|
00031D 1E 03 [ 2] 712 ldw x, (0x03, sp)
|
|
00031F F6 [ 1] 713 ld a, (x)
|
|
000320 4E [ 1] 714 swap a
|
|
000321 A4 F0 [ 1] 715 and a, #0xf0
|
|
000323 48 [ 1] 716 sll a
|
|
000324 1A 07 [ 1] 717 or a, (0x07, sp)
|
|
000326 C7 51 45 [ 1] 718 ld 0x5145, a
|
|
719 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 926: RTC->DR3 = (uint8_t)((RTC_DateStruct->RTC_Year));
|
|
000329 1E 05 [ 2] 720 ldw x, (0x05, sp)
|
|
00032B F6 [ 1] 721 ld a, (x)
|
|
00032C C7 51 46 [ 1] 722 ld 0x5146, a
|
|
00032F 20 23 [ 2] 723 jra 00109$
|
|
000331 724 00108$:
|
|
725 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 930: RTC->DR1 = (uint8_t)(ByteToBcd2 ((uint8_t)RTC_DateStruct->RTC_Date));
|
|
000331 CDr09r23 [ 4] 726 call _ByteToBcd2
|
|
000334 C7 51 44 [ 1] 727 ld 0x5144, a
|
|
728 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 931: RTC->DR2 = (uint8_t)((ByteToBcd2((uint8_t)RTC_DateStruct->RTC_Month)) | (uint8_t)((RTC_DateStruct->RTC_WeekDay) << 5));
|
|
000337 1E 01 [ 2] 729 ldw x, (0x01, sp)
|
|
000339 F6 [ 1] 730 ld a, (x)
|
|
00033A CDr09r23 [ 4] 731 call _ByteToBcd2
|
|
00033D 6B 07 [ 1] 732 ld (0x07, sp), a
|
|
00033F 1E 03 [ 2] 733 ldw x, (0x03, sp)
|
|
000341 F6 [ 1] 734 ld a, (x)
|
|
000342 4E [ 1] 735 swap a
|
|
000343 A4 F0 [ 1] 736 and a, #0xf0
|
|
000345 48 [ 1] 737 sll a
|
|
000346 1A 07 [ 1] 738 or a, (0x07, sp)
|
|
000348 C7 51 45 [ 1] 739 ld 0x5145, a
|
|
740 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 932: RTC->DR3 = (uint8_t)(ByteToBcd2((uint8_t)RTC_DateStruct->RTC_Year));
|
|
00034B 1E 05 [ 2] 741 ldw x, (0x05, sp)
|
|
00034D F6 [ 1] 742 ld a, (x)
|
|
00034E CDr09r23 [ 4] 743 call _ByteToBcd2
|
|
000351 C7 51 46 [ 1] 744 ld 0x5146, a
|
|
000354 745 00109$:
|
|
746 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 936: RTC->ISR1 &= (uint8_t)~RTC_ISR1_INIT;
|
|
000354 72 1F 51 4C [ 1] 747 bres 0x514c, #7
|
|
748 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 939: RTC->WPR = 0xFF;
|
|
000358 35 FF 51 59 [ 1] 749 mov 0x5159+0, #0xff
|
|
750 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 942: if ((RTC->CR1 & RTC_CR1_BYPSHAD) == RESET)
|
|
00035C 72 08 51 48 0C [ 2] 751 btjt 0x5148, #4, 00114$
|
|
752 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 944: if (RTC_WaitForSynchro() == ERROR)
|
|
000361 CDr01r5B [ 4] 753 call _RTC_WaitForSynchro
|
|
000364 4D [ 1] 754 tnz a
|
|
000365 26 03 [ 1] 755 jrne 00111$
|
|
756 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 946: status = ERROR;
|
|
000367 4F [ 1] 757 clr a
|
|
000368 20 05 [ 2] 758 jra 00118$
|
|
00036A 759 00111$:
|
|
760 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 950: status = SUCCESS;
|
|
00036A A6 01 [ 1] 761 ld a, #0x01
|
|
762 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 955: status = SUCCESS;
|
|
00036C C5 763 .byte 0xc5
|
|
00036D 764 00114$:
|
|
00036D A6 01 [ 1] 765 ld a, #0x01
|
|
00036F 766 00118$:
|
|
767 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 959: return (ErrorStatus)status;
|
|
768 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 960: }
|
|
00036F 5B 0A [ 2] 769 addw sp, #10
|
|
000371 81 [ 4] 770 ret
|
|
771 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 968: void RTC_DateStructInit(RTC_DateTypeDef* RTC_DateStruct)
|
|
772 ; -----------------------------------------
|
|
773 ; function RTC_DateStructInit
|
|
774 ; -----------------------------------------
|
|
000372 775 _RTC_DateStructInit:
|
|
000372 51 [ 1] 776 exgw x, y
|
|
777 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 971: RTC_DateStruct->RTC_WeekDay = RTC_Weekday_Monday;
|
|
000373 A6 01 [ 1] 778 ld a, #0x01
|
|
000375 90 F7 [ 1] 779 ld (y), a
|
|
780 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 972: RTC_DateStruct->RTC_Date = 1;
|
|
000377 93 [ 1] 781 ldw x, y
|
|
000378 5C [ 1] 782 incw x
|
|
000379 5C [ 1] 783 incw x
|
|
00037A A6 01 [ 1] 784 ld a, #0x01
|
|
00037C F7 [ 1] 785 ld (x), a
|
|
786 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 973: RTC_DateStruct->RTC_Month = RTC_Month_January;
|
|
00037D 93 [ 1] 787 ldw x, y
|
|
00037E 5C [ 1] 788 incw x
|
|
00037F A6 01 [ 1] 789 ld a, #0x01
|
|
000381 F7 [ 1] 790 ld (x), a
|
|
791 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 974: RTC_DateStruct->RTC_Year = 0;
|
|
000382 93 [ 1] 792 ldw x, y
|
|
000383 6F 03 [ 1] 793 clr (0x0003, x)
|
|
794 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 975: }
|
|
000385 81 [ 4] 795 ret
|
|
796 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 988: void RTC_GetDate(RTC_Format_TypeDef RTC_Format,
|
|
797 ; -----------------------------------------
|
|
798 ; function RTC_GetDate
|
|
799 ; -----------------------------------------
|
|
000386 800 _RTC_GetDate:
|
|
000386 52 06 [ 2] 801 sub sp, #6
|
|
000388 6B 06 [ 1] 802 ld (0x06, sp), a
|
|
00038A 51 [ 1] 803 exgw x, y
|
|
804 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 997: (void) (RTC->TR1) ;
|
|
00038B C6 51 40 [ 1] 805 ld a, 0x5140
|
|
806 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 998: RTC_DateStruct->RTC_Date = (uint8_t)(RTC->DR1);
|
|
00038E 93 [ 1] 807 ldw x, y
|
|
00038F 5C [ 1] 808 incw x
|
|
000390 5C [ 1] 809 incw x
|
|
000391 1F 01 [ 2] 810 ldw (0x01, sp), x
|
|
000393 C6 51 44 [ 1] 811 ld a, 0x5144
|
|
000396 1E 01 [ 2] 812 ldw x, (0x01, sp)
|
|
000398 F7 [ 1] 813 ld (x), a
|
|
814 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 999: tmpreg = (uint8_t)RTC->DR2;
|
|
000399 C6 51 45 [ 1] 815 ld a, 0x5145
|
|
00039C 6B 03 [ 1] 816 ld (0x03, sp), a
|
|
817 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1000: RTC_DateStruct->RTC_Year = (uint8_t)(RTC->DR3);
|
|
00039E 93 [ 1] 818 ldw x, y
|
|
00039F 1C 00 03 [ 2] 819 addw x, #0x0003
|
|
0003A2 1F 04 [ 2] 820 ldw (0x04, sp), x
|
|
0003A4 C6 51 46 [ 1] 821 ld a, 0x5146
|
|
0003A7 1E 04 [ 2] 822 ldw x, (0x04, sp)
|
|
0003A9 F7 [ 1] 823 ld (x), a
|
|
824 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1003: RTC_DateStruct->RTC_Month = (RTC_Month_TypeDef)(tmpreg & (uint8_t)(RTC_DR2_MT | RTC_DR2_MU));
|
|
0003AA 93 [ 1] 825 ldw x, y
|
|
0003AB 5C [ 1] 826 incw x
|
|
0003AC 7B 03 [ 1] 827 ld a, (0x03, sp)
|
|
0003AE A4 1F [ 1] 828 and a, #0x1f
|
|
0003B0 F7 [ 1] 829 ld (x), a
|
|
830 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1004: RTC_DateStruct->RTC_WeekDay = (RTC_Weekday_TypeDef)((uint8_t)((uint8_t)tmpreg & (uint8_t)(RTC_DR2_WDU)) >> (uint8_t)5);
|
|
0003B1 7B 03 [ 1] 831 ld a, (0x03, sp)
|
|
0003B3 A4 E0 [ 1] 832 and a, #0xe0
|
|
0003B5 4E [ 1] 833 swap a
|
|
0003B6 A4 0F [ 1] 834 and a, #0x0f
|
|
0003B8 44 [ 1] 835 srl a
|
|
0003B9 90 F7 [ 1] 836 ld (y), a
|
|
837 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1007: if (RTC_Format == RTC_Format_BIN)
|
|
0003BB 0D 06 [ 1] 838 tnz (0x06, sp)
|
|
0003BD 26 1D [ 1] 839 jrne 00103$
|
|
840 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1010: RTC_DateStruct->RTC_Year = (uint8_t)Bcd2ToByte((uint8_t)RTC_DateStruct->RTC_Year);
|
|
0003BF 16 04 [ 2] 841 ldw y, (0x04, sp)
|
|
0003C1 90 F6 [ 1] 842 ld a, (y)
|
|
0003C3 89 [ 2] 843 pushw x
|
|
0003C4 CDr09r36 [ 4] 844 call _Bcd2ToByte
|
|
0003C7 85 [ 2] 845 popw x
|
|
0003C8 16 04 [ 2] 846 ldw y, (0x04, sp)
|
|
0003CA 90 F7 [ 1] 847 ld (y), a
|
|
848 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1011: RTC_DateStruct->RTC_Month = (RTC_Month_TypeDef)Bcd2ToByte((uint8_t)RTC_DateStruct->RTC_Month);
|
|
0003CC F6 [ 1] 849 ld a, (x)
|
|
0003CD 89 [ 2] 850 pushw x
|
|
0003CE CDr09r36 [ 4] 851 call _Bcd2ToByte
|
|
0003D1 85 [ 2] 852 popw x
|
|
0003D2 F7 [ 1] 853 ld (x), a
|
|
854 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1012: RTC_DateStruct->RTC_Date = (uint8_t)(Bcd2ToByte((uint8_t)RTC_DateStruct->RTC_Date));
|
|
0003D3 1E 01 [ 2] 855 ldw x, (0x01, sp)
|
|
0003D5 F6 [ 1] 856 ld a, (x)
|
|
0003D6 CDr09r36 [ 4] 857 call _Bcd2ToByte
|
|
0003D9 1E 01 [ 2] 858 ldw x, (0x01, sp)
|
|
0003DB F7 [ 1] 859 ld (x), a
|
|
0003DC 860 00103$:
|
|
861 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1014: }
|
|
0003DC 5B 06 [ 2] 862 addw sp, #6
|
|
0003DE 81 [ 4] 863 ret
|
|
864 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1044: void RTC_SetAlarm(RTC_Format_TypeDef RTC_Format,
|
|
865 ; -----------------------------------------
|
|
866 ; function RTC_SetAlarm
|
|
867 ; -----------------------------------------
|
|
0003DF 868 _RTC_SetAlarm:
|
|
0003DF 52 11 [ 2] 869 sub sp, #17
|
|
0003E1 6B 11 [ 1] 870 ld (0x11, sp), a
|
|
0003E3 51 [ 1] 871 exgw x, y
|
|
872 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1062: if ((RTC->CR1 & RTC_CR1_FMT) != RESET)
|
|
0003E4 C6 51 48 [ 1] 873 ld a, 0x5148
|
|
874 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1094: if ((RTC_AlarmStruct->RTC_AlarmMask & RTC_AlarmMask_DateWeekDay) == RESET )
|
|
0003E7 93 [ 1] 875 ldw x, y
|
|
0003E8 1C 00 04 [ 2] 876 addw x, #0x0004
|
|
0003EB 1F 05 [ 2] 877 ldw (0x05, sp), x
|
|
878 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1108: RTC->WPR = 0xCA;
|
|
0003ED 35 CA 51 59 [ 1] 879 mov 0x5159+0, #0xca
|
|
880 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1109: RTC->WPR = 0x53;
|
|
0003F1 35 53 51 59 [ 1] 881 mov 0x5159+0, #0x53
|
|
882 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1115: tmpreg1 = (uint8_t)((uint8_t)(RTC_AlarmStruct->RTC_AlarmTime.RTC_Seconds) | \
|
|
0003F5 17 01 [ 2] 883 ldw (0x01, sp), y
|
|
884 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1118: tmpreg2 = (uint8_t)((uint8_t)(RTC_AlarmStruct->RTC_AlarmTime.RTC_Minutes) | \
|
|
0003F7 93 [ 1] 885 ldw x, y
|
|
0003F8 5C [ 1] 886 incw x
|
|
0003F9 1F 03 [ 2] 887 ldw (0x03, sp), x
|
|
888 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1121: tmpreg3 = (uint8_t)((uint8_t)((uint8_t)(RTC_AlarmStruct->RTC_AlarmTime.RTC_Hours) | \
|
|
0003FB 17 07 [ 2] 889 ldw (0x07, sp), y
|
|
0003FD 93 [ 1] 890 ldw x, y
|
|
0003FE 1C 00 03 [ 2] 891 addw x, #0x0003
|
|
000401 1F 09 [ 2] 892 ldw (0x09, sp), x
|
|
893 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1125: tmpreg4 = (uint8_t)((uint8_t)((uint8_t)(RTC_AlarmStruct->RTC_AlarmDateWeekDay) | \
|
|
000403 93 [ 1] 894 ldw x, y
|
|
000404 1C 00 06 [ 2] 895 addw x, #0x0006
|
|
000407 1F 0B [ 2] 896 ldw (0x0b, sp), x
|
|
000409 93 [ 1] 897 ldw x, y
|
|
00040A 1C 00 05 [ 2] 898 addw x, #0x0005
|
|
00040D 1F 0D [ 2] 899 ldw (0x0d, sp), x
|
|
900 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1115: tmpreg1 = (uint8_t)((uint8_t)(RTC_AlarmStruct->RTC_AlarmTime.RTC_Seconds) | \
|
|
00040F 1E 01 [ 2] 901 ldw x, (0x01, sp)
|
|
000411 E6 02 [ 1] 902 ld a, (0x2, x)
|
|
000413 6B 10 [ 1] 903 ld (0x10, sp), a
|
|
904 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1113: if (RTC_Format != RTC_Format_BIN)
|
|
000415 0D 11 [ 1] 905 tnz (0x11, sp)
|
|
000417 27 47 [ 1] 906 jreq 00116$
|
|
907 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1115: tmpreg1 = (uint8_t)((uint8_t)(RTC_AlarmStruct->RTC_AlarmTime.RTC_Seconds) | \
|
|
000419 1E 05 [ 2] 908 ldw x, (0x05, sp)
|
|
00041B F6 [ 1] 909 ld a, (x)
|
|
00041C 97 [ 1] 910 ld xl, a
|
|
00041D A4 80 [ 1] 911 and a, #0x80
|
|
00041F 1A 10 [ 1] 912 or a, (0x10, sp)
|
|
000421 6B 0F [ 1] 913 ld (0x0f, sp), a
|
|
914 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1118: tmpreg2 = (uint8_t)((uint8_t)(RTC_AlarmStruct->RTC_AlarmTime.RTC_Minutes) | \
|
|
000423 16 03 [ 2] 915 ldw y, (0x03, sp)
|
|
000425 90 F6 [ 1] 916 ld a, (y)
|
|
000427 6B 10 [ 1] 917 ld (0x10, sp), a
|
|
000429 9F [ 1] 918 ld a, xl
|
|
00042A 48 [ 1] 919 sll a
|
|
00042B A4 80 [ 1] 920 and a, #0x80
|
|
00042D 1A 10 [ 1] 921 or a, (0x10, sp)
|
|
00042F 6B 10 [ 1] 922 ld (0x10, sp), a
|
|
923 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1121: tmpreg3 = (uint8_t)((uint8_t)((uint8_t)(RTC_AlarmStruct->RTC_AlarmTime.RTC_Hours) | \
|
|
000431 16 07 [ 2] 924 ldw y, (0x07, sp)
|
|
000433 90 F6 [ 1] 925 ld a, (y)
|
|
000435 6B 06 [ 1] 926 ld (0x06, sp), a
|
|
000437 16 09 [ 2] 927 ldw y, (0x09, sp)
|
|
000439 90 F6 [ 1] 928 ld a, (y)
|
|
00043B 1A 06 [ 1] 929 or a, (0x06, sp)
|
|
00043D 6B 0A [ 1] 930 ld (0x0a, sp), a
|
|
00043F 9F [ 1] 931 ld a, xl
|
|
000440 48 [ 1] 932 sll a
|
|
000441 48 [ 1] 933 sll a
|
|
000442 A4 80 [ 1] 934 and a, #0x80
|
|
000444 1A 0A [ 1] 935 or a, (0x0a, sp)
|
|
000446 6B 0A [ 1] 936 ld (0x0a, sp), a
|
|
937 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1125: tmpreg4 = (uint8_t)((uint8_t)((uint8_t)(RTC_AlarmStruct->RTC_AlarmDateWeekDay) | \
|
|
000448 16 0B [ 2] 938 ldw y, (0x0b, sp)
|
|
00044A 90 F6 [ 1] 939 ld a, (y)
|
|
00044C 6B 09 [ 1] 940 ld (0x09, sp), a
|
|
00044E 16 0D [ 2] 941 ldw y, (0x0d, sp)
|
|
000450 90 F6 [ 1] 942 ld a, (y)
|
|
000452 1A 09 [ 1] 943 or a, (0x09, sp)
|
|
000454 6B 0E [ 1] 944 ld (0x0e, sp), a
|
|
000456 9F [ 1] 945 ld a, xl
|
|
000457 48 [ 1] 946 sll a
|
|
000458 48 [ 1] 947 sll a
|
|
000459 48 [ 1] 948 sll a
|
|
00045A A4 80 [ 1] 949 and a, #0x80
|
|
00045C 1A 0E [ 1] 950 or a, (0x0e, sp)
|
|
00045E 20 55 [ 2] 951 jra 00117$
|
|
000460 952 00116$:
|
|
953 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1132: tmpreg1 = (uint8_t)((ByteToBcd2(RTC_AlarmStruct->RTC_AlarmTime.RTC_Seconds)) | \
|
|
000460 7B 10 [ 1] 954 ld a, (0x10, sp)
|
|
000462 CDr09r23 [ 4] 955 call _ByteToBcd2
|
|
000465 6B 10 [ 1] 956 ld (0x10, sp), a
|
|
000467 1E 05 [ 2] 957 ldw x, (0x05, sp)
|
|
000469 F6 [ 1] 958 ld a, (x)
|
|
00046A A4 80 [ 1] 959 and a, #0x80
|
|
00046C 1A 10 [ 1] 960 or a, (0x10, sp)
|
|
00046E 6B 0F [ 1] 961 ld (0x0f, sp), a
|
|
962 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1135: tmpreg2 = (uint8_t)((ByteToBcd2(RTC_AlarmStruct->RTC_AlarmTime.RTC_Minutes)) | \
|
|
000470 1E 03 [ 2] 963 ldw x, (0x03, sp)
|
|
000472 F6 [ 1] 964 ld a, (x)
|
|
000473 CDr09r23 [ 4] 965 call _ByteToBcd2
|
|
000476 6B 10 [ 1] 966 ld (0x10, sp), a
|
|
000478 1E 05 [ 2] 967 ldw x, (0x05, sp)
|
|
00047A F6 [ 1] 968 ld a, (x)
|
|
00047B 48 [ 1] 969 sll a
|
|
00047C A4 80 [ 1] 970 and a, #0x80
|
|
00047E 1A 10 [ 1] 971 or a, (0x10, sp)
|
|
000480 6B 10 [ 1] 972 ld (0x10, sp), a
|
|
973 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1138: tmpreg3 = (uint8_t)((uint8_t)((ByteToBcd2(RTC_AlarmStruct->RTC_AlarmTime.RTC_Hours)) | \
|
|
000482 1E 07 [ 2] 974 ldw x, (0x07, sp)
|
|
000484 F6 [ 1] 975 ld a, (x)
|
|
000485 CDr09r23 [ 4] 976 call _ByteToBcd2
|
|
000488 6B 08 [ 1] 977 ld (0x08, sp), a
|
|
00048A 1E 09 [ 2] 978 ldw x, (0x09, sp)
|
|
00048C F6 [ 1] 979 ld a, (x)
|
|
00048D 1A 08 [ 1] 980 or a, (0x08, sp)
|
|
00048F 6B 0A [ 1] 981 ld (0x0a, sp), a
|
|
000491 1E 05 [ 2] 982 ldw x, (0x05, sp)
|
|
000493 F6 [ 1] 983 ld a, (x)
|
|
000494 48 [ 1] 984 sll a
|
|
000495 48 [ 1] 985 sll a
|
|
000496 A4 80 [ 1] 986 and a, #0x80
|
|
000498 1A 0A [ 1] 987 or a, (0x0a, sp)
|
|
00049A 6B 0A [ 1] 988 ld (0x0a, sp), a
|
|
989 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1142: tmpreg4 = (uint8_t)((uint8_t)((ByteToBcd2(RTC_AlarmStruct->RTC_AlarmDateWeekDay)) | \
|
|
00049C 1E 0B [ 2] 990 ldw x, (0x0b, sp)
|
|
00049E F6 [ 1] 991 ld a, (x)
|
|
00049F CDr09r23 [ 4] 992 call _ByteToBcd2
|
|
0004A2 6B 0C [ 1] 993 ld (0x0c, sp), a
|
|
0004A4 1E 0D [ 2] 994 ldw x, (0x0d, sp)
|
|
0004A6 F6 [ 1] 995 ld a, (x)
|
|
0004A7 1A 0C [ 1] 996 or a, (0x0c, sp)
|
|
0004A9 6B 0E [ 1] 997 ld (0x0e, sp), a
|
|
0004AB 1E 05 [ 2] 998 ldw x, (0x05, sp)
|
|
0004AD F6 [ 1] 999 ld a, (x)
|
|
0004AE 48 [ 1] 1000 sll a
|
|
0004AF 48 [ 1] 1001 sll a
|
|
0004B0 48 [ 1] 1002 sll a
|
|
0004B1 A4 80 [ 1] 1003 and a, #0x80
|
|
0004B3 1A 0E [ 1] 1004 or a, (0x0e, sp)
|
|
0004B5 1005 00117$:
|
|
1006 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1148: RTC->ALRMAR1 = tmpreg1;
|
|
0004B5 AE 51 5C [ 2] 1007 ldw x, #0x515c
|
|
0004B8 88 [ 1] 1008 push a
|
|
0004B9 7B 10 [ 1] 1009 ld a, (0x10, sp)
|
|
0004BB F7 [ 1] 1010 ld (x), a
|
|
0004BC 84 [ 1] 1011 pop a
|
|
1012 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1149: RTC->ALRMAR2 = tmpreg2;
|
|
0004BD AE 51 5D [ 2] 1013 ldw x, #0x515d
|
|
0004C0 88 [ 1] 1014 push a
|
|
0004C1 7B 11 [ 1] 1015 ld a, (0x11, sp)
|
|
0004C3 F7 [ 1] 1016 ld (x), a
|
|
0004C4 84 [ 1] 1017 pop a
|
|
1018 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1150: RTC->ALRMAR3 = tmpreg3;
|
|
0004C5 AE 51 5E [ 2] 1019 ldw x, #0x515e
|
|
0004C8 88 [ 1] 1020 push a
|
|
0004C9 7B 0B [ 1] 1021 ld a, (0x0b, sp)
|
|
0004CB F7 [ 1] 1022 ld (x), a
|
|
0004CC 84 [ 1] 1023 pop a
|
|
1024 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1151: RTC->ALRMAR4 = tmpreg4;
|
|
0004CD C7 51 5F [ 1] 1025 ld 0x515f, a
|
|
1026 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1154: RTC->WPR = 0xFF;
|
|
0004D0 35 FF 51 59 [ 1] 1027 mov 0x5159+0, #0xff
|
|
1028 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1155: }
|
|
0004D4 5B 11 [ 2] 1029 addw sp, #17
|
|
0004D6 81 [ 4] 1030 ret
|
|
1031 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1165: void RTC_AlarmStructInit(RTC_AlarmTypeDef* RTC_AlarmStruct)
|
|
1032 ; -----------------------------------------
|
|
1033 ; function RTC_AlarmStructInit
|
|
1034 ; -----------------------------------------
|
|
0004D7 1035 _RTC_AlarmStructInit:
|
|
1036 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1168: RTC_AlarmStruct->RTC_AlarmTime.RTC_H12 = RTC_H12_AM;
|
|
0004D7 90 93 [ 1] 1037 ldw y, x
|
|
0004D9 6F 03 [ 1] 1038 clr (0x0003, x)
|
|
1039 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1169: RTC_AlarmStruct->RTC_AlarmTime.RTC_Hours = 0;
|
|
0004DB 90 7F [ 1] 1040 clr (y)
|
|
1041 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1170: RTC_AlarmStruct->RTC_AlarmTime.RTC_Minutes = 0;
|
|
0004DD 93 [ 1] 1042 ldw x, y
|
|
0004DE 6F 01 [ 1] 1043 clr (0x01, x)
|
|
1044 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1171: RTC_AlarmStruct->RTC_AlarmTime.RTC_Seconds = 0;
|
|
0004E0 93 [ 1] 1045 ldw x, y
|
|
0004E1 6F 02 [ 1] 1046 clr (0x02, x)
|
|
1047 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1174: RTC_AlarmStruct->RTC_AlarmDateWeekDaySel = RTC_AlarmDateWeekDaySel_Date;
|
|
0004E3 93 [ 1] 1048 ldw x, y
|
|
0004E4 6F 05 [ 1] 1049 clr (0x0005, x)
|
|
1050 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1175: RTC_AlarmStruct->RTC_AlarmDateWeekDay = 1;
|
|
0004E6 A6 01 [ 1] 1051 ld a, #0x01
|
|
0004E8 90 E7 06 [ 1] 1052 ld (0x0006, y), a
|
|
1053 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1178: RTC_AlarmStruct->RTC_AlarmMask = RTC_AlarmMask_All;
|
|
0004EB A6 F0 [ 1] 1054 ld a, #0xf0
|
|
0004ED 90 E7 04 [ 1] 1055 ld (0x0004, y), a
|
|
1056 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1179: }
|
|
0004F0 81 [ 4] 1057 ret
|
|
1058 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1188: void RTC_GetAlarm(RTC_Format_TypeDef RTC_Format,
|
|
1059 ; -----------------------------------------
|
|
1060 ; function RTC_GetAlarm
|
|
1061 ; -----------------------------------------
|
|
0004F1 1062 _RTC_GetAlarm:
|
|
0004F1 52 0B [ 2] 1063 sub sp, #11
|
|
0004F3 6B 0B [ 1] 1064 ld (0x0b, sp), a
|
|
0004F5 1F 09 [ 2] 1065 ldw (0x09, sp), x
|
|
1066 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1201: tmpreg1 = (uint8_t)RTC->ALRMAR1;
|
|
0004F7 C6 51 5C [ 1] 1067 ld a, 0x515c
|
|
0004FA 6B 08 [ 1] 1068 ld (0x08, sp), a
|
|
1069 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1202: tmpreg2 = (uint8_t)RTC->ALRMAR2;
|
|
0004FC C6 51 5D [ 1] 1070 ld a, 0x515d
|
|
0004FF 6B 01 [ 1] 1071 ld (0x01, sp), a
|
|
1072 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1203: tmpreg3 = (uint8_t)RTC->ALRMAR3;
|
|
000501 C6 51 5E [ 1] 1073 ld a, 0x515e
|
|
000504 6B 02 [ 1] 1074 ld (0x02, sp), a
|
|
1075 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1204: tmpreg4 = (uint8_t)RTC->ALRMAR4;
|
|
000506 C6 51 5F [ 1] 1076 ld a, 0x515f
|
|
000509 6B 03 [ 1] 1077 ld (0x03, sp), a
|
|
1078 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1207: RTC_AlarmStruct->RTC_AlarmTime.RTC_Seconds = (uint8_t)((uint8_t)tmpreg1 & (uint8_t)((uint8_t)RTC_ALRMAR1_ST | (uint8_t)RTC_ALRMAR1_SU));
|
|
00050B 1E 09 [ 2] 1079 ldw x, (0x09, sp)
|
|
00050D 5C [ 1] 1080 incw x
|
|
00050E 5C [ 1] 1081 incw x
|
|
00050F 1F 04 [ 2] 1082 ldw (0x04, sp), x
|
|
000511 7B 08 [ 1] 1083 ld a, (0x08, sp)
|
|
000513 A4 7F [ 1] 1084 and a, #0x7f
|
|
000515 1E 04 [ 2] 1085 ldw x, (0x04, sp)
|
|
000517 F7 [ 1] 1086 ld (x), a
|
|
1087 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1208: alarmmask = (uint8_t)(tmpreg1 & RTC_ALRMAR1_MSK1);
|
|
000518 7B 08 [ 1] 1088 ld a, (0x08, sp)
|
|
00051A A4 80 [ 1] 1089 and a, #0x80
|
|
00051C 6B 08 [ 1] 1090 ld (0x08, sp), a
|
|
1091 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1211: RTC_AlarmStruct->RTC_AlarmTime.RTC_Minutes = (uint8_t)((uint8_t)tmpreg2 & (uint8_t)((uint8_t)RTC_ALRMAR2_MNT | (uint8_t)RTC_ALRMAR2_MNU));
|
|
00051E 1E 09 [ 2] 1092 ldw x, (0x09, sp)
|
|
000520 5C [ 1] 1093 incw x
|
|
000521 1F 06 [ 2] 1094 ldw (0x06, sp), x
|
|
000523 7B 01 [ 1] 1095 ld a, (0x01, sp)
|
|
000525 A4 7F [ 1] 1096 and a, #0x7f
|
|
000527 1E 06 [ 2] 1097 ldw x, (0x06, sp)
|
|
000529 F7 [ 1] 1098 ld (x), a
|
|
1099 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1212: alarmmask = (uint8_t)((alarmmask) | (uint8_t)((uint8_t)(tmpreg2 & RTC_ALRMAR2_MSK2) >> 1));
|
|
00052A 7B 01 [ 1] 1100 ld a, (0x01, sp)
|
|
00052C A4 80 [ 1] 1101 and a, #0x80
|
|
00052E 44 [ 1] 1102 srl a
|
|
00052F 1A 08 [ 1] 1103 or a, (0x08, sp)
|
|
000531 6B 08 [ 1] 1104 ld (0x08, sp), a
|
|
1105 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1215: RTC_AlarmStruct->RTC_AlarmTime.RTC_Hours = (uint8_t)((uint8_t)tmpreg3 & (uint8_t)((uint8_t)RTC_ALRMAR3_HT | (uint8_t)RTC_ALRMAR3_HU));
|
|
000533 16 09 [ 2] 1106 ldw y, (0x09, sp)
|
|
000535 7B 02 [ 1] 1107 ld a, (0x02, sp)
|
|
000537 A4 3F [ 1] 1108 and a, #0x3f
|
|
000539 90 F7 [ 1] 1109 ld (y), a
|
|
1110 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1216: RTC_AlarmStruct->RTC_AlarmTime.RTC_H12 = (RTC_H12_TypeDef)((uint8_t)tmpreg3 & (uint8_t)RTC_ALRMAR3_PM);
|
|
00053B 1E 09 [ 2] 1111 ldw x, (0x09, sp)
|
|
00053D 1C 00 03 [ 2] 1112 addw x, #0x0003
|
|
000540 7B 02 [ 1] 1113 ld a, (0x02, sp)
|
|
000542 A4 40 [ 1] 1114 and a, #0x40
|
|
000544 F7 [ 1] 1115 ld (x), a
|
|
1116 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1217: alarmmask = (uint8_t)((alarmmask) | (uint8_t)((uint8_t)((uint8_t)tmpreg3 & (uint8_t)RTC_ALRMAR3_MSK3) >> 2));
|
|
000545 7B 02 [ 1] 1117 ld a, (0x02, sp)
|
|
000547 A4 80 [ 1] 1118 and a, #0x80
|
|
000549 44 [ 1] 1119 srl a
|
|
00054A 44 [ 1] 1120 srl a
|
|
00054B 1A 08 [ 1] 1121 or a, (0x08, sp)
|
|
00054D 6B 08 [ 1] 1122 ld (0x08, sp), a
|
|
1123 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1220: RTC_AlarmStruct->RTC_AlarmDateWeekDay = (uint8_t)((uint8_t)tmpreg4 & (uint8_t)((uint8_t)RTC_ALRMAR4_DT | (uint8_t)RTC_ALRMAR4_DU));
|
|
00054F 1E 09 [ 2] 1124 ldw x, (0x09, sp)
|
|
000551 1C 00 06 [ 2] 1125 addw x, #0x0006
|
|
000554 1F 01 [ 2] 1126 ldw (0x01, sp), x
|
|
000556 7B 03 [ 1] 1127 ld a, (0x03, sp)
|
|
000558 A4 3F [ 1] 1128 and a, #0x3f
|
|
00055A 1E 01 [ 2] 1129 ldw x, (0x01, sp)
|
|
00055C F7 [ 1] 1130 ld (x), a
|
|
1131 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1221: RTC_AlarmStruct->RTC_AlarmDateWeekDaySel = (RTC_AlarmDateWeekDaySel_TypeDef)((uint8_t)tmpreg4 & (uint8_t)RTC_ALRMAR4_WDSEL);
|
|
00055D 1E 09 [ 2] 1132 ldw x, (0x09, sp)
|
|
00055F 1C 00 05 [ 2] 1133 addw x, #0x0005
|
|
000562 7B 03 [ 1] 1134 ld a, (0x03, sp)
|
|
000564 A4 40 [ 1] 1135 and a, #0x40
|
|
000566 F7 [ 1] 1136 ld (x), a
|
|
1137 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1222: alarmmask = (uint8_t)((alarmmask) | (uint8_t)((uint8_t)((uint8_t)tmpreg4 & RTC_ALRMAR4_MSK4) >> 3));
|
|
000567 7B 03 [ 1] 1138 ld a, (0x03, sp)
|
|
000569 A4 80 [ 1] 1139 and a, #0x80
|
|
00056B 44 [ 1] 1140 srl a
|
|
00056C 44 [ 1] 1141 srl a
|
|
00056D 44 [ 1] 1142 srl a
|
|
00056E 1A 08 [ 1] 1143 or a, (0x08, sp)
|
|
1144 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1224: RTC_AlarmStruct->RTC_AlarmMask = alarmmask;
|
|
000570 1E 09 [ 2] 1145 ldw x, (0x09, sp)
|
|
000572 1C 00 04 [ 2] 1146 addw x, #0x0004
|
|
000575 F7 [ 1] 1147 ld (x), a
|
|
1148 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1226: if (RTC_Format == RTC_Format_BIN)
|
|
000576 0D 0B [ 1] 1149 tnz (0x0b, sp)
|
|
000578 26 26 [ 1] 1150 jrne 00103$
|
|
1151 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1228: RTC_AlarmStruct->RTC_AlarmTime.RTC_Hours = Bcd2ToByte(RTC_AlarmStruct->RTC_AlarmTime.RTC_Hours);
|
|
00057A 90 F6 [ 1] 1152 ld a, (y)
|
|
00057C 90 89 [ 2] 1153 pushw y
|
|
00057E CDr09r36 [ 4] 1154 call _Bcd2ToByte
|
|
000581 90 85 [ 2] 1155 popw y
|
|
000583 90 F7 [ 1] 1156 ld (y), a
|
|
1157 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1229: RTC_AlarmStruct->RTC_AlarmTime.RTC_Minutes = Bcd2ToByte(RTC_AlarmStruct->RTC_AlarmTime.RTC_Minutes);
|
|
000585 1E 06 [ 2] 1158 ldw x, (0x06, sp)
|
|
000587 F6 [ 1] 1159 ld a, (x)
|
|
000588 CDr09r36 [ 4] 1160 call _Bcd2ToByte
|
|
00058B 1E 06 [ 2] 1161 ldw x, (0x06, sp)
|
|
00058D F7 [ 1] 1162 ld (x), a
|
|
1163 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1230: RTC_AlarmStruct->RTC_AlarmTime.RTC_Seconds = Bcd2ToByte(RTC_AlarmStruct->RTC_AlarmTime.RTC_Seconds);
|
|
00058E 1E 04 [ 2] 1164 ldw x, (0x04, sp)
|
|
000590 F6 [ 1] 1165 ld a, (x)
|
|
000591 CDr09r36 [ 4] 1166 call _Bcd2ToByte
|
|
000594 1E 04 [ 2] 1167 ldw x, (0x04, sp)
|
|
000596 F7 [ 1] 1168 ld (x), a
|
|
1169 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1231: RTC_AlarmStruct->RTC_AlarmDateWeekDay = Bcd2ToByte(RTC_AlarmStruct->RTC_AlarmDateWeekDay);
|
|
000597 1E 01 [ 2] 1170 ldw x, (0x01, sp)
|
|
000599 F6 [ 1] 1171 ld a, (x)
|
|
00059A CDr09r36 [ 4] 1172 call _Bcd2ToByte
|
|
00059D 1E 01 [ 2] 1173 ldw x, (0x01, sp)
|
|
00059F F7 [ 1] 1174 ld (x), a
|
|
0005A0 1175 00103$:
|
|
1176 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1233: }
|
|
0005A0 5B 0B [ 2] 1177 addw sp, #11
|
|
0005A2 81 [ 4] 1178 ret
|
|
1179 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1242: ErrorStatus RTC_AlarmCmd(FunctionalState NewState)
|
|
1180 ; -----------------------------------------
|
|
1181 ; function RTC_AlarmCmd
|
|
1182 ; -----------------------------------------
|
|
0005A3 1183 _RTC_AlarmCmd:
|
|
0005A3 52 03 [ 2] 1184 sub sp, #3
|
|
0005A5 6B 03 [ 1] 1185 ld (0x03, sp), a
|
|
1186 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1244: __IO uint16_t alrawfcount = 0;
|
|
0005A7 5F [ 1] 1187 clrw x
|
|
0005A8 1F 01 [ 2] 1188 ldw (0x01, sp), x
|
|
1189 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1252: RTC->WPR = 0xCA;
|
|
0005AA 35 CA 51 59 [ 1] 1190 mov 0x5159+0, #0xca
|
|
1191 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1253: RTC->WPR = 0x53;
|
|
0005AE 35 53 51 59 [ 1] 1192 mov 0x5159+0, #0x53
|
|
1193 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1258: RTC->CR2 |= (uint8_t)(RTC_CR2_ALRAE);
|
|
0005B2 C6 51 49 [ 1] 1194 ld a, 0x5149
|
|
1195 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1256: if (NewState != DISABLE)
|
|
0005B5 0D 03 [ 1] 1196 tnz (0x03, sp)
|
|
0005B7 27 09 [ 1] 1197 jreq 00109$
|
|
1198 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1258: RTC->CR2 |= (uint8_t)(RTC_CR2_ALRAE);
|
|
0005B9 AA 01 [ 1] 1199 or a, #0x01
|
|
0005BB C7 51 49 [ 1] 1200 ld 0x5149, a
|
|
1201 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1259: status = SUCCESS;
|
|
0005BE A6 01 [ 1] 1202 ld a, #0x01
|
|
0005C0 20 22 [ 2] 1203 jra 00110$
|
|
0005C2 1204 00109$:
|
|
1205 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1263: RTC->CR2 &= (uint8_t)~(RTC_CR2_ALRAE) ;
|
|
0005C2 A4 FE [ 1] 1206 and a, #0xfe
|
|
0005C4 C7 51 49 [ 1] 1207 ld 0x5149, a
|
|
1208 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1266: temp1 = (uint8_t)(RTC->ISR1 & RTC_ISR1_ALRAWF);
|
|
0005C7 C6 51 4C [ 1] 1209 ld a, 0x514c
|
|
0005CA A4 01 [ 1] 1210 and a, #0x01
|
|
1211 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1267: while ((alrawfcount != ALRAWF_TIMEOUT) && (temp1 == RESET))
|
|
0005CC 1212 00102$:
|
|
0005CC 1E 01 [ 2] 1213 ldw x, (0x01, sp)
|
|
0005CE 5C [ 1] 1214 incw x
|
|
0005CF 27 0A [ 1] 1215 jreq 00104$
|
|
0005D1 4D [ 1] 1216 tnz a
|
|
0005D2 26 07 [ 1] 1217 jrne 00104$
|
|
1218 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1269: alrawfcount++;
|
|
0005D4 1E 01 [ 2] 1219 ldw x, (0x01, sp)
|
|
0005D6 5C [ 1] 1220 incw x
|
|
0005D7 1F 01 [ 2] 1221 ldw (0x01, sp), x
|
|
0005D9 20 F1 [ 2] 1222 jra 00102$
|
|
0005DB 1223 00104$:
|
|
1224 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1272: if ((RTC->ISR1 & RTC_ISR1_ALRAWF) == RESET)
|
|
0005DB 72 00 51 4C 02 [ 2] 1225 btjt 0x514c, #0, 00106$
|
|
1226 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1274: status = ERROR;
|
|
0005E0 4F [ 1] 1227 clr a
|
|
1228 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1278: status = SUCCESS;
|
|
0005E1 C5 1229 .byte 0xc5
|
|
0005E2 1230 00106$:
|
|
0005E2 A6 01 [ 1] 1231 ld a, #0x01
|
|
0005E4 1232 00110$:
|
|
1233 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1283: RTC->WPR = 0xFF;
|
|
0005E4 35 FF 51 59 [ 1] 1234 mov 0x5159+0, #0xff
|
|
1235 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1286: return (ErrorStatus)status;
|
|
1236 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1287: }
|
|
0005E8 5B 03 [ 2] 1237 addw sp, #3
|
|
0005EA 81 [ 4] 1238 ret
|
|
1239 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1298: ErrorStatus RTC_AlarmSubSecondConfig(uint16_t RTC_AlarmSubSecondValue,
|
|
1240 ; -----------------------------------------
|
|
1241 ; function RTC_AlarmSubSecondConfig
|
|
1242 ; -----------------------------------------
|
|
0005EB 1243 _RTC_AlarmSubSecondConfig:
|
|
0005EB 89 [ 2] 1244 pushw x
|
|
0005EC 6B 02 [ 1] 1245 ld (0x02, sp), a
|
|
1246 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1309: RTC->WPR = 0xCA;
|
|
0005EE 35 CA 51 59 [ 1] 1247 mov 0x5159+0, #0xca
|
|
1248 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1310: RTC->WPR = 0x53;
|
|
0005F2 35 53 51 59 [ 1] 1249 mov 0x5159+0, #0x53
|
|
1250 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1313: if ((RTC->ISR1 & RTC_ISR1_INITF) == RESET)
|
|
0005F6 72 0C 51 4C 24 [ 2] 1251 btjt 0x514c, #6, 00102$
|
|
1252 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1316: alarmstatus = (uint8_t)(RTC->CR2 | RTC_CR2_ALRAE);
|
|
0005FB C6 51 49 [ 1] 1253 ld a, 0x5149
|
|
0005FE AA 01 [ 1] 1254 or a, #0x01
|
|
000600 6B 01 [ 1] 1255 ld (0x01, sp), a
|
|
1256 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1319: RTC->CR2 &= (uint8_t)~(RTC_CR2_ALRAE);
|
|
000602 72 11 51 49 [ 1] 1257 bres 0x5149, #0
|
|
1258 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1322: RTC->ALRMASSRH = (uint8_t)(RTC_AlarmSubSecondValue >> 8);
|
|
000606 9E [ 1] 1259 ld a, xh
|
|
000607 C7 51 64 [ 1] 1260 ld 0x5164, a
|
|
1261 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1323: RTC->ALRMASSRL = (uint8_t)(RTC_AlarmSubSecondValue);
|
|
00060A 9F [ 1] 1262 ld a, xl
|
|
00060B C7 51 65 [ 1] 1263 ld 0x5165, a
|
|
1264 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1324: RTC->ALRMASSMSKR = (uint8_t)RTC_AlarmSubSecondMask;
|
|
00060E AE 51 66 [ 2] 1265 ldw x, #0x5166
|
|
000611 7B 02 [ 1] 1266 ld a, (0x02, sp)
|
|
000613 F7 [ 1] 1267 ld (x), a
|
|
1268 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1327: RTC->CR2 |= alarmstatus;
|
|
000614 C6 51 49 [ 1] 1269 ld a, 0x5149
|
|
000617 1A 01 [ 1] 1270 or a, (0x01, sp)
|
|
000619 C7 51 49 [ 1] 1271 ld 0x5149, a
|
|
1272 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1329: status = SUCCESS;
|
|
00061C A6 01 [ 1] 1273 ld a, #0x01
|
|
1274 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1333: status = ERROR;
|
|
00061E 21 1275 .byte 0x21
|
|
00061F 1276 00102$:
|
|
00061F 4F [ 1] 1277 clr a
|
|
000620 1278 00103$:
|
|
1279 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1337: RTC->WPR = 0xFF;
|
|
000620 35 FF 51 59 [ 1] 1280 mov 0x5159+0, #0xff
|
|
1281 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1339: return (ErrorStatus)status;
|
|
1282 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1340: }
|
|
000624 85 [ 2] 1283 popw x
|
|
000625 81 [ 4] 1284 ret
|
|
1285 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1369: void RTC_WakeUpClockConfig(RTC_WakeUpClock_TypeDef RTC_WakeUpClock)
|
|
1286 ; -----------------------------------------
|
|
1287 ; function RTC_WakeUpClockConfig
|
|
1288 ; -----------------------------------------
|
|
000626 1289 _RTC_WakeUpClockConfig:
|
|
000626 88 [ 1] 1290 push a
|
|
000627 6B 01 [ 1] 1291 ld (0x01, sp), a
|
|
1292 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1376: RTC->WPR = 0xCA;
|
|
000629 35 CA 51 59 [ 1] 1293 mov 0x5159+0, #0xca
|
|
1294 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1377: RTC->WPR = 0x53;
|
|
00062D 35 53 51 59 [ 1] 1295 mov 0x5159+0, #0x53
|
|
1296 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1380: RTC->CR2 &= (uint8_t)~RTC_CR2_WUTE;
|
|
000631 72 15 51 49 [ 1] 1297 bres 0x5149, #2
|
|
1298 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1383: RTC->CR1 &= (uint8_t)~RTC_CR1_WUCKSEL;
|
|
000635 C6 51 48 [ 1] 1299 ld a, 0x5148
|
|
000638 A4 F8 [ 1] 1300 and a, #0xf8
|
|
00063A C7 51 48 [ 1] 1301 ld 0x5148, a
|
|
1302 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1386: RTC->CR1 |= (uint8_t)RTC_WakeUpClock;
|
|
00063D C6 51 48 [ 1] 1303 ld a, 0x5148
|
|
000640 1A 01 [ 1] 1304 or a, (0x01, sp)
|
|
000642 C7 51 48 [ 1] 1305 ld 0x5148, a
|
|
1306 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1389: RTC->WPR = 0xFF;
|
|
000645 35 FF 51 59 [ 1] 1307 mov 0x5159+0, #0xff
|
|
1308 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1390: }
|
|
000649 84 [ 1] 1309 pop a
|
|
00064A 81 [ 4] 1310 ret
|
|
1311 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1400: void RTC_SetWakeUpCounter(uint16_t RTC_WakeupCounter)
|
|
1312 ; -----------------------------------------
|
|
1313 ; function RTC_SetWakeUpCounter
|
|
1314 ; -----------------------------------------
|
|
00064B 1315 _RTC_SetWakeUpCounter:
|
|
1316 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1403: RTC->WPR = 0xCA;
|
|
00064B 35 CA 51 59 [ 1] 1317 mov 0x5159+0, #0xca
|
|
1318 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1404: RTC->WPR = 0x53;
|
|
00064F 35 53 51 59 [ 1] 1319 mov 0x5159+0, #0x53
|
|
1320 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1408: RTC->WUTRH = (uint8_t)(RTC_WakeupCounter >> 8);
|
|
000653 9E [ 1] 1321 ld a, xh
|
|
000654 C7 51 54 [ 1] 1322 ld 0x5154, a
|
|
1323 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1409: RTC->WUTRL = (uint8_t)(RTC_WakeupCounter);
|
|
000657 9F [ 1] 1324 ld a, xl
|
|
000658 C7 51 55 [ 1] 1325 ld 0x5155, a
|
|
1326 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1412: RTC->WPR = 0xFF;
|
|
00065B 35 FF 51 59 [ 1] 1327 mov 0x5159+0, #0xff
|
|
1328 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1413: }
|
|
00065F 81 [ 4] 1329 ret
|
|
1330 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1420: uint16_t RTC_GetWakeUpCounter(void)
|
|
1331 ; -----------------------------------------
|
|
1332 ; function RTC_GetWakeUpCounter
|
|
1333 ; -----------------------------------------
|
|
000660 1334 _RTC_GetWakeUpCounter:
|
|
000660 89 [ 2] 1335 pushw x
|
|
1336 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1425: tmpreg = ((uint16_t)RTC->WUTRH) << 8;
|
|
000661 C6 51 54 [ 1] 1337 ld a, 0x5154
|
|
000664 95 [ 1] 1338 ld xh, a
|
|
000665 0F 02 [ 1] 1339 clr (0x02, sp)
|
|
1340 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1426: tmpreg |= RTC->WUTRL;
|
|
000667 C6 51 55 [ 1] 1341 ld a, 0x5155
|
|
1342 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1429: return (uint16_t)tmpreg;
|
|
00066A 97 [ 1] 1343 ld xl, a
|
|
1344 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1430: }
|
|
00066B 5B 02 [ 2] 1345 addw sp, #2
|
|
00066D 81 [ 4] 1346 ret
|
|
1347 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1440: ErrorStatus RTC_WakeUpCmd(FunctionalState NewState)
|
|
1348 ; -----------------------------------------
|
|
1349 ; function RTC_WakeUpCmd
|
|
1350 ; -----------------------------------------
|
|
00066E 1351 _RTC_WakeUpCmd:
|
|
00066E 88 [ 1] 1352 push a
|
|
00066F 6B 01 [ 1] 1353 ld (0x01, sp), a
|
|
1354 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1449: RTC->WPR = 0xCA;
|
|
000671 35 CA 51 59 [ 1] 1355 mov 0x5159+0, #0xca
|
|
1356 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1450: RTC->WPR = 0x53;
|
|
000675 35 53 51 59 [ 1] 1357 mov 0x5159+0, #0x53
|
|
1358 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1455: RTC->CR2 |= (uint8_t)RTC_CR2_WUTE;
|
|
000679 C6 51 49 [ 1] 1359 ld a, 0x5149
|
|
1360 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1452: if (NewState != DISABLE)
|
|
00067C 0D 01 [ 1] 1361 tnz (0x01, sp)
|
|
00067E 27 09 [ 1] 1362 jreq 00109$
|
|
1363 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1455: RTC->CR2 |= (uint8_t)RTC_CR2_WUTE;
|
|
000680 AA 04 [ 1] 1364 or a, #0x04
|
|
000682 C7 51 49 [ 1] 1365 ld 0x5149, a
|
|
1366 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1457: status = SUCCESS;
|
|
000685 A6 01 [ 1] 1367 ld a, #0x01
|
|
000687 20 1C [ 2] 1368 jra 00110$
|
|
000689 1369 00109$:
|
|
1370 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1462: RTC->CR2 &= (uint8_t)~RTC_CR2_WUTE;
|
|
000689 A4 FB [ 1] 1371 and a, #0xfb
|
|
00068B C7 51 49 [ 1] 1372 ld 0x5149, a
|
|
1373 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1465: while (((RTC->ISR1 & RTC_ISR1_WUTWF) == RESET) && ( wutwfcount != WUTWF_TIMEOUT))
|
|
00068E 5F [ 1] 1374 clrw x
|
|
00068F 1375 00102$:
|
|
00068F 72 04 51 4C 08 [ 2] 1376 btjt 0x514c, #2, 00104$
|
|
000694 A3 FF FF [ 2] 1377 cpw x, #0xffff
|
|
000697 27 03 [ 1] 1378 jreq 00104$
|
|
1379 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1467: wutwfcount++;
|
|
000699 5C [ 1] 1380 incw x
|
|
00069A 20 F3 [ 2] 1381 jra 00102$
|
|
00069C 1382 00104$:
|
|
1383 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1471: if ((RTC->ISR1 & RTC_ISR1_WUTWF) == RESET)
|
|
00069C 72 04 51 4C 02 [ 2] 1384 btjt 0x514c, #2, 00106$
|
|
1385 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1473: status = ERROR;
|
|
0006A1 4F [ 1] 1386 clr a
|
|
1387 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1477: status = SUCCESS;
|
|
0006A2 C5 1388 .byte 0xc5
|
|
0006A3 1389 00106$:
|
|
0006A3 A6 01 [ 1] 1390 ld a, #0x01
|
|
0006A5 1391 00110$:
|
|
1392 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1482: RTC->WPR = 0xFF;
|
|
0006A5 35 FF 51 59 [ 1] 1393 mov 0x5159+0, #0xff
|
|
1394 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1485: return (ErrorStatus)status;
|
|
1395 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1486: }
|
|
0006A9 5B 01 [ 2] 1396 addw sp, #1
|
|
0006AB 81 [ 4] 1397 ret
|
|
1398 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1522: void RTC_DayLightSavingConfig(RTC_DayLightSaving_TypeDef RTC_DayLightSaving,
|
|
1399 ; -----------------------------------------
|
|
1400 ; function RTC_DayLightSavingConfig
|
|
1401 ; -----------------------------------------
|
|
0006AC 1402 _RTC_DayLightSavingConfig:
|
|
0006AC 88 [ 1] 1403 push a
|
|
0006AD 97 [ 1] 1404 ld xl, a
|
|
1405 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1530: RTC->WPR = 0xCA;
|
|
0006AE 35 CA 51 59 [ 1] 1406 mov 0x5159+0, #0xca
|
|
1407 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1531: RTC->WPR = 0x53;
|
|
0006B2 35 53 51 59 [ 1] 1408 mov 0x5159+0, #0x53
|
|
1409 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1534: RTC->CR3 &= (uint8_t)~(RTC_CR3_BCK);
|
|
0006B6 C6 51 4A [ 1] 1410 ld a, 0x514a
|
|
0006B9 A4 FB [ 1] 1411 and a, #0xfb
|
|
0006BB C7 51 4A [ 1] 1412 ld 0x514a, a
|
|
1413 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1537: RTC->CR3 |= (uint8_t)((uint8_t)RTC_DayLightSaving | (uint8_t)RTC_StoreOperation);
|
|
0006BE C6 51 4A [ 1] 1414 ld a, 0x514a
|
|
0006C1 6B 01 [ 1] 1415 ld (0x01, sp), a
|
|
0006C3 9F [ 1] 1416 ld a, xl
|
|
0006C4 1A 04 [ 1] 1417 or a, (0x04, sp)
|
|
0006C6 1A 01 [ 1] 1418 or a, (0x01, sp)
|
|
0006C8 C7 51 4A [ 1] 1419 ld 0x514a, a
|
|
1420 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1540: RTC->WPR = 0xFF;
|
|
0006CB 35 FF 51 59 [ 1] 1421 mov 0x5159+0, #0xff
|
|
1422 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1541: }
|
|
0006CF 84 [ 1] 1423 pop a
|
|
0006D0 85 [ 2] 1424 popw x
|
|
0006D1 84 [ 1] 1425 pop a
|
|
0006D2 FC [ 2] 1426 jp (x)
|
|
1427 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1549: RTC_StoreOperation_TypeDef RTC_GetStoreOperation(void)
|
|
1428 ; -----------------------------------------
|
|
1429 ; function RTC_GetStoreOperation
|
|
1430 ; -----------------------------------------
|
|
0006D3 1431 _RTC_GetStoreOperation:
|
|
1432 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1552: return (RTC_StoreOperation_TypeDef)(RTC->CR3 & RTC_CR3_BCK);
|
|
0006D3 C6 51 4A [ 1] 1433 ld a, 0x514a
|
|
0006D6 A4 04 [ 1] 1434 and a, #0x04
|
|
1435 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1553: }
|
|
0006D8 81 [ 4] 1436 ret
|
|
1437 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1587: void RTC_OutputConfig(RTC_Output_TypeDef RTC_Output,
|
|
1438 ; -----------------------------------------
|
|
1439 ; function RTC_OutputConfig
|
|
1440 ; -----------------------------------------
|
|
0006D9 1441 _RTC_OutputConfig:
|
|
0006D9 88 [ 1] 1442 push a
|
|
0006DA 97 [ 1] 1443 ld xl, a
|
|
1444 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1595: RTC->WPR = 0xCA;
|
|
0006DB 35 CA 51 59 [ 1] 1445 mov 0x5159+0, #0xca
|
|
1446 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1596: RTC->WPR = 0x53;
|
|
0006DF 35 53 51 59 [ 1] 1447 mov 0x5159+0, #0x53
|
|
1448 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1599: RTC->CR3 &= (uint8_t)~(RTC_CR3_OSEL | RTC_CR3_POL);
|
|
0006E3 C6 51 4A [ 1] 1449 ld a, 0x514a
|
|
0006E6 A4 8F [ 1] 1450 and a, #0x8f
|
|
0006E8 C7 51 4A [ 1] 1451 ld 0x514a, a
|
|
1452 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1602: RTC->CR3 |= (uint8_t)((uint8_t)RTC_Output | (uint8_t)RTC_OutputPolarity);
|
|
0006EB C6 51 4A [ 1] 1453 ld a, 0x514a
|
|
0006EE 6B 01 [ 1] 1454 ld (0x01, sp), a
|
|
0006F0 9F [ 1] 1455 ld a, xl
|
|
0006F1 1A 04 [ 1] 1456 or a, (0x04, sp)
|
|
0006F3 1A 01 [ 1] 1457 or a, (0x01, sp)
|
|
0006F5 C7 51 4A [ 1] 1458 ld 0x514a, a
|
|
1459 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1605: RTC->WPR = 0xFF;
|
|
0006F8 35 FF 51 59 [ 1] 1460 mov 0x5159+0, #0xff
|
|
1461 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1606: }
|
|
0006FC 84 [ 1] 1462 pop a
|
|
0006FD 85 [ 2] 1463 popw x
|
|
0006FE 84 [ 1] 1464 pop a
|
|
0006FF FC [ 2] 1465 jp (x)
|
|
1466 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1639: ErrorStatus RTC_SynchroShiftConfig(RTC_ShiftAdd1S_TypeDef RTC_ShiftAdd1S,
|
|
1467 ; -----------------------------------------
|
|
1468 ; function RTC_SynchroShiftConfig
|
|
1469 ; -----------------------------------------
|
|
000700 1470 _RTC_SynchroShiftConfig:
|
|
000700 88 [ 1] 1471 push a
|
|
000701 6B 01 [ 1] 1472 ld (0x01, sp), a
|
|
000703 51 [ 1] 1473 exgw x, y
|
|
1474 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1651: RTC->WPR = 0xCA;
|
|
000704 35 CA 51 59 [ 1] 1475 mov 0x5159+0, #0xca
|
|
1476 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1652: RTC->WPR = 0x53;
|
|
000708 35 53 51 59 [ 1] 1477 mov 0x5159+0, #0x53
|
|
1478 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1655: if ((RTC->ISR1 & RTC_ISR1_SHPF) != RESET)
|
|
00070C 72 07 51 4C 0E [ 2] 1479 btjf 0x514c, #3, 00106$
|
|
1480 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1658: while (((RTC->ISR1 & RTC_ISR1_SHPF) != RESET) && (shpfcount != SHPF_TIMEOUT))
|
|
000711 5F [ 1] 1481 clrw x
|
|
000712 1482 00102$:
|
|
000712 72 07 51 4C 08 [ 2] 1483 btjf 0x514c, #3, 00106$
|
|
000717 A3 FF FF [ 2] 1484 cpw x, #0xffff
|
|
00071A 27 03 [ 1] 1485 jreq 00106$
|
|
1486 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1660: shpfcount++;
|
|
00071C 5C [ 1] 1487 incw x
|
|
00071D 20 F3 [ 2] 1488 jra 00102$
|
|
00071F 1489 00106$:
|
|
1490 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1665: if ((RTC->ISR1 & RTC_ISR1_SHPF) == RESET)
|
|
00071F 72 06 51 4C 0F [ 2] 1491 btjt 0x514c, #3, 00108$
|
|
1492 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1668: shiftrhreg = (uint8_t)((uint8_t)(RTC_ShiftSubFS >> 8) | (uint8_t)(RTC_ShiftAdd1S));
|
|
000724 90 9E [ 1] 1493 ld a, yh
|
|
000726 1A 01 [ 1] 1494 or a, (0x01, sp)
|
|
1495 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1669: RTC->SHIFTRH = (uint8_t)(shiftrhreg);
|
|
000728 C7 51 5A [ 1] 1496 ld 0x515a, a
|
|
1497 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1670: RTC->SHIFTRL = (uint8_t)(RTC_ShiftSubFS);
|
|
00072B 90 9F [ 1] 1498 ld a, yl
|
|
00072D C7 51 5B [ 1] 1499 ld 0x515b, a
|
|
1500 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1672: status = SUCCESS;
|
|
000730 A6 01 [ 1] 1501 ld a, #0x01
|
|
1502 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1676: status = ERROR;
|
|
000732 21 1503 .byte 0x21
|
|
000733 1504 00108$:
|
|
000733 4F [ 1] 1505 clr a
|
|
000734 1506 00109$:
|
|
1507 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1680: RTC->WPR = 0xFF;
|
|
000734 35 FF 51 59 [ 1] 1508 mov 0x5159+0, #0xff
|
|
1509 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1682: return (ErrorStatus)(status);
|
|
1510 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1683: }
|
|
000738 5B 01 [ 2] 1511 addw sp, #1
|
|
00073A 81 [ 4] 1512 ret
|
|
1513 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1718: ErrorStatus RTC_SmoothCalibConfig(RTC_SmoothCalibPeriod_TypeDef RTC_SmoothCalibPeriod,
|
|
1514 ; -----------------------------------------
|
|
1515 ; function RTC_SmoothCalibConfig
|
|
1516 ; -----------------------------------------
|
|
00073B 1517 _RTC_SmoothCalibConfig:
|
|
00073B 88 [ 1] 1518 push a
|
|
00073C 90 97 [ 1] 1519 ld yl, a
|
|
1520 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1731: RTC->WPR = 0xCA;
|
|
00073E 35 CA 51 59 [ 1] 1521 mov 0x5159+0, #0xca
|
|
1522 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1732: RTC->WPR = 0x53;
|
|
000742 35 53 51 59 [ 1] 1523 mov 0x5159+0, #0x53
|
|
1524 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1735: if ((RTC->ISR1 & RTC_ISR1_RECALPF) != RESET)
|
|
000746 72 03 51 4C 0E [ 2] 1525 btjf 0x514c, #1, 00106$
|
|
1526 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1738: while (((RTC->ISR1 & RTC_ISR1_RECALPF) != RESET) && (recalpfcount != RECALPF_TIMEOUT))
|
|
00074B 5F [ 1] 1527 clrw x
|
|
00074C 1528 00102$:
|
|
00074C 72 03 51 4C 08 [ 2] 1529 btjf 0x514c, #1, 00106$
|
|
000751 A3 FF FF [ 2] 1530 cpw x, #0xffff
|
|
000754 27 03 [ 1] 1531 jreq 00106$
|
|
1532 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1740: recalpfcount++;
|
|
000756 5C [ 1] 1533 incw x
|
|
000757 20 F3 [ 2] 1534 jra 00102$
|
|
000759 1535 00106$:
|
|
1536 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1746: if ((RTC->ISR1 & RTC_ISR1_RECALPF) == RESET)
|
|
000759 72 02 51 4C 15 [ 2] 1537 btjt 0x514c, #1, 00108$
|
|
1538 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1749: RTC->CALRH = (uint8_t)((uint8_t)((uint8_t)RTC_SmoothCalibPeriod | \
|
|
00075E 90 9F [ 1] 1539 ld a, yl
|
|
000760 1A 04 [ 1] 1540 or a, (0x04, sp)
|
|
000762 6B 01 [ 1] 1541 ld (0x01, sp), a
|
|
000764 7B 05 [ 1] 1542 ld a, (0x05, sp)
|
|
000766 1A 01 [ 1] 1543 or a, (0x01, sp)
|
|
000768 C7 51 6A [ 1] 1544 ld 0x516a, a
|
|
1545 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1752: RTC->CALRL = (uint8_t)(RTC_SmouthCalibMinusPulsesValue);
|
|
00076B 7B 06 [ 1] 1546 ld a, (0x06, sp)
|
|
00076D C7 51 6B [ 1] 1547 ld 0x516b, a
|
|
1548 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1754: status = SUCCESS;
|
|
000770 A6 01 [ 1] 1549 ld a, #0x01
|
|
1550 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1758: status = ERROR;
|
|
000772 21 1551 .byte 0x21
|
|
000773 1552 00108$:
|
|
000773 4F [ 1] 1553 clr a
|
|
000774 1554 00109$:
|
|
1555 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1762: RTC->WPR = 0xFF;
|
|
000774 35 FF 51 59 [ 1] 1556 mov 0x5159+0, #0xff
|
|
1557 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1764: return (ErrorStatus)(status);
|
|
1558 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1765: }
|
|
000778 1E 02 [ 2] 1559 ldw x, (2, sp)
|
|
00077A 5B 06 [ 2] 1560 addw sp, #6
|
|
00077C FC [ 2] 1561 jp (x)
|
|
1562 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1790: void RTC_CalibOutputConfig(RTC_CalibOutput_TypeDef RTC_CalibOutput)
|
|
1563 ; -----------------------------------------
|
|
1564 ; function RTC_CalibOutputConfig
|
|
1565 ; -----------------------------------------
|
|
00077D 1566 _RTC_CalibOutputConfig:
|
|
00077D 88 [ 1] 1567 push a
|
|
00077E 6B 01 [ 1] 1568 ld (0x01, sp), a
|
|
1569 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1796: RTC->WPR = 0xCA;
|
|
000780 35 CA 51 59 [ 1] 1570 mov 0x5159+0, #0xca
|
|
1571 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1797: RTC->WPR = 0x53;
|
|
000784 35 53 51 59 [ 1] 1572 mov 0x5159+0, #0x53
|
|
1573 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1802: RTC->CR3 |= (uint8_t)RTC_CR3_COSEL;
|
|
000788 C6 51 4A [ 1] 1574 ld a, 0x514a
|
|
1575 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1799: if (RTC_CalibOutput != RTC_CalibOutput_512Hz)
|
|
00078B 0D 01 [ 1] 1576 tnz (0x01, sp)
|
|
00078D 27 07 [ 1] 1577 jreq 00102$
|
|
1578 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1802: RTC->CR3 |= (uint8_t)RTC_CR3_COSEL;
|
|
00078F AA 08 [ 1] 1579 or a, #0x08
|
|
000791 C7 51 4A [ 1] 1580 ld 0x514a, a
|
|
000794 20 05 [ 2] 1581 jra 00103$
|
|
000796 1582 00102$:
|
|
1583 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1807: RTC->CR3 &= (uint8_t)~RTC_CR3_COSEL;
|
|
000796 A4 F7 [ 1] 1584 and a, #0xf7
|
|
000798 C7 51 4A [ 1] 1585 ld 0x514a, a
|
|
00079B 1586 00103$:
|
|
1587 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1811: RTC->WPR = 0xFF;
|
|
00079B 35 FF 51 59 [ 1] 1588 mov 0x5159+0, #0xff
|
|
1589 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1812: }
|
|
00079F 84 [ 1] 1590 pop a
|
|
0007A0 81 [ 4] 1591 ret
|
|
1592 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1820: void RTC_CalibOutputCmd(FunctionalState NewState)
|
|
1593 ; -----------------------------------------
|
|
1594 ; function RTC_CalibOutputCmd
|
|
1595 ; -----------------------------------------
|
|
0007A1 1596 _RTC_CalibOutputCmd:
|
|
0007A1 88 [ 1] 1597 push a
|
|
0007A2 6B 01 [ 1] 1598 ld (0x01, sp), a
|
|
1599 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1826: RTC->WPR = 0xCA;
|
|
0007A4 35 CA 51 59 [ 1] 1600 mov 0x5159+0, #0xca
|
|
1601 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1827: RTC->WPR = 0x53;
|
|
0007A8 35 53 51 59 [ 1] 1602 mov 0x5159+0, #0x53
|
|
1603 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1832: RTC->CR3 |= (uint8_t)RTC_CR3_COE;
|
|
0007AC C6 51 4A [ 1] 1604 ld a, 0x514a
|
|
1605 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1829: if (NewState != DISABLE)
|
|
0007AF 0D 01 [ 1] 1606 tnz (0x01, sp)
|
|
0007B1 27 07 [ 1] 1607 jreq 00102$
|
|
1608 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1832: RTC->CR3 |= (uint8_t)RTC_CR3_COE;
|
|
0007B3 AA 80 [ 1] 1609 or a, #0x80
|
|
0007B5 C7 51 4A [ 1] 1610 ld 0x514a, a
|
|
0007B8 20 05 [ 2] 1611 jra 00103$
|
|
0007BA 1612 00102$:
|
|
1613 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1837: RTC->CR3 &= (uint8_t)~RTC_CR3_COE;
|
|
0007BA A4 7F [ 1] 1614 and a, #0x7f
|
|
0007BC C7 51 4A [ 1] 1615 ld 0x514a, a
|
|
0007BF 1616 00103$:
|
|
1617 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1841: RTC->WPR = 0xFF;
|
|
0007BF 35 FF 51 59 [ 1] 1618 mov 0x5159+0, #0xff
|
|
1619 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1842: }
|
|
0007C3 84 [ 1] 1620 pop a
|
|
0007C4 81 [ 4] 1621 ret
|
|
1622 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1871: void RTC_TamperLevelConfig(RTC_Tamper_TypeDef RTC_Tamper,
|
|
1623 ; -----------------------------------------
|
|
1624 ; function RTC_TamperLevelConfig
|
|
1625 ; -----------------------------------------
|
|
0007C5 1626 _RTC_TamperLevelConfig:
|
|
0007C5 88 [ 1] 1627 push a
|
|
0007C6 97 [ 1] 1628 ld xl, a
|
|
1629 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1879: RTC->WPR = 0xCA;
|
|
0007C7 35 CA 51 59 [ 1] 1630 mov 0x5159+0, #0xca
|
|
1631 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1880: RTC->WPR = 0x53;
|
|
0007CB 35 53 51 59 [ 1] 1632 mov 0x5159+0, #0x53
|
|
1633 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1885: RTC->TCR1 |= (uint8_t)(RTC_Tamper << 1);
|
|
0007CF C6 51 6C [ 1] 1634 ld a, 0x516c
|
|
0007D2 6B 01 [ 1] 1635 ld (0x01, sp), a
|
|
0007D4 9F [ 1] 1636 ld a, xl
|
|
0007D5 48 [ 1] 1637 sll a
|
|
1638 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1882: if (RTC_TamperLevel != RTC_TamperLevel_Low)
|
|
0007D6 0D 04 [ 1] 1639 tnz (0x04, sp)
|
|
0007D8 27 07 [ 1] 1640 jreq 00102$
|
|
1641 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1885: RTC->TCR1 |= (uint8_t)(RTC_Tamper << 1);
|
|
0007DA 1A 01 [ 1] 1642 or a, (0x01, sp)
|
|
0007DC C7 51 6C [ 1] 1643 ld 0x516c, a
|
|
0007DF 20 06 [ 2] 1644 jra 00103$
|
|
0007E1 1645 00102$:
|
|
1646 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1890: RTC->TCR1 &= (uint8_t)~(uint8_t)(RTC_Tamper << 1);
|
|
0007E1 43 [ 1] 1647 cpl a
|
|
0007E2 14 01 [ 1] 1648 and a, (0x01, sp)
|
|
0007E4 C7 51 6C [ 1] 1649 ld 0x516c, a
|
|
0007E7 1650 00103$:
|
|
1651 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1894: RTC->WPR = 0xFF;
|
|
0007E7 35 FF 51 59 [ 1] 1652 mov 0x5159+0, #0xff
|
|
1653 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1895: }
|
|
0007EB 84 [ 1] 1654 pop a
|
|
0007EC 85 [ 2] 1655 popw x
|
|
0007ED 84 [ 1] 1656 pop a
|
|
0007EE FC [ 2] 1657 jp (x)
|
|
1658 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1903: void RTC_TamperFilterConfig(RTC_TamperFilter_TypeDef RTC_TamperFilter)
|
|
1659 ; -----------------------------------------
|
|
1660 ; function RTC_TamperFilterConfig
|
|
1661 ; -----------------------------------------
|
|
0007EF 1662 _RTC_TamperFilterConfig:
|
|
0007EF 88 [ 1] 1663 push a
|
|
0007F0 6B 01 [ 1] 1664 ld (0x01, sp), a
|
|
1665 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1910: RTC->WPR = 0xCA;
|
|
0007F2 35 CA 51 59 [ 1] 1666 mov 0x5159+0, #0xca
|
|
1667 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1911: RTC->WPR = 0x53;
|
|
0007F6 35 53 51 59 [ 1] 1668 mov 0x5159+0, #0x53
|
|
1669 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1914: RTC->TCR2 &= (uint8_t)~(RTC_TCR2_TAMPFLT);
|
|
0007FA C6 51 6D [ 1] 1670 ld a, 0x516d
|
|
0007FD A4 E7 [ 1] 1671 and a, #0xe7
|
|
0007FF C7 51 6D [ 1] 1672 ld 0x516d, a
|
|
1673 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1917: RTC->TCR2 |= (uint8_t)RTC_TamperFilter;
|
|
000802 C6 51 6D [ 1] 1674 ld a, 0x516d
|
|
000805 1A 01 [ 1] 1675 or a, (0x01, sp)
|
|
000807 C7 51 6D [ 1] 1676 ld 0x516d, a
|
|
1677 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1920: RTC->WPR = 0xFF;
|
|
00080A 35 FF 51 59 [ 1] 1678 mov 0x5159+0, #0xff
|
|
1679 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1922: }
|
|
00080E 84 [ 1] 1680 pop a
|
|
00080F 81 [ 4] 1681 ret
|
|
1682 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1931: void RTC_TamperSamplingFreqConfig(RTC_TamperSamplingFreq_TypeDef RTC_TamperSamplingFreq)
|
|
1683 ; -----------------------------------------
|
|
1684 ; function RTC_TamperSamplingFreqConfig
|
|
1685 ; -----------------------------------------
|
|
000810 1686 _RTC_TamperSamplingFreqConfig:
|
|
000810 88 [ 1] 1687 push a
|
|
000811 6B 01 [ 1] 1688 ld (0x01, sp), a
|
|
1689 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1937: RTC->WPR = 0xCA;
|
|
000813 35 CA 51 59 [ 1] 1690 mov 0x5159+0, #0xca
|
|
1691 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1938: RTC->WPR = 0x53;
|
|
000817 35 53 51 59 [ 1] 1692 mov 0x5159+0, #0x53
|
|
1693 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1941: RTC->TCR2 &= (uint8_t)~(RTC_TCR2_TAMPFREQ);
|
|
00081B C6 51 6D [ 1] 1694 ld a, 0x516d
|
|
00081E A4 F8 [ 1] 1695 and a, #0xf8
|
|
000820 C7 51 6D [ 1] 1696 ld 0x516d, a
|
|
1697 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1944: RTC->TCR2 |= (uint8_t)RTC_TamperSamplingFreq;
|
|
000823 C6 51 6D [ 1] 1698 ld a, 0x516d
|
|
000826 1A 01 [ 1] 1699 or a, (0x01, sp)
|
|
000828 C7 51 6D [ 1] 1700 ld 0x516d, a
|
|
1701 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1947: RTC->WPR = 0xFF;
|
|
00082B 35 FF 51 59 [ 1] 1702 mov 0x5159+0, #0xff
|
|
1703 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1948: }
|
|
00082F 84 [ 1] 1704 pop a
|
|
000830 81 [ 4] 1705 ret
|
|
1706 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1958: void RTC_TamperPinsPrechargeDuration(RTC_TamperPrechargeDuration_TypeDef RTC_TamperPrechargeDuration)
|
|
1707 ; -----------------------------------------
|
|
1708 ; function RTC_TamperPinsPrechargeDuration
|
|
1709 ; -----------------------------------------
|
|
000831 1710 _RTC_TamperPinsPrechargeDuration:
|
|
000831 88 [ 1] 1711 push a
|
|
000832 6B 01 [ 1] 1712 ld (0x01, sp), a
|
|
1713 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1964: RTC->WPR = 0xCA;
|
|
000834 35 CA 51 59 [ 1] 1714 mov 0x5159+0, #0xca
|
|
1715 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1965: RTC->WPR = 0x53;
|
|
000838 35 53 51 59 [ 1] 1716 mov 0x5159+0, #0x53
|
|
1717 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1968: RTC->TCR2 &= (uint8_t)~(RTC_TCR2_TAMPPUDIS | RTC_TCR2_TAMPPRCH);
|
|
00083C C6 51 6D [ 1] 1718 ld a, 0x516d
|
|
00083F A4 1F [ 1] 1719 and a, #0x1f
|
|
000841 C7 51 6D [ 1] 1720 ld 0x516d, a
|
|
1721 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1971: RTC->TCR2 |= (uint8_t)RTC_TamperPrechargeDuration;
|
|
000844 C6 51 6D [ 1] 1722 ld a, 0x516d
|
|
000847 1A 01 [ 1] 1723 or a, (0x01, sp)
|
|
000849 C7 51 6D [ 1] 1724 ld 0x516d, a
|
|
1725 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1974: RTC->WPR = 0xFF;
|
|
00084C 35 FF 51 59 [ 1] 1726 mov 0x5159+0, #0xff
|
|
1727 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1975: }
|
|
000850 84 [ 1] 1728 pop a
|
|
000851 81 [ 4] 1729 ret
|
|
1730 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1987: void RTC_TamperCmd(RTC_Tamper_TypeDef RTC_Tamper,
|
|
1731 ; -----------------------------------------
|
|
1732 ; function RTC_TamperCmd
|
|
1733 ; -----------------------------------------
|
|
000852 1734 _RTC_TamperCmd:
|
|
000852 88 [ 1] 1735 push a
|
|
1736 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1996: RTC->WPR = 0xCA;
|
|
000853 35 CA 51 59 [ 1] 1737 mov 0x5159+0, #0xca
|
|
1738 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1997: RTC->WPR = 0x53;
|
|
000857 35 53 51 59 [ 1] 1739 mov 0x5159+0, #0x53
|
|
1740 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2003: RTC->TCR1 |= (uint8_t)RTC_Tamper;
|
|
00085B AE 51 6C [ 2] 1741 ldw x, #0x516c
|
|
00085E 88 [ 1] 1742 push a
|
|
00085F F6 [ 1] 1743 ld a, (x)
|
|
000860 6B 02 [ 1] 1744 ld (0x02, sp), a
|
|
000862 84 [ 1] 1745 pop a
|
|
1746 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2000: if (NewState != DISABLE)
|
|
000863 0D 04 [ 1] 1747 tnz (0x04, sp)
|
|
000865 27 07 [ 1] 1748 jreq 00102$
|
|
1749 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2003: RTC->TCR1 |= (uint8_t)RTC_Tamper;
|
|
000867 1A 01 [ 1] 1750 or a, (0x01, sp)
|
|
000869 C7 51 6C [ 1] 1751 ld 0x516c, a
|
|
00086C 20 06 [ 2] 1752 jra 00103$
|
|
00086E 1753 00102$:
|
|
1754 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2008: RTC->TCR1 &= (uint8_t)~RTC_Tamper;
|
|
00086E 43 [ 1] 1755 cpl a
|
|
00086F 14 01 [ 1] 1756 and a, (0x01, sp)
|
|
000871 C7 51 6C [ 1] 1757 ld 0x516c, a
|
|
000874 1758 00103$:
|
|
1759 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2013: RTC->WPR = 0xFF;
|
|
000874 35 FF 51 59 [ 1] 1760 mov 0x5159+0, #0xff
|
|
1761 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2014: }
|
|
000878 84 [ 1] 1762 pop a
|
|
000879 85 [ 2] 1763 popw x
|
|
00087A 84 [ 1] 1764 pop a
|
|
00087B FC [ 2] 1765 jp (x)
|
|
1766 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2058: void RTC_ITConfig(RTC_IT_TypeDef RTC_IT, FunctionalState NewState)
|
|
1767 ; -----------------------------------------
|
|
1768 ; function RTC_ITConfig
|
|
1769 ; -----------------------------------------
|
|
00087C 1770 _RTC_ITConfig:
|
|
00087C 52 03 [ 2] 1771 sub sp, #3
|
|
00087E 6B 03 [ 1] 1772 ld (0x03, sp), a
|
|
1773 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2065: RTC->WPR = 0xCA;
|
|
000880 35 CA 51 59 [ 1] 1774 mov 0x5159+0, #0xca
|
|
1775 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2066: RTC->WPR = 0x53;
|
|
000884 35 53 51 59 [ 1] 1776 mov 0x5159+0, #0x53
|
|
1777 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2071: RTC->CR2 |= (uint8_t)((uint16_t)RTC_IT & (uint16_t)0x00F0);
|
|
000888 C6 51 49 [ 1] 1778 ld a, 0x5149
|
|
00088B 6B 02 [ 1] 1779 ld (0x02, sp), a
|
|
00088D 9F [ 1] 1780 ld a, xl
|
|
00088E A4 F0 [ 1] 1781 and a, #0xf0
|
|
1782 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2072: RTC->TCR1 |= (uint8_t)((uint16_t)RTC_IT & RTC_TCR1_TAMPIE);
|
|
000890 88 [ 1] 1783 push a
|
|
000891 9F [ 1] 1784 ld a, xl
|
|
000892 A4 01 [ 1] 1785 and a, #0x01
|
|
000894 6B 02 [ 1] 1786 ld (0x02, sp), a
|
|
000896 84 [ 1] 1787 pop a
|
|
1788 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2068: if (NewState != DISABLE)
|
|
000897 0D 03 [ 1] 1789 tnz (0x03, sp)
|
|
000899 27 0F [ 1] 1790 jreq 00102$
|
|
1791 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2071: RTC->CR2 |= (uint8_t)((uint16_t)RTC_IT & (uint16_t)0x00F0);
|
|
00089B 1A 02 [ 1] 1792 or a, (0x02, sp)
|
|
00089D C7 51 49 [ 1] 1793 ld 0x5149, a
|
|
1794 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2072: RTC->TCR1 |= (uint8_t)((uint16_t)RTC_IT & RTC_TCR1_TAMPIE);
|
|
0008A0 C6 51 6C [ 1] 1795 ld a, 0x516c
|
|
0008A3 1A 01 [ 1] 1796 or a, (0x01, sp)
|
|
0008A5 C7 51 6C [ 1] 1797 ld 0x516c, a
|
|
0008A8 20 13 [ 2] 1798 jra 00103$
|
|
0008AA 1799 00102$:
|
|
1800 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2077: RTC->CR2 &= (uint8_t)~(uint8_t)((uint16_t)RTC_IT & (uint16_t)0x00F0);
|
|
0008AA 43 [ 1] 1801 cpl a
|
|
0008AB 14 02 [ 1] 1802 and a, (0x02, sp)
|
|
0008AD C7 51 49 [ 1] 1803 ld 0x5149, a
|
|
1804 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2078: RTC->TCR1 &= (uint8_t)~(uint8_t)((uint16_t)RTC_IT & (uint16_t)RTC_TCR1_TAMPIE);
|
|
0008B0 C6 51 6C [ 1] 1805 ld a, 0x516c
|
|
0008B3 6B 02 [ 1] 1806 ld (0x02, sp), a
|
|
0008B5 7B 01 [ 1] 1807 ld a, (0x01, sp)
|
|
0008B7 43 [ 1] 1808 cpl a
|
|
0008B8 14 02 [ 1] 1809 and a, (0x02, sp)
|
|
0008BA C7 51 6C [ 1] 1810 ld 0x516c, a
|
|
0008BD 1811 00103$:
|
|
1812 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2082: RTC->WPR = 0xFF;
|
|
0008BD 35 FF 51 59 [ 1] 1813 mov 0x5159+0, #0xff
|
|
1814 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2083: }
|
|
0008C1 5B 03 [ 2] 1815 addw sp, #3
|
|
0008C3 81 [ 4] 1816 ret
|
|
1817 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2090: FlagStatus RTC_GetFlagStatus(RTC_Flag_TypeDef RTC_FLAG)
|
|
1818 ; -----------------------------------------
|
|
1819 ; function RTC_GetFlagStatus
|
|
1820 ; -----------------------------------------
|
|
0008C4 1821 _RTC_GetFlagStatus:
|
|
0008C4 52 06 [ 2] 1822 sub sp, #6
|
|
1823 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2100: tmpreg2 = (uint16_t)((uint16_t)RTC->ISR1 << 8);
|
|
0008C6 C6 51 4C [ 1] 1824 ld a, 0x514c
|
|
0008C9 90 97 [ 1] 1825 ld yl, a
|
|
0008CB 0F 02 [ 1] 1826 clr (0x02, sp)
|
|
1827 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2101: tmpreg1 = (uint16_t)((uint16_t)((uint16_t)(RTC->ISR2)) | tmpreg2);
|
|
0008CD C6 51 4D [ 1] 1828 ld a, 0x514d
|
|
0008D0 0F 03 [ 1] 1829 clr (0x03, sp)
|
|
0008D2 6B 06 [ 1] 1830 ld (0x06, sp), a
|
|
0008D4 61 [ 1] 1831 exg a, yl
|
|
0008D5 6B 05 [ 1] 1832 ld (0x05, sp), a
|
|
0008D7 61 [ 1] 1833 exg a, yl
|
|
1834 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2104: if ((tmpreg1 & (uint16_t)RTC_FLAG) != RESET)
|
|
0008D8 9F [ 1] 1835 ld a, xl
|
|
0008D9 14 06 [ 1] 1836 and a, (0x06, sp)
|
|
0008DB 02 [ 1] 1837 rlwa x
|
|
0008DC 14 05 [ 1] 1838 and a, (0x05, sp)
|
|
0008DE 95 [ 1] 1839 ld xh, a
|
|
0008DF 5D [ 2] 1840 tnzw x
|
|
0008E0 27 03 [ 1] 1841 jreq 00102$
|
|
1842 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2106: flagstatus = SET;
|
|
0008E2 A6 01 [ 1] 1843 ld a, #0x01
|
|
1844 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2110: flagstatus = RESET;
|
|
0008E4 21 1845 .byte 0x21
|
|
0008E5 1846 00102$:
|
|
0008E5 4F [ 1] 1847 clr a
|
|
0008E6 1848 00103$:
|
|
1849 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2112: return (FlagStatus)flagstatus;
|
|
1850 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2113: }
|
|
0008E6 5B 06 [ 2] 1851 addw sp, #6
|
|
0008E8 81 [ 4] 1852 ret
|
|
1853 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2122: void RTC_ClearFlag(RTC_Flag_TypeDef RTC_FLAG)
|
|
1854 ; -----------------------------------------
|
|
1855 ; function RTC_ClearFlag
|
|
1856 ; -----------------------------------------
|
|
0008E9 1857 _RTC_ClearFlag:
|
|
1858 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2128: RTC->ISR2 = (uint8_t)~((uint8_t)RTC_FLAG) ;
|
|
0008E9 9F [ 1] 1859 ld a, xl
|
|
0008EA 43 [ 1] 1860 cpl a
|
|
0008EB C7 51 4D [ 1] 1861 ld 0x514d, a
|
|
1862 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2129: RTC->ISR1 = (uint8_t)(((uint8_t)~(uint8_t)((uint16_t)RTC_FLAG >> (uint8_t)8)) & ((uint8_t)~(uint8_t)(RTC_ISR1_INIT)));
|
|
0008EE 9E [ 1] 1863 ld a, xh
|
|
0008EF 43 [ 1] 1864 cpl a
|
|
0008F0 A4 7F [ 1] 1865 and a, #0x7f
|
|
0008F2 C7 51 4C [ 1] 1866 ld 0x514c, a
|
|
1867 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2130: }
|
|
0008F5 81 [ 4] 1868 ret
|
|
1869 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2138: ITStatus RTC_GetITStatus(RTC_IT_TypeDef RTC_IT)
|
|
1870 ; -----------------------------------------
|
|
1871 ; function RTC_GetITStatus
|
|
1872 ; -----------------------------------------
|
|
0008F6 1873 _RTC_GetITStatus:
|
|
0008F6 88 [ 1] 1874 push a
|
|
1875 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2147: enablestatus = (uint8_t)(RTC->CR2 & (uint16_t)RTC_IT);
|
|
0008F7 C6 51 49 [ 1] 1876 ld a, 0x5149
|
|
0008FA 6B 01 [ 1] 1877 ld (0x01, sp), a
|
|
0008FC 9F [ 1] 1878 ld a, xl
|
|
0008FD 14 01 [ 1] 1879 and a, (0x01, sp)
|
|
0008FF 6B 01 [ 1] 1880 ld (0x01, sp), a
|
|
1881 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2150: tmpreg = (uint8_t)(RTC->ISR2 & (uint8_t)((uint16_t)RTC_IT >> 4));
|
|
000901 C6 51 4D [ 1] 1882 ld a, 0x514d
|
|
000904 54 [ 2] 1883 srlw x
|
|
000905 54 [ 2] 1884 srlw x
|
|
000906 54 [ 2] 1885 srlw x
|
|
000907 54 [ 2] 1886 srlw x
|
|
000908 89 [ 2] 1887 pushw x
|
|
000909 14 02 [ 1] 1888 and a, (2, sp)
|
|
00090B 85 [ 2] 1889 popw x
|
|
1890 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2153: if ((enablestatus != (uint8_t)RESET) && (tmpreg != (uint8_t)RESET))
|
|
00090C 0D 01 [ 1] 1891 tnz (0x01, sp)
|
|
00090E 27 06 [ 1] 1892 jreq 00102$
|
|
000910 4D [ 1] 1893 tnz a
|
|
000911 27 03 [ 1] 1894 jreq 00102$
|
|
1895 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2155: itstatus = SET;
|
|
000913 A6 01 [ 1] 1896 ld a, #0x01
|
|
1897 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2159: itstatus = RESET;
|
|
000915 21 1898 .byte 0x21
|
|
000916 1899 00102$:
|
|
000916 4F [ 1] 1900 clr a
|
|
000917 1901 00103$:
|
|
1902 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2162: return (ITStatus)itstatus;
|
|
1903 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2163: }
|
|
000917 5B 01 [ 2] 1904 addw sp, #1
|
|
000919 81 [ 4] 1905 ret
|
|
1906 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2172: void RTC_ClearITPendingBit(RTC_IT_TypeDef RTC_IT)
|
|
1907 ; -----------------------------------------
|
|
1908 ; function RTC_ClearITPendingBit
|
|
1909 ; -----------------------------------------
|
|
00091A 1910 _RTC_ClearITPendingBit:
|
|
1911 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2178: RTC->ISR2 = (uint8_t)~(uint8_t)((uint16_t)RTC_IT >> 4);
|
|
00091A A6 10 [ 1] 1912 ld a, #0x10
|
|
00091C 62 [ 2] 1913 div x, a
|
|
00091D 9F [ 1] 1914 ld a, xl
|
|
00091E 43 [ 1] 1915 cpl a
|
|
00091F C7 51 4D [ 1] 1916 ld 0x514d, a
|
|
1917 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2179: }
|
|
000922 81 [ 4] 1918 ret
|
|
1919 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2202: static uint8_t ByteToBcd2(uint8_t Value)
|
|
1920 ; -----------------------------------------
|
|
1921 ; function ByteToBcd2
|
|
1922 ; -----------------------------------------
|
|
000923 1923 _ByteToBcd2:
|
|
1924 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2206: while (Value >= 10)
|
|
000923 5F [ 1] 1925 clrw x
|
|
000924 1926 00101$:
|
|
000924 A1 0A [ 1] 1927 cp a, #0x0a
|
|
000926 25 05 [ 1] 1928 jrc 00103$
|
|
1929 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2208: bcdhigh++;
|
|
000928 5C [ 1] 1930 incw x
|
|
1931 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2209: Value -= 10;
|
|
000929 A0 0A [ 1] 1932 sub a, #0x0a
|
|
00092B 20 F7 [ 2] 1933 jra 00101$
|
|
00092D 1934 00103$:
|
|
1935 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2212: return (uint8_t)((uint8_t)(bcdhigh << 4) | Value);
|
|
00092D 58 [ 2] 1936 sllw x
|
|
00092E 58 [ 2] 1937 sllw x
|
|
00092F 58 [ 2] 1938 sllw x
|
|
000930 58 [ 2] 1939 sllw x
|
|
000931 89 [ 2] 1940 pushw x
|
|
000932 1A 02 [ 1] 1941 or a, (2, sp)
|
|
000934 85 [ 2] 1942 popw x
|
|
1943 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2213: }
|
|
000935 81 [ 4] 1944 ret
|
|
1945 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2220: static uint8_t Bcd2ToByte(uint8_t Value)
|
|
1946 ; -----------------------------------------
|
|
1947 ; function Bcd2ToByte
|
|
1948 ; -----------------------------------------
|
|
000936 1949 _Bcd2ToByte:
|
|
1950 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2224: tmp = (uint8_t)((uint8_t)((uint8_t)(Value & (uint8_t)0xF0) >> 4) * (uint8_t)10);
|
|
000936 90 97 [ 1] 1951 ld yl, a
|
|
000938 A4 F0 [ 1] 1952 and a, #0xf0
|
|
00093A 4E [ 1] 1953 swap a
|
|
00093B A4 0F [ 1] 1954 and a, #0x0f
|
|
00093D 97 [ 1] 1955 ld xl, a
|
|
00093E A6 0A [ 1] 1956 ld a, #0x0a
|
|
000940 42 [ 4] 1957 mul x, a
|
|
1958 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2226: return (uint8_t)(tmp + (Value & (uint8_t)0x0F));
|
|
000941 90 9F [ 1] 1959 ld a, yl
|
|
000943 A4 0F [ 1] 1960 and a, #0x0f
|
|
000945 89 [ 2] 1961 pushw x
|
|
000946 1B 02 [ 1] 1962 add a, (2, sp)
|
|
000948 85 [ 2] 1963 popw x
|
|
1964 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2227: }
|
|
000949 81 [ 4] 1965 ret
|
|
1966 .area CODE
|
|
1967 .area CONST
|
|
1968 .area INITIALIZER
|
|
1969 .area CABS (ABS)
|