1970 lines
142 KiB
ReStructuredText
1970 lines
142 KiB
ReStructuredText
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 ; -----------------------------------------
|
|
008912 93 _RTC_DeInit:
|
|
94 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 239: RTC->WPR = 0xCA;
|
|
008912 35 CA 51 59 [ 1] 95 mov 0x5159+0, #0xca
|
|
96 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 240: RTC->WPR = 0x53;
|
|
008916 35 53 51 59 [ 1] 97 mov 0x5159+0, #0x53
|
|
98 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 243: if (RTC_EnterInitMode() == ERROR)
|
|
00891A CD 8A 47 [ 4] 99 call _RTC_EnterInitMode
|
|
00891D 4D [ 1] 100 tnz a
|
|
00891E 26 06 [ 1] 101 jrne 00121$
|
|
102 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 245: status = ERROR;
|
|
008920 4F [ 1] 103 clr a
|
|
104 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 247: RTC->WPR = 0xFF;
|
|
008921 35 FF 51 59 [ 1] 105 mov 0x5159+0, #0xff
|
|
008925 81 [ 4] 106 ret
|
|
008926 107 00121$:
|
|
108 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 252: RTC->TR1 = RTC_TR1_RESET_VALUE;
|
|
008926 35 00 51 40 [ 1] 109 mov 0x5140+0, #0x00
|
|
110 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 253: RTC->TR2 = RTC_TR2_RESET_VALUE;
|
|
00892A 35 00 51 41 [ 1] 111 mov 0x5141+0, #0x00
|
|
112 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 254: RTC->TR3 = RTC_TR3_RESET_VALUE;
|
|
00892E 35 00 51 42 [ 1] 113 mov 0x5142+0, #0x00
|
|
114 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 257: RTC->DR1 = RTC_DR1_RESET_VALUE;
|
|
008932 35 01 51 44 [ 1] 115 mov 0x5144+0, #0x01
|
|
116 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 258: RTC->DR2 = RTC_DR2_RESET_VALUE;
|
|
008936 35 21 51 45 [ 1] 117 mov 0x5145+0, #0x21
|
|
118 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 259: RTC->DR3 = RTC_DR3_RESET_VALUE;
|
|
00893A 35 00 51 46 [ 1] 119 mov 0x5146+0, #0x00
|
|
120 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 262: RTC->SPRERH = RTC_SPRERH_RESET_VALUE;
|
|
00893E 35 00 51 50 [ 1] 121 mov 0x5150+0, #0x00
|
|
122 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 263: RTC->SPRERL = RTC_SPRERL_RESET_VALUE;
|
|
008942 35 FF 51 51 [ 1] 123 mov 0x5151+0, #0xff
|
|
124 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 264: RTC->APRER = RTC_APRER_RESET_VALUE;
|
|
008946 35 7F 51 52 [ 1] 125 mov 0x5152+0, #0x7f
|
|
126 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 266: RTC->TCR1 = RTC_TCR1_RESET_VALUE;
|
|
00894A 35 00 51 6C [ 1] 127 mov 0x516c+0, #0x00
|
|
128 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 267: RTC->TCR2 = RTC_TCR2_RESET_VALUE;
|
|
00894E 35 00 51 6D [ 1] 129 mov 0x516d+0, #0x00
|
|
130 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 271: RTC->CR1 = RTC_CR1_RESET_VALUE;
|
|
008952 35 00 51 48 [ 1] 131 mov 0x5148+0, #0x00
|
|
132 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 272: RTC->CR2 = RTC_CR2_RESET_VALUE;
|
|
008956 35 00 51 49 [ 1] 133 mov 0x5149+0, #0x00
|
|
134 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 273: RTC->CR3 = RTC_CR3_RESET_VALUE;
|
|
00895A 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))
|
|
00895E 5F [ 1] 137 clrw x
|
|
00895F 138 00102$:
|
|
00895F 72 04 51 4C 0C [ 2] 139 btjt 0x514c, #2, 00104$
|
|
008964 A3 FF FF [ 2] 140 cpw x, #0xffff
|
|
008967 27 07 [ 1] 141 jreq 00104$
|
|
142 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 278: wutwfcount++;
|
|
008969 5C [ 1] 143 incw x
|
|
144 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 279: RTC->ISR1 = 0;
|
|
00896A 35 00 51 4C [ 1] 145 mov 0x514c+0, #0x00
|
|
00896E 20 EF [ 2] 146 jra 00102$
|
|
008970 147 00104$:
|
|
148 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 282: if ((RTC->ISR1 & RTC_ISR1_WUTWF) == RESET)
|
|
008970 72 04 51 4C 06 [ 2] 149 btjt 0x514c, #2, 00118$
|
|
150 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 284: status = ERROR;
|
|
008975 4F [ 1] 151 clr a
|
|
152 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 286: RTC->WPR = 0xFF;
|
|
008976 35 FF 51 59 [ 1] 153 mov 0x5159+0, #0xff
|
|
00897A 81 [ 4] 154 ret
|
|
00897B 155 00118$:
|
|
156 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 291: RTC->CR1 = RTC_CR1_RESET_VALUE;
|
|
00897B 35 00 51 48 [ 1] 157 mov 0x5148+0, #0x00
|
|
158 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 294: RTC->WUTRH = RTC_WUTRH_RESET_VALUE;
|
|
00897F 35 FF 51 54 [ 1] 159 mov 0x5154+0, #0xff
|
|
160 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 295: RTC->WUTRL = RTC_WUTRL_RESET_VALUE;
|
|
008983 35 FF 51 55 [ 1] 161 mov 0x5155+0, #0xff
|
|
162 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 298: RTC->ALRMAR1 = RTC_ALRMAR1_RESET_VALUE;
|
|
008987 35 00 51 5C [ 1] 163 mov 0x515c+0, #0x00
|
|
164 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 299: RTC->ALRMAR2 = RTC_ALRMAR2_RESET_VALUE;
|
|
00898B 35 00 51 5D [ 1] 165 mov 0x515d+0, #0x00
|
|
166 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 300: RTC->ALRMAR3 = RTC_ALRMAR3_RESET_VALUE;
|
|
00898F 35 00 51 5E [ 1] 167 mov 0x515e+0, #0x00
|
|
168 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 301: RTC->ALRMAR4 = RTC_ALRMAR4_RESET_VALUE;
|
|
008993 35 00 51 5F [ 1] 169 mov 0x515f+0, #0x00
|
|
170 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 303: RTC->ALRMASSRH = RTC_ALRMASSRH_RESET_VALUE;
|
|
008997 35 00 51 64 [ 1] 171 mov 0x5164+0, #0x00
|
|
172 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 304: RTC->ALRMASSRL = RTC_ALRMASSRL_RESET_VALUE;
|
|
00899B 35 00 51 65 [ 1] 173 mov 0x5165+0, #0x00
|
|
174 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 305: RTC->ALRMASSMSKR = RTC_ALRMASSMSKR_RESET_VALUE;
|
|
00899F 35 00 51 66 [ 1] 175 mov 0x5166+0, #0x00
|
|
176 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 308: RTC->ISR1 = (uint8_t)0x00;
|
|
0089A3 35 00 51 4C [ 1] 177 mov 0x514c+0, #0x00
|
|
178 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 309: RTC->ISR2 = RTC_ISR2_RESET_VALUE;
|
|
0089A7 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)
|
|
0089AB 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))
|
|
0089B0 5F [ 1] 183 clrw x
|
|
0089B1 184 00106$:
|
|
0089B1 72 03 51 4C 08 [ 2] 185 btjf 0x514c, #1, 00110$
|
|
0089B6 A3 FF FF [ 2] 186 cpw x, #0xffff
|
|
0089B9 27 03 [ 1] 187 jreq 00110$
|
|
188 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 315: recalpfcount++;
|
|
0089BB 5C [ 1] 189 incw x
|
|
0089BC 20 F3 [ 2] 190 jra 00106$
|
|
0089BE 191 00110$:
|
|
192 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 318: if ((RTC->ISR1 & RTC_ISR1_RECALPF) == RESET)
|
|
0089BE 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;
|
|
0089C3 35 00 51 6A [ 1] 195 mov 0x516a+0, #0x00
|
|
196 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 321: RTC->CALRL = RTC_CALRL_RESET_VALUE;
|
|
0089C7 35 00 51 6B [ 1] 197 mov 0x516b+0, #0x00
|
|
198 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 323: if (RTC_WaitForSynchro() == ERROR)
|
|
0089CB CD 8A 6D [ 4] 199 call _RTC_WaitForSynchro
|
|
0089CE 4D [ 1] 200 tnz a
|
|
0089CF 26 03 [ 1] 201 jrne 00112$
|
|
202 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 325: status = ERROR;
|
|
0089D1 4F [ 1] 203 clr a
|
|
0089D2 20 04 [ 2] 204 jra 00116$
|
|
0089D4 205 00112$:
|
|
206 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 329: status = SUCCESS;
|
|
0089D4 A6 01 [ 1] 207 ld a, #0x01
|
|
208 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 334: status = ERROR;
|
|
0089D6 21 209 .byte 0x21
|
|
0089D7 210 00115$:
|
|
0089D7 4F [ 1] 211 clr a
|
|
0089D8 212 00116$:
|
|
213 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 338: RTC->WPR = 0xFF;
|
|
0089D8 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: }
|
|
0089DC 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 ; -----------------------------------------
|
|
0089DD 222 _RTC_Init:
|
|
0089DD 52 03 [ 2] 223 sub sp, #3
|
|
0089DF 1F 02 [ 2] 224 ldw (0x02, sp), x
|
|
225 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 369: RTC->WPR = 0xCA;
|
|
0089E1 35 CA 51 59 [ 1] 226 mov 0x5159+0, #0xca
|
|
227 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 370: RTC->WPR = 0x53;
|
|
0089E5 35 53 51 59 [ 1] 228 mov 0x5159+0, #0x53
|
|
229 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 373: if (RTC_EnterInitMode() == ERROR)
|
|
0089E9 CD 8A 47 [ 4] 230 call _RTC_EnterInitMode
|
|
0089EC 4D [ 1] 231 tnz a
|
|
0089ED 26 03 [ 1] 232 jrne 00102$
|
|
233 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 375: status = ERROR;
|
|
0089EF 4F [ 1] 234 clr a
|
|
0089F0 20 2D [ 2] 235 jra 00103$
|
|
0089F2 236 00102$:
|
|
237 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 380: RTC->CR1 &= ((uint8_t)~( RTC_CR1_FMT ));
|
|
0089F2 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));
|
|
0089F6 C6 51 48 [ 1] 240 ld a, 0x5148
|
|
0089F9 6B 01 [ 1] 241 ld (0x01, sp), a
|
|
0089FB 1E 02 [ 2] 242 ldw x, (0x02, sp)
|
|
0089FD F6 [ 1] 243 ld a, (x)
|
|
0089FE 1A 01 [ 1] 244 or a, (0x01, sp)
|
|
008A00 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);
|
|
008A03 1E 02 [ 2] 247 ldw x, (0x02, sp)
|
|
008A05 5C [ 1] 248 incw x
|
|
008A06 5C [ 1] 249 incw x
|
|
008A07 E6 01 [ 1] 250 ld a, (0x1, x)
|
|
008A09 F6 [ 1] 251 ld a, (x)
|
|
008A0A C7 51 50 [ 1] 252 ld 0x5150, a
|
|
253 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 387: RTC->SPRERL = (uint8_t)(RTC_InitStruct->RTC_SynchPrediv);
|
|
008A0D E6 01 [ 1] 254 ld a, (0x1, x)
|
|
008A0F C7 51 51 [ 1] 255 ld 0x5151, a
|
|
256 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 388: RTC->APRER = (uint8_t)(RTC_InitStruct->RTC_AsynchPrediv);
|
|
008A12 1E 02 [ 2] 257 ldw x, (0x02, sp)
|
|
008A14 E6 01 [ 1] 258 ld a, (0x1, x)
|
|
008A16 C7 51 52 [ 1] 259 ld 0x5152, a
|
|
260 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 391: RTC->ISR1 &= (uint8_t)~RTC_ISR1_INIT;
|
|
008A19 72 1F 51 4C [ 1] 261 bres 0x514c, #7
|
|
262 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 393: status = SUCCESS;
|
|
008A1D A6 01 [ 1] 263 ld a, #0x01
|
|
008A1F 264 00103$:
|
|
265 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 397: RTC->WPR = 0xFF;
|
|
008A1F 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: }
|
|
008A23 5B 03 [ 2] 269 addw sp, #3
|
|
008A25 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 ; -----------------------------------------
|
|
008A26 275 _RTC_StructInit:
|
|
008A26 51 [ 1] 276 exgw x, y
|
|
277 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 413: RTC_InitStruct->RTC_HourFormat = RTC_HourFormat_24;
|
|
008A27 90 7F [ 1] 278 clr (y)
|
|
279 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 416: RTC_InitStruct->RTC_AsynchPrediv = RTC_APRER_RESET_VALUE;
|
|
008A29 93 [ 1] 280 ldw x, y
|
|
008A2A 5C [ 1] 281 incw x
|
|
008A2B A6 7F [ 1] 282 ld a, #0x7f
|
|
008A2D F7 [ 1] 283 ld (x), a
|
|
284 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 419: RTC_InitStruct->RTC_SynchPrediv = RTC_SPRERL_RESET_VALUE;
|
|
008A2E 93 [ 1] 285 ldw x, y
|
|
008A2F 90 AE 00 FF [ 2] 286 ldw y, #0x00ff
|
|
008A33 EF 02 [ 2] 287 ldw (0x02, x), y
|
|
288 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 420: }
|
|
008A35 81 [ 4] 289 ret
|
|
290 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 430: void RTC_WriteProtectionCmd(FunctionalState NewState)
|
|
291 ; -----------------------------------------
|
|
292 ; function RTC_WriteProtectionCmd
|
|
293 ; -----------------------------------------
|
|
008A36 294 _RTC_WriteProtectionCmd:
|
|
295 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 435: if (NewState != DISABLE)
|
|
008A36 4D [ 1] 296 tnz a
|
|
008A37 27 05 [ 1] 297 jreq 00102$
|
|
298 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 438: RTC->WPR = RTC_WPR_EnableKey;
|
|
008A39 35 FF 51 59 [ 1] 299 mov 0x5159+0, #0xff
|
|
008A3D 81 [ 4] 300 ret
|
|
008A3E 301 00102$:
|
|
302 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 443: RTC->WPR = RTC_WPR_DisableKey1;
|
|
008A3E 35 CA 51 59 [ 1] 303 mov 0x5159+0, #0xca
|
|
304 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 444: RTC->WPR = RTC_WPR_DisableKey2;
|
|
008A42 35 53 51 59 [ 1] 305 mov 0x5159+0, #0x53
|
|
306 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 446: }
|
|
008A46 81 [ 4] 307 ret
|
|
308 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 458: ErrorStatus RTC_EnterInitMode(void)
|
|
309 ; -----------------------------------------
|
|
310 ; function RTC_EnterInitMode
|
|
311 ; -----------------------------------------
|
|
008A47 312 _RTC_EnterInitMode:
|
|
313 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 464: if ((RTC->ISR1 & RTC_ISR1_INITF) == RESET)
|
|
008A47 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;
|
|
008A4C 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))
|
|
008A50 5F [ 1] 318 clrw x
|
|
008A51 319 00102$:
|
|
008A51 72 0C 51 4C 08 [ 2] 320 btjt 0x514c, #6, 00106$
|
|
008A56 A3 FF FF [ 2] 321 cpw x, #0xffff
|
|
008A59 27 03 [ 1] 322 jreq 00106$
|
|
323 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 472: initfcount++;
|
|
008A5B 5C [ 1] 324 incw x
|
|
008A5C 20 F3 [ 2] 325 jra 00102$
|
|
008A5E 326 00106$:
|
|
327 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 476: if ((RTC->ISR1 & RTC_ISR1_INITF) == RESET)
|
|
008A5E 72 0C 51 4C 02 [ 2] 328 btjt 0x514c, #6, 00108$
|
|
329 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 478: status = ERROR;
|
|
008A63 4F [ 1] 330 clr a
|
|
008A64 81 [ 4] 331 ret
|
|
008A65 332 00108$:
|
|
333 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 482: status = SUCCESS;
|
|
008A65 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: }
|
|
008A67 81 [ 4] 337 ret
|
|
338 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 498: void RTC_ExitInitMode(void)
|
|
339 ; -----------------------------------------
|
|
340 ; function RTC_ExitInitMode
|
|
341 ; -----------------------------------------
|
|
008A68 342 _RTC_ExitInitMode:
|
|
343 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 501: RTC->ISR1 &= (uint8_t)~RTC_ISR1_INIT;
|
|
008A68 72 1F 51 4C [ 1] 344 bres 0x514c, #7
|
|
345 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 502: }
|
|
008A6C 81 [ 4] 346 ret
|
|
347 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 527: ErrorStatus RTC_WaitForSynchro(void)
|
|
348 ; -----------------------------------------
|
|
349 ; function RTC_WaitForSynchro
|
|
350 ; -----------------------------------------
|
|
008A6D 351 _RTC_WaitForSynchro:
|
|
352 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 533: RTC->WPR = 0xCA;
|
|
008A6D 35 CA 51 59 [ 1] 353 mov 0x5159+0, #0xca
|
|
354 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 534: RTC->WPR = 0x53;
|
|
008A71 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);
|
|
008A75 C6 51 4C [ 1] 357 ld a, 0x514c
|
|
008A78 A4 5F [ 1] 358 and a, #0x5f
|
|
008A7A 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))
|
|
008A7D 5F [ 1] 361 clrw x
|
|
008A7E 362 00102$:
|
|
008A7E 72 0A 51 4C 08 [ 2] 363 btjt 0x514c, #5, 00104$
|
|
008A83 A3 FF FF [ 2] 364 cpw x, #0xffff
|
|
008A86 27 03 [ 1] 365 jreq 00104$
|
|
366 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 542: rsfcount++;
|
|
008A88 5C [ 1] 367 incw x
|
|
008A89 20 F3 [ 2] 368 jra 00102$
|
|
008A8B 369 00104$:
|
|
370 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 546: if ((RTC->ISR1 & RTC_ISR1_RSF) != RESET)
|
|
008A8B 72 0B 51 4C 03 [ 2] 371 btjf 0x514c, #5, 00106$
|
|
372 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 548: status = SUCCESS;
|
|
008A90 A6 01 [ 1] 373 ld a, #0x01
|
|
374 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 552: status = ERROR;
|
|
008A92 21 375 .byte 0x21
|
|
008A93 376 00106$:
|
|
008A93 4F [ 1] 377 clr a
|
|
008A94 378 00107$:
|
|
379 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 556: RTC->WPR = 0xFF;
|
|
008A94 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: }
|
|
008A98 81 [ 4] 383 ret
|
|
384 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 568: void RTC_RatioCmd(FunctionalState NewState)
|
|
385 ; -----------------------------------------
|
|
386 ; function RTC_RatioCmd
|
|
387 ; -----------------------------------------
|
|
008A99 388 _RTC_RatioCmd:
|
|
008A99 88 [ 1] 389 push a
|
|
008A9A 6B 01 [ 1] 390 ld (0x01, sp), a
|
|
391 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 574: RTC->WPR = 0xCA;
|
|
008A9C 35 CA 51 59 [ 1] 392 mov 0x5159+0, #0xca
|
|
393 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 575: RTC->WPR = 0x53;
|
|
008AA0 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;
|
|
008AA4 C6 51 48 [ 1] 396 ld a, 0x5148
|
|
397 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 577: if (NewState != DISABLE)
|
|
008AA7 0D 01 [ 1] 398 tnz (0x01, sp)
|
|
008AA9 27 07 [ 1] 399 jreq 00102$
|
|
400 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 580: RTC->CR1 |= (uint8_t)RTC_CR1_RATIO;
|
|
008AAB AA 20 [ 1] 401 or a, #0x20
|
|
008AAD C7 51 48 [ 1] 402 ld 0x5148, a
|
|
008AB0 20 05 [ 2] 403 jra 00103$
|
|
008AB2 404 00102$:
|
|
405 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 585: RTC->CR1 &= (uint8_t)~RTC_CR1_RATIO;
|
|
008AB2 A4 DF [ 1] 406 and a, #0xdf
|
|
008AB4 C7 51 48 [ 1] 407 ld 0x5148, a
|
|
008AB7 408 00103$:
|
|
409 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 589: RTC->WPR = 0xFF;
|
|
008AB7 35 FF 51 59 [ 1] 410 mov 0x5159+0, #0xff
|
|
411 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 590: }
|
|
008ABB 84 [ 1] 412 pop a
|
|
008ABC 81 [ 4] 413 ret
|
|
414 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 598: void RTC_BypassShadowCmd(FunctionalState NewState)
|
|
415 ; -----------------------------------------
|
|
416 ; function RTC_BypassShadowCmd
|
|
417 ; -----------------------------------------
|
|
008ABD 418 _RTC_BypassShadowCmd:
|
|
008ABD 88 [ 1] 419 push a
|
|
008ABE 6B 01 [ 1] 420 ld (0x01, sp), a
|
|
421 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 604: RTC->WPR = 0xCA;
|
|
008AC0 35 CA 51 59 [ 1] 422 mov 0x5159+0, #0xca
|
|
423 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 605: RTC->WPR = 0x53;
|
|
008AC4 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;
|
|
008AC8 C6 51 48 [ 1] 426 ld a, 0x5148
|
|
427 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 607: if (NewState != DISABLE)
|
|
008ACB 0D 01 [ 1] 428 tnz (0x01, sp)
|
|
008ACD 27 07 [ 1] 429 jreq 00102$
|
|
430 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 610: RTC->CR1 |= (uint8_t)RTC_CR1_BYPSHAD;
|
|
008ACF AA 10 [ 1] 431 or a, #0x10
|
|
008AD1 C7 51 48 [ 1] 432 ld 0x5148, a
|
|
008AD4 20 05 [ 2] 433 jra 00103$
|
|
008AD6 434 00102$:
|
|
435 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 615: RTC->CR1 &= (uint8_t)~RTC_CR1_BYPSHAD;
|
|
008AD6 A4 EF [ 1] 436 and a, #0xef
|
|
008AD8 C7 51 48 [ 1] 437 ld 0x5148, a
|
|
008ADB 438 00103$:
|
|
439 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 619: RTC->WPR = 0xFF;
|
|
008ADB 35 FF 51 59 [ 1] 440 mov 0x5159+0, #0xff
|
|
441 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 620: }
|
|
008ADF 84 [ 1] 442 pop a
|
|
008AE0 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 ; -----------------------------------------
|
|
008AE1 448 _RTC_SetTime:
|
|
008AE1 52 06 [ 2] 449 sub sp, #6
|
|
008AE3 6B 06 [ 1] 450 ld (0x06, sp), a
|
|
008AE5 1F 04 [ 2] 451 ldw (0x04, sp), x
|
|
452 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 671: if ((RTC->CR1 & RTC_CR1_FMT) != RESET)
|
|
008AE7 C6 51 48 [ 1] 453 ld a, 0x5148
|
|
454 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 701: RTC->WPR = 0xCA;
|
|
008AEA 35 CA 51 59 [ 1] 455 mov 0x5159+0, #0xca
|
|
456 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 702: RTC->WPR = 0x53;
|
|
008AEE 35 53 51 59 [ 1] 457 mov 0x5159+0, #0x53
|
|
458 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 705: if (RTC_EnterInitMode() == ERROR)
|
|
008AF2 CD 8A 47 [ 4] 459 call _RTC_EnterInitMode
|
|
008AF5 4D [ 1] 460 tnz a
|
|
008AF6 26 07 [ 1] 461 jrne 00123$
|
|
462 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 707: status = ERROR;
|
|
008AF8 4F [ 1] 463 clr a
|
|
464 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 709: RTC->WPR = 0xFF;
|
|
008AF9 35 FF 51 59 [ 1] 465 mov 0x5159+0, #0xff
|
|
008AFD 20 6B [ 2] 466 jra 00124$
|
|
008AFF 467 00123$:
|
|
468 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 714: if ((RTC->CR1 & RTC_CR1_FMT) != RESET)
|
|
008AFF 72 0D 51 48 07 [ 2] 469 btjf 0x5148, #6, 00111$
|
|
470 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 717: temp = RTC_TimeStruct->RTC_H12;
|
|
008B04 1E 04 [ 2] 471 ldw x, (0x04, sp)
|
|
008B06 E6 03 [ 1] 472 ld a, (0x3, x)
|
|
008B08 6B 01 [ 1] 473 ld (0x01, sp), a
|
|
474 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 721: temp = 0;
|
|
008B0A C5 475 .byte 0xc5
|
|
008B0B 476 00111$:
|
|
008B0B 0F 01 [ 1] 477 clr (0x01, sp)
|
|
008B0D 478 00112$:
|
|
479 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 726: RTC->TR1 = (uint8_t)(RTC_TimeStruct->RTC_Seconds);
|
|
008B0D 16 04 [ 2] 480 ldw y, (0x04, sp)
|
|
481 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 727: RTC->TR2 = (uint8_t)(RTC_TimeStruct->RTC_Minutes) ;
|
|
008B0F 1E 04 [ 2] 482 ldw x, (0x04, sp)
|
|
008B11 5C [ 1] 483 incw x
|
|
008B12 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) ;
|
|
008B14 1E 04 [ 2] 486 ldw x, (0x04, sp)
|
|
487 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 726: RTC->TR1 = (uint8_t)(RTC_TimeStruct->RTC_Seconds);
|
|
008B16 90 E6 02 [ 1] 488 ld a, (0x2, y)
|
|
489 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 724: if (RTC_Format != RTC_Format_BIN)
|
|
008B19 0D 06 [ 1] 490 tnz (0x06, sp)
|
|
008B1B 27 12 [ 1] 491 jreq 00114$
|
|
492 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 726: RTC->TR1 = (uint8_t)(RTC_TimeStruct->RTC_Seconds);
|
|
008B1D C7 51 40 [ 1] 493 ld 0x5140, a
|
|
494 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 727: RTC->TR2 = (uint8_t)(RTC_TimeStruct->RTC_Minutes) ;
|
|
008B20 16 02 [ 2] 495 ldw y, (0x02, sp)
|
|
008B22 90 F6 [ 1] 496 ld a, (y)
|
|
008B24 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) ;
|
|
008B27 F6 [ 1] 499 ld a, (x)
|
|
008B28 1A 01 [ 1] 500 or a, (0x01, sp)
|
|
008B2A C7 51 42 [ 1] 501 ld 0x5142, a
|
|
008B2D 20 1D [ 2] 502 jra 00115$
|
|
008B2F 503 00114$:
|
|
504 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 732: RTC->TR1 = (uint8_t)(ByteToBcd2(RTC_TimeStruct->RTC_Seconds));
|
|
008B2F 89 [ 2] 505 pushw x
|
|
008B30 CD 92 35 [ 4] 506 call _ByteToBcd2
|
|
008B33 85 [ 2] 507 popw x
|
|
008B34 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)) ;
|
|
008B37 16 02 [ 2] 510 ldw y, (0x02, sp)
|
|
008B39 90 F6 [ 1] 511 ld a, (y)
|
|
008B3B 89 [ 2] 512 pushw x
|
|
008B3C CD 92 35 [ 4] 513 call _ByteToBcd2
|
|
008B3F 85 [ 2] 514 popw x
|
|
008B40 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));
|
|
008B43 F6 [ 1] 517 ld a, (x)
|
|
008B44 CD 92 35 [ 4] 518 call _ByteToBcd2
|
|
008B47 1A 01 [ 1] 519 or a, (0x01, sp)
|
|
008B49 C7 51 42 [ 1] 520 ld 0x5142, a
|
|
008B4C 521 00115$:
|
|
522 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 737: (void)(RTC->DR3);
|
|
008B4C C6 51 46 [ 1] 523 ld a, 0x5146
|
|
524 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 740: RTC->ISR1 &= (uint8_t)~RTC_ISR1_INIT;
|
|
008B4F 72 1F 51 4C [ 1] 525 bres 0x514c, #7
|
|
526 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 743: RTC->WPR = 0xFF;
|
|
008B53 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)
|
|
008B57 72 08 51 48 0C [ 2] 529 btjt 0x5148, #4, 00120$
|
|
530 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 748: if (RTC_WaitForSynchro() == ERROR)
|
|
008B5C CD 8A 6D [ 4] 531 call _RTC_WaitForSynchro
|
|
008B5F 4D [ 1] 532 tnz a
|
|
008B60 26 03 [ 1] 533 jrne 00117$
|
|
534 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 750: status = ERROR;
|
|
008B62 4F [ 1] 535 clr a
|
|
008B63 20 05 [ 2] 536 jra 00124$
|
|
008B65 537 00117$:
|
|
538 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 754: status = SUCCESS;
|
|
008B65 A6 01 [ 1] 539 ld a, #0x01
|
|
540 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 759: status = SUCCESS;
|
|
008B67 C5 541 .byte 0xc5
|
|
008B68 542 00120$:
|
|
008B68 A6 01 [ 1] 543 ld a, #0x01
|
|
008B6A 544 00124$:
|
|
545 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 763: return (ErrorStatus)status;
|
|
546 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 764: }
|
|
008B6A 5B 06 [ 2] 547 addw sp, #6
|
|
008B6C 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 ; -----------------------------------------
|
|
008B6D 553 _RTC_TimeStructInit:
|
|
554 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 778: RTC_TimeStruct->RTC_H12 = RTC_H12_AM;
|
|
008B6D 90 93 [ 1] 555 ldw y, x
|
|
008B6F 6F 03 [ 1] 556 clr (0x0003, x)
|
|
557 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 779: RTC_TimeStruct->RTC_Hours = 0;
|
|
008B71 90 7F [ 1] 558 clr (y)
|
|
559 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 780: RTC_TimeStruct->RTC_Minutes = 0;
|
|
008B73 93 [ 1] 560 ldw x, y
|
|
008B74 6F 01 [ 1] 561 clr (0x01, x)
|
|
562 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 781: RTC_TimeStruct->RTC_Seconds = 0;
|
|
008B76 93 [ 1] 563 ldw x, y
|
|
008B77 6F 02 [ 1] 564 clr (0x02, x)
|
|
565 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 782: }
|
|
008B79 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 ; -----------------------------------------
|
|
008B7A 571 _RTC_GetTime:
|
|
008B7A 52 06 [ 2] 572 sub sp, #6
|
|
008B7C 6B 06 [ 1] 573 ld (0x06, sp), a
|
|
574 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 808: RTC_TimeStruct->RTC_Seconds = RTC->TR1;
|
|
008B7E 90 93 [ 1] 575 ldw y, x
|
|
008B80 5C [ 1] 576 incw x
|
|
008B81 5C [ 1] 577 incw x
|
|
008B82 1F 01 [ 2] 578 ldw (0x01, sp), x
|
|
008B84 C6 51 40 [ 1] 579 ld a, 0x5140
|
|
008B87 1E 01 [ 2] 580 ldw x, (0x01, sp)
|
|
008B89 F7 [ 1] 581 ld (x), a
|
|
582 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 811: RTC_TimeStruct->RTC_Minutes = RTC->TR2;
|
|
008B8A 93 [ 1] 583 ldw x, y
|
|
008B8B 5C [ 1] 584 incw x
|
|
008B8C 1F 03 [ 2] 585 ldw (0x03, sp), x
|
|
008B8E C6 51 41 [ 1] 586 ld a, 0x5141
|
|
008B91 1E 03 [ 2] 587 ldw x, (0x03, sp)
|
|
008B93 F7 [ 1] 588 ld (x), a
|
|
589 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 814: tmpreg = (uint8_t)RTC->TR3;
|
|
008B94 C6 51 42 [ 1] 590 ld a, 0x5142
|
|
008B97 6B 05 [ 1] 591 ld (0x05, sp), a
|
|
592 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 817: (void) (RTC->DR3) ;
|
|
008B99 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));
|
|
008B9C 93 [ 1] 595 ldw x, y
|
|
008B9D 7B 05 [ 1] 596 ld a, (0x05, sp)
|
|
008B9F A4 BF [ 1] 597 and a, #0xbf
|
|
008BA1 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);
|
|
008BA2 72 A9 00 03 [ 2] 600 addw y, #0x0003
|
|
008BA6 7B 05 [ 1] 601 ld a, (0x05, sp)
|
|
008BA8 A4 40 [ 1] 602 and a, #0x40
|
|
008BAA 90 F7 [ 1] 603 ld (y), a
|
|
604 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 827: if (RTC_Format == RTC_Format_BIN)
|
|
008BAC 0D 06 [ 1] 605 tnz (0x06, sp)
|
|
008BAE 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);
|
|
008BB0 F6 [ 1] 608 ld a, (x)
|
|
008BB1 89 [ 2] 609 pushw x
|
|
008BB2 CD 92 48 [ 4] 610 call _Bcd2ToByte
|
|
008BB5 85 [ 2] 611 popw x
|
|
008BB6 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);
|
|
008BB7 1E 03 [ 2] 614 ldw x, (0x03, sp)
|
|
008BB9 F6 [ 1] 615 ld a, (x)
|
|
008BBA CD 92 48 [ 4] 616 call _Bcd2ToByte
|
|
008BBD 1E 03 [ 2] 617 ldw x, (0x03, sp)
|
|
008BBF 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);
|
|
008BC0 1E 01 [ 2] 620 ldw x, (0x01, sp)
|
|
008BC2 F6 [ 1] 621 ld a, (x)
|
|
008BC3 CD 92 48 [ 4] 622 call _Bcd2ToByte
|
|
008BC6 1E 01 [ 2] 623 ldw x, (0x01, sp)
|
|
008BC8 F7 [ 1] 624 ld (x), a
|
|
008BC9 625 00103$:
|
|
626 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 834: }
|
|
008BC9 5B 06 [ 2] 627 addw sp, #6
|
|
008BCB 81 [ 4] 628 ret
|
|
629 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 845: uint16_t RTC_GetSubSecond(void)
|
|
630 ; -----------------------------------------
|
|
631 ; function RTC_GetSubSecond
|
|
632 ; -----------------------------------------
|
|
008BCC 633 _RTC_GetSubSecond:
|
|
008BCC 89 [ 2] 634 pushw x
|
|
635 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 851: ssrhreg = RTC->SSRH;
|
|
008BCD C6 51 57 [ 1] 636 ld a, 0x5157
|
|
008BD0 95 [ 1] 637 ld xh, a
|
|
638 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 852: ssrlreg = RTC->SSRL;
|
|
008BD1 C6 51 58 [ 1] 639 ld a, 0x5158
|
|
008BD4 97 [ 1] 640 ld xl, a
|
|
641 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 855: (void) (RTC->DR3);
|
|
008BD5 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));
|
|
008BD8 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: }
|
|
008BDA 5B 02 [ 2] 647 addw sp, #2
|
|
008BDC 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 ; -----------------------------------------
|
|
008BDD 653 _RTC_SetDate:
|
|
008BDD 52 0A [ 2] 654 sub sp, #10
|
|
008BDF 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))
|
|
008BE1 1F 08 [ 2] 657 ldw (0x08, sp), x
|
|
008BE3 5C [ 1] 658 incw x
|
|
008BE4 1F 01 [ 2] 659 ldw (0x01, sp), x
|
|
008BE6 0D 0A [ 1] 660 tnz (0x0a, sp)
|
|
008BE8 26 11 [ 1] 661 jrne 00106$
|
|
008BEA 1E 01 [ 2] 662 ldw x, (0x01, sp)
|
|
008BEC F6 [ 1] 663 ld a, (x)
|
|
008BED 97 [ 1] 664 ld xl, a
|
|
008BEE 43 [ 1] 665 cpl a
|
|
008BEF A5 10 [ 1] 666 bcp a, #0x10
|
|
008BF1 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);
|
|
008BF3 9F [ 1] 669 ld a, xl
|
|
008BF4 A4 EF [ 1] 670 and a, #0xef
|
|
008BF6 AB 0A [ 1] 671 add a, #0x0a
|
|
008BF8 1E 01 [ 2] 672 ldw x, (0x01, sp)
|
|
008BFA 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)));
|
|
008BFB 675 00106$:
|
|
676 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 907: RTC->WPR = 0xCA;
|
|
008BFB 35 CA 51 59 [ 1] 677 mov 0x5159+0, #0xca
|
|
678 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 908: RTC->WPR = 0x53;
|
|
008BFF 35 53 51 59 [ 1] 679 mov 0x5159+0, #0x53
|
|
680 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 911: if (RTC_EnterInitMode() == ERROR)
|
|
008C03 CD 8A 47 [ 4] 681 call _RTC_EnterInitMode
|
|
008C06 4D [ 1] 682 tnz a
|
|
008C07 26 07 [ 1] 683 jrne 00117$
|
|
684 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 913: status = ERROR;
|
|
008C09 4F [ 1] 685 clr a
|
|
686 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 915: RTC->WPR = 0xFF;
|
|
008C0A 35 FF 51 59 [ 1] 687 mov 0x5159+0, #0xff
|
|
008C0E 20 71 [ 2] 688 jra 00118$
|
|
008C10 689 00117$:
|
|
690 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 919: (void)(RTC->TR1);
|
|
008C10 C6 51 40 [ 1] 691 ld a, 0x5140
|
|
692 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 924: RTC->DR1 = (uint8_t)(RTC_DateStruct->RTC_Date);
|
|
008C13 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));
|
|
008C15 16 08 [ 2] 695 ldw y, (0x08, sp)
|
|
008C17 17 03 [ 2] 696 ldw (0x03, sp), y
|
|
697 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 926: RTC->DR3 = (uint8_t)((RTC_DateStruct->RTC_Year));
|
|
008C19 16 08 [ 2] 698 ldw y, (0x08, sp)
|
|
008C1B 72 A9 00 03 [ 2] 699 addw y, #0x0003
|
|
008C1F 17 05 [ 2] 700 ldw (0x05, sp), y
|
|
701 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 924: RTC->DR1 = (uint8_t)(RTC_DateStruct->RTC_Date);
|
|
008C21 E6 02 [ 1] 702 ld a, (0x2, x)
|
|
703 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 922: if (RTC_Format != RTC_Format_BIN)
|
|
008C23 0D 0A [ 1] 704 tnz (0x0a, sp)
|
|
008C25 27 1C [ 1] 705 jreq 00108$
|
|
706 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 924: RTC->DR1 = (uint8_t)(RTC_DateStruct->RTC_Date);
|
|
008C27 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));
|
|
008C2A 1E 01 [ 2] 709 ldw x, (0x01, sp)
|
|
008C2C F6 [ 1] 710 ld a, (x)
|
|
008C2D 6B 07 [ 1] 711 ld (0x07, sp), a
|
|
008C2F 1E 03 [ 2] 712 ldw x, (0x03, sp)
|
|
008C31 F6 [ 1] 713 ld a, (x)
|
|
008C32 4E [ 1] 714 swap a
|
|
008C33 A4 F0 [ 1] 715 and a, #0xf0
|
|
008C35 48 [ 1] 716 sll a
|
|
008C36 1A 07 [ 1] 717 or a, (0x07, sp)
|
|
008C38 C7 51 45 [ 1] 718 ld 0x5145, a
|
|
719 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 926: RTC->DR3 = (uint8_t)((RTC_DateStruct->RTC_Year));
|
|
008C3B 1E 05 [ 2] 720 ldw x, (0x05, sp)
|
|
008C3D F6 [ 1] 721 ld a, (x)
|
|
008C3E C7 51 46 [ 1] 722 ld 0x5146, a
|
|
008C41 20 23 [ 2] 723 jra 00109$
|
|
008C43 724 00108$:
|
|
725 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 930: RTC->DR1 = (uint8_t)(ByteToBcd2 ((uint8_t)RTC_DateStruct->RTC_Date));
|
|
008C43 CD 92 35 [ 4] 726 call _ByteToBcd2
|
|
008C46 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));
|
|
008C49 1E 01 [ 2] 729 ldw x, (0x01, sp)
|
|
008C4B F6 [ 1] 730 ld a, (x)
|
|
008C4C CD 92 35 [ 4] 731 call _ByteToBcd2
|
|
008C4F 6B 07 [ 1] 732 ld (0x07, sp), a
|
|
008C51 1E 03 [ 2] 733 ldw x, (0x03, sp)
|
|
008C53 F6 [ 1] 734 ld a, (x)
|
|
008C54 4E [ 1] 735 swap a
|
|
008C55 A4 F0 [ 1] 736 and a, #0xf0
|
|
008C57 48 [ 1] 737 sll a
|
|
008C58 1A 07 [ 1] 738 or a, (0x07, sp)
|
|
008C5A 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));
|
|
008C5D 1E 05 [ 2] 741 ldw x, (0x05, sp)
|
|
008C5F F6 [ 1] 742 ld a, (x)
|
|
008C60 CD 92 35 [ 4] 743 call _ByteToBcd2
|
|
008C63 C7 51 46 [ 1] 744 ld 0x5146, a
|
|
008C66 745 00109$:
|
|
746 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 936: RTC->ISR1 &= (uint8_t)~RTC_ISR1_INIT;
|
|
008C66 72 1F 51 4C [ 1] 747 bres 0x514c, #7
|
|
748 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 939: RTC->WPR = 0xFF;
|
|
008C6A 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)
|
|
008C6E 72 08 51 48 0C [ 2] 751 btjt 0x5148, #4, 00114$
|
|
752 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 944: if (RTC_WaitForSynchro() == ERROR)
|
|
008C73 CD 8A 6D [ 4] 753 call _RTC_WaitForSynchro
|
|
008C76 4D [ 1] 754 tnz a
|
|
008C77 26 03 [ 1] 755 jrne 00111$
|
|
756 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 946: status = ERROR;
|
|
008C79 4F [ 1] 757 clr a
|
|
008C7A 20 05 [ 2] 758 jra 00118$
|
|
008C7C 759 00111$:
|
|
760 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 950: status = SUCCESS;
|
|
008C7C A6 01 [ 1] 761 ld a, #0x01
|
|
762 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 955: status = SUCCESS;
|
|
008C7E C5 763 .byte 0xc5
|
|
008C7F 764 00114$:
|
|
008C7F A6 01 [ 1] 765 ld a, #0x01
|
|
008C81 766 00118$:
|
|
767 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 959: return (ErrorStatus)status;
|
|
768 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 960: }
|
|
008C81 5B 0A [ 2] 769 addw sp, #10
|
|
008C83 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 ; -----------------------------------------
|
|
008C84 775 _RTC_DateStructInit:
|
|
008C84 51 [ 1] 776 exgw x, y
|
|
777 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 971: RTC_DateStruct->RTC_WeekDay = RTC_Weekday_Monday;
|
|
008C85 A6 01 [ 1] 778 ld a, #0x01
|
|
008C87 90 F7 [ 1] 779 ld (y), a
|
|
780 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 972: RTC_DateStruct->RTC_Date = 1;
|
|
008C89 93 [ 1] 781 ldw x, y
|
|
008C8A 5C [ 1] 782 incw x
|
|
008C8B 5C [ 1] 783 incw x
|
|
008C8C A6 01 [ 1] 784 ld a, #0x01
|
|
008C8E F7 [ 1] 785 ld (x), a
|
|
786 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 973: RTC_DateStruct->RTC_Month = RTC_Month_January;
|
|
008C8F 93 [ 1] 787 ldw x, y
|
|
008C90 5C [ 1] 788 incw x
|
|
008C91 A6 01 [ 1] 789 ld a, #0x01
|
|
008C93 F7 [ 1] 790 ld (x), a
|
|
791 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 974: RTC_DateStruct->RTC_Year = 0;
|
|
008C94 93 [ 1] 792 ldw x, y
|
|
008C95 6F 03 [ 1] 793 clr (0x0003, x)
|
|
794 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 975: }
|
|
008C97 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 ; -----------------------------------------
|
|
008C98 800 _RTC_GetDate:
|
|
008C98 52 06 [ 2] 801 sub sp, #6
|
|
008C9A 6B 06 [ 1] 802 ld (0x06, sp), a
|
|
008C9C 51 [ 1] 803 exgw x, y
|
|
804 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 997: (void) (RTC->TR1) ;
|
|
008C9D C6 51 40 [ 1] 805 ld a, 0x5140
|
|
806 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 998: RTC_DateStruct->RTC_Date = (uint8_t)(RTC->DR1);
|
|
008CA0 93 [ 1] 807 ldw x, y
|
|
008CA1 5C [ 1] 808 incw x
|
|
008CA2 5C [ 1] 809 incw x
|
|
008CA3 1F 01 [ 2] 810 ldw (0x01, sp), x
|
|
008CA5 C6 51 44 [ 1] 811 ld a, 0x5144
|
|
008CA8 1E 01 [ 2] 812 ldw x, (0x01, sp)
|
|
008CAA F7 [ 1] 813 ld (x), a
|
|
814 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 999: tmpreg = (uint8_t)RTC->DR2;
|
|
008CAB C6 51 45 [ 1] 815 ld a, 0x5145
|
|
008CAE 6B 03 [ 1] 816 ld (0x03, sp), a
|
|
817 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1000: RTC_DateStruct->RTC_Year = (uint8_t)(RTC->DR3);
|
|
008CB0 93 [ 1] 818 ldw x, y
|
|
008CB1 1C 00 03 [ 2] 819 addw x, #0x0003
|
|
008CB4 1F 04 [ 2] 820 ldw (0x04, sp), x
|
|
008CB6 C6 51 46 [ 1] 821 ld a, 0x5146
|
|
008CB9 1E 04 [ 2] 822 ldw x, (0x04, sp)
|
|
008CBB 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));
|
|
008CBC 93 [ 1] 825 ldw x, y
|
|
008CBD 5C [ 1] 826 incw x
|
|
008CBE 7B 03 [ 1] 827 ld a, (0x03, sp)
|
|
008CC0 A4 1F [ 1] 828 and a, #0x1f
|
|
008CC2 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);
|
|
008CC3 7B 03 [ 1] 831 ld a, (0x03, sp)
|
|
008CC5 A4 E0 [ 1] 832 and a, #0xe0
|
|
008CC7 4E [ 1] 833 swap a
|
|
008CC8 A4 0F [ 1] 834 and a, #0x0f
|
|
008CCA 44 [ 1] 835 srl a
|
|
008CCB 90 F7 [ 1] 836 ld (y), a
|
|
837 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1007: if (RTC_Format == RTC_Format_BIN)
|
|
008CCD 0D 06 [ 1] 838 tnz (0x06, sp)
|
|
008CCF 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);
|
|
008CD1 16 04 [ 2] 841 ldw y, (0x04, sp)
|
|
008CD3 90 F6 [ 1] 842 ld a, (y)
|
|
008CD5 89 [ 2] 843 pushw x
|
|
008CD6 CD 92 48 [ 4] 844 call _Bcd2ToByte
|
|
008CD9 85 [ 2] 845 popw x
|
|
008CDA 16 04 [ 2] 846 ldw y, (0x04, sp)
|
|
008CDC 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);
|
|
008CDE F6 [ 1] 849 ld a, (x)
|
|
008CDF 89 [ 2] 850 pushw x
|
|
008CE0 CD 92 48 [ 4] 851 call _Bcd2ToByte
|
|
008CE3 85 [ 2] 852 popw x
|
|
008CE4 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));
|
|
008CE5 1E 01 [ 2] 855 ldw x, (0x01, sp)
|
|
008CE7 F6 [ 1] 856 ld a, (x)
|
|
008CE8 CD 92 48 [ 4] 857 call _Bcd2ToByte
|
|
008CEB 1E 01 [ 2] 858 ldw x, (0x01, sp)
|
|
008CED F7 [ 1] 859 ld (x), a
|
|
008CEE 860 00103$:
|
|
861 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1014: }
|
|
008CEE 5B 06 [ 2] 862 addw sp, #6
|
|
008CF0 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 ; -----------------------------------------
|
|
008CF1 868 _RTC_SetAlarm:
|
|
008CF1 52 11 [ 2] 869 sub sp, #17
|
|
008CF3 6B 11 [ 1] 870 ld (0x11, sp), a
|
|
008CF5 51 [ 1] 871 exgw x, y
|
|
872 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1062: if ((RTC->CR1 & RTC_CR1_FMT) != RESET)
|
|
008CF6 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 )
|
|
008CF9 93 [ 1] 875 ldw x, y
|
|
008CFA 1C 00 04 [ 2] 876 addw x, #0x0004
|
|
008CFD 1F 05 [ 2] 877 ldw (0x05, sp), x
|
|
878 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1108: RTC->WPR = 0xCA;
|
|
008CFF 35 CA 51 59 [ 1] 879 mov 0x5159+0, #0xca
|
|
880 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1109: RTC->WPR = 0x53;
|
|
008D03 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) | \
|
|
008D07 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) | \
|
|
008D09 93 [ 1] 885 ldw x, y
|
|
008D0A 5C [ 1] 886 incw x
|
|
008D0B 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) | \
|
|
008D0D 17 07 [ 2] 889 ldw (0x07, sp), y
|
|
008D0F 93 [ 1] 890 ldw x, y
|
|
008D10 1C 00 03 [ 2] 891 addw x, #0x0003
|
|
008D13 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) | \
|
|
008D15 93 [ 1] 894 ldw x, y
|
|
008D16 1C 00 06 [ 2] 895 addw x, #0x0006
|
|
008D19 1F 0B [ 2] 896 ldw (0x0b, sp), x
|
|
008D1B 93 [ 1] 897 ldw x, y
|
|
008D1C 1C 00 05 [ 2] 898 addw x, #0x0005
|
|
008D1F 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) | \
|
|
008D21 1E 01 [ 2] 901 ldw x, (0x01, sp)
|
|
008D23 E6 02 [ 1] 902 ld a, (0x2, x)
|
|
008D25 6B 10 [ 1] 903 ld (0x10, sp), a
|
|
904 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1113: if (RTC_Format != RTC_Format_BIN)
|
|
008D27 0D 11 [ 1] 905 tnz (0x11, sp)
|
|
008D29 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) | \
|
|
008D2B 1E 05 [ 2] 908 ldw x, (0x05, sp)
|
|
008D2D F6 [ 1] 909 ld a, (x)
|
|
008D2E 97 [ 1] 910 ld xl, a
|
|
008D2F A4 80 [ 1] 911 and a, #0x80
|
|
008D31 1A 10 [ 1] 912 or a, (0x10, sp)
|
|
008D33 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) | \
|
|
008D35 16 03 [ 2] 915 ldw y, (0x03, sp)
|
|
008D37 90 F6 [ 1] 916 ld a, (y)
|
|
008D39 6B 10 [ 1] 917 ld (0x10, sp), a
|
|
008D3B 9F [ 1] 918 ld a, xl
|
|
008D3C 48 [ 1] 919 sll a
|
|
008D3D A4 80 [ 1] 920 and a, #0x80
|
|
008D3F 1A 10 [ 1] 921 or a, (0x10, sp)
|
|
008D41 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) | \
|
|
008D43 16 07 [ 2] 924 ldw y, (0x07, sp)
|
|
008D45 90 F6 [ 1] 925 ld a, (y)
|
|
008D47 6B 06 [ 1] 926 ld (0x06, sp), a
|
|
008D49 16 09 [ 2] 927 ldw y, (0x09, sp)
|
|
008D4B 90 F6 [ 1] 928 ld a, (y)
|
|
008D4D 1A 06 [ 1] 929 or a, (0x06, sp)
|
|
008D4F 6B 0A [ 1] 930 ld (0x0a, sp), a
|
|
008D51 9F [ 1] 931 ld a, xl
|
|
008D52 48 [ 1] 932 sll a
|
|
008D53 48 [ 1] 933 sll a
|
|
008D54 A4 80 [ 1] 934 and a, #0x80
|
|
008D56 1A 0A [ 1] 935 or a, (0x0a, sp)
|
|
008D58 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) | \
|
|
008D5A 16 0B [ 2] 938 ldw y, (0x0b, sp)
|
|
008D5C 90 F6 [ 1] 939 ld a, (y)
|
|
008D5E 6B 09 [ 1] 940 ld (0x09, sp), a
|
|
008D60 16 0D [ 2] 941 ldw y, (0x0d, sp)
|
|
008D62 90 F6 [ 1] 942 ld a, (y)
|
|
008D64 1A 09 [ 1] 943 or a, (0x09, sp)
|
|
008D66 6B 0E [ 1] 944 ld (0x0e, sp), a
|
|
008D68 9F [ 1] 945 ld a, xl
|
|
008D69 48 [ 1] 946 sll a
|
|
008D6A 48 [ 1] 947 sll a
|
|
008D6B 48 [ 1] 948 sll a
|
|
008D6C A4 80 [ 1] 949 and a, #0x80
|
|
008D6E 1A 0E [ 1] 950 or a, (0x0e, sp)
|
|
008D70 20 55 [ 2] 951 jra 00117$
|
|
008D72 952 00116$:
|
|
953 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1132: tmpreg1 = (uint8_t)((ByteToBcd2(RTC_AlarmStruct->RTC_AlarmTime.RTC_Seconds)) | \
|
|
008D72 7B 10 [ 1] 954 ld a, (0x10, sp)
|
|
008D74 CD 92 35 [ 4] 955 call _ByteToBcd2
|
|
008D77 6B 10 [ 1] 956 ld (0x10, sp), a
|
|
008D79 1E 05 [ 2] 957 ldw x, (0x05, sp)
|
|
008D7B F6 [ 1] 958 ld a, (x)
|
|
008D7C A4 80 [ 1] 959 and a, #0x80
|
|
008D7E 1A 10 [ 1] 960 or a, (0x10, sp)
|
|
008D80 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)) | \
|
|
008D82 1E 03 [ 2] 963 ldw x, (0x03, sp)
|
|
008D84 F6 [ 1] 964 ld a, (x)
|
|
008D85 CD 92 35 [ 4] 965 call _ByteToBcd2
|
|
008D88 6B 10 [ 1] 966 ld (0x10, sp), a
|
|
008D8A 1E 05 [ 2] 967 ldw x, (0x05, sp)
|
|
008D8C F6 [ 1] 968 ld a, (x)
|
|
008D8D 48 [ 1] 969 sll a
|
|
008D8E A4 80 [ 1] 970 and a, #0x80
|
|
008D90 1A 10 [ 1] 971 or a, (0x10, sp)
|
|
008D92 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)) | \
|
|
008D94 1E 07 [ 2] 974 ldw x, (0x07, sp)
|
|
008D96 F6 [ 1] 975 ld a, (x)
|
|
008D97 CD 92 35 [ 4] 976 call _ByteToBcd2
|
|
008D9A 6B 08 [ 1] 977 ld (0x08, sp), a
|
|
008D9C 1E 09 [ 2] 978 ldw x, (0x09, sp)
|
|
008D9E F6 [ 1] 979 ld a, (x)
|
|
008D9F 1A 08 [ 1] 980 or a, (0x08, sp)
|
|
008DA1 6B 0A [ 1] 981 ld (0x0a, sp), a
|
|
008DA3 1E 05 [ 2] 982 ldw x, (0x05, sp)
|
|
008DA5 F6 [ 1] 983 ld a, (x)
|
|
008DA6 48 [ 1] 984 sll a
|
|
008DA7 48 [ 1] 985 sll a
|
|
008DA8 A4 80 [ 1] 986 and a, #0x80
|
|
008DAA 1A 0A [ 1] 987 or a, (0x0a, sp)
|
|
008DAC 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)) | \
|
|
008DAE 1E 0B [ 2] 990 ldw x, (0x0b, sp)
|
|
008DB0 F6 [ 1] 991 ld a, (x)
|
|
008DB1 CD 92 35 [ 4] 992 call _ByteToBcd2
|
|
008DB4 6B 0C [ 1] 993 ld (0x0c, sp), a
|
|
008DB6 1E 0D [ 2] 994 ldw x, (0x0d, sp)
|
|
008DB8 F6 [ 1] 995 ld a, (x)
|
|
008DB9 1A 0C [ 1] 996 or a, (0x0c, sp)
|
|
008DBB 6B 0E [ 1] 997 ld (0x0e, sp), a
|
|
008DBD 1E 05 [ 2] 998 ldw x, (0x05, sp)
|
|
008DBF F6 [ 1] 999 ld a, (x)
|
|
008DC0 48 [ 1] 1000 sll a
|
|
008DC1 48 [ 1] 1001 sll a
|
|
008DC2 48 [ 1] 1002 sll a
|
|
008DC3 A4 80 [ 1] 1003 and a, #0x80
|
|
008DC5 1A 0E [ 1] 1004 or a, (0x0e, sp)
|
|
008DC7 1005 00117$:
|
|
1006 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1148: RTC->ALRMAR1 = tmpreg1;
|
|
008DC7 AE 51 5C [ 2] 1007 ldw x, #0x515c
|
|
008DCA 88 [ 1] 1008 push a
|
|
008DCB 7B 10 [ 1] 1009 ld a, (0x10, sp)
|
|
008DCD F7 [ 1] 1010 ld (x), a
|
|
008DCE 84 [ 1] 1011 pop a
|
|
1012 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1149: RTC->ALRMAR2 = tmpreg2;
|
|
008DCF AE 51 5D [ 2] 1013 ldw x, #0x515d
|
|
008DD2 88 [ 1] 1014 push a
|
|
008DD3 7B 11 [ 1] 1015 ld a, (0x11, sp)
|
|
008DD5 F7 [ 1] 1016 ld (x), a
|
|
008DD6 84 [ 1] 1017 pop a
|
|
1018 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1150: RTC->ALRMAR3 = tmpreg3;
|
|
008DD7 AE 51 5E [ 2] 1019 ldw x, #0x515e
|
|
008DDA 88 [ 1] 1020 push a
|
|
008DDB 7B 0B [ 1] 1021 ld a, (0x0b, sp)
|
|
008DDD F7 [ 1] 1022 ld (x), a
|
|
008DDE 84 [ 1] 1023 pop a
|
|
1024 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1151: RTC->ALRMAR4 = tmpreg4;
|
|
008DDF C7 51 5F [ 1] 1025 ld 0x515f, a
|
|
1026 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1154: RTC->WPR = 0xFF;
|
|
008DE2 35 FF 51 59 [ 1] 1027 mov 0x5159+0, #0xff
|
|
1028 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1155: }
|
|
008DE6 5B 11 [ 2] 1029 addw sp, #17
|
|
008DE8 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 ; -----------------------------------------
|
|
008DE9 1035 _RTC_AlarmStructInit:
|
|
1036 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1168: RTC_AlarmStruct->RTC_AlarmTime.RTC_H12 = RTC_H12_AM;
|
|
008DE9 90 93 [ 1] 1037 ldw y, x
|
|
008DEB 6F 03 [ 1] 1038 clr (0x0003, x)
|
|
1039 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1169: RTC_AlarmStruct->RTC_AlarmTime.RTC_Hours = 0;
|
|
008DED 90 7F [ 1] 1040 clr (y)
|
|
1041 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1170: RTC_AlarmStruct->RTC_AlarmTime.RTC_Minutes = 0;
|
|
008DEF 93 [ 1] 1042 ldw x, y
|
|
008DF0 6F 01 [ 1] 1043 clr (0x01, x)
|
|
1044 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1171: RTC_AlarmStruct->RTC_AlarmTime.RTC_Seconds = 0;
|
|
008DF2 93 [ 1] 1045 ldw x, y
|
|
008DF3 6F 02 [ 1] 1046 clr (0x02, x)
|
|
1047 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1174: RTC_AlarmStruct->RTC_AlarmDateWeekDaySel = RTC_AlarmDateWeekDaySel_Date;
|
|
008DF5 93 [ 1] 1048 ldw x, y
|
|
008DF6 6F 05 [ 1] 1049 clr (0x0005, x)
|
|
1050 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1175: RTC_AlarmStruct->RTC_AlarmDateWeekDay = 1;
|
|
008DF8 A6 01 [ 1] 1051 ld a, #0x01
|
|
008DFA 90 E7 06 [ 1] 1052 ld (0x0006, y), a
|
|
1053 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1178: RTC_AlarmStruct->RTC_AlarmMask = RTC_AlarmMask_All;
|
|
008DFD A6 F0 [ 1] 1054 ld a, #0xf0
|
|
008DFF 90 E7 04 [ 1] 1055 ld (0x0004, y), a
|
|
1056 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1179: }
|
|
008E02 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 ; -----------------------------------------
|
|
008E03 1062 _RTC_GetAlarm:
|
|
008E03 52 0B [ 2] 1063 sub sp, #11
|
|
008E05 6B 0B [ 1] 1064 ld (0x0b, sp), a
|
|
008E07 1F 09 [ 2] 1065 ldw (0x09, sp), x
|
|
1066 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1201: tmpreg1 = (uint8_t)RTC->ALRMAR1;
|
|
008E09 C6 51 5C [ 1] 1067 ld a, 0x515c
|
|
008E0C 6B 08 [ 1] 1068 ld (0x08, sp), a
|
|
1069 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1202: tmpreg2 = (uint8_t)RTC->ALRMAR2;
|
|
008E0E C6 51 5D [ 1] 1070 ld a, 0x515d
|
|
008E11 6B 01 [ 1] 1071 ld (0x01, sp), a
|
|
1072 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1203: tmpreg3 = (uint8_t)RTC->ALRMAR3;
|
|
008E13 C6 51 5E [ 1] 1073 ld a, 0x515e
|
|
008E16 6B 02 [ 1] 1074 ld (0x02, sp), a
|
|
1075 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1204: tmpreg4 = (uint8_t)RTC->ALRMAR4;
|
|
008E18 C6 51 5F [ 1] 1076 ld a, 0x515f
|
|
008E1B 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));
|
|
008E1D 1E 09 [ 2] 1079 ldw x, (0x09, sp)
|
|
008E1F 5C [ 1] 1080 incw x
|
|
008E20 5C [ 1] 1081 incw x
|
|
008E21 1F 04 [ 2] 1082 ldw (0x04, sp), x
|
|
008E23 7B 08 [ 1] 1083 ld a, (0x08, sp)
|
|
008E25 A4 7F [ 1] 1084 and a, #0x7f
|
|
008E27 1E 04 [ 2] 1085 ldw x, (0x04, sp)
|
|
008E29 F7 [ 1] 1086 ld (x), a
|
|
1087 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1208: alarmmask = (uint8_t)(tmpreg1 & RTC_ALRMAR1_MSK1);
|
|
008E2A 7B 08 [ 1] 1088 ld a, (0x08, sp)
|
|
008E2C A4 80 [ 1] 1089 and a, #0x80
|
|
008E2E 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));
|
|
008E30 1E 09 [ 2] 1092 ldw x, (0x09, sp)
|
|
008E32 5C [ 1] 1093 incw x
|
|
008E33 1F 06 [ 2] 1094 ldw (0x06, sp), x
|
|
008E35 7B 01 [ 1] 1095 ld a, (0x01, sp)
|
|
008E37 A4 7F [ 1] 1096 and a, #0x7f
|
|
008E39 1E 06 [ 2] 1097 ldw x, (0x06, sp)
|
|
008E3B 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));
|
|
008E3C 7B 01 [ 1] 1100 ld a, (0x01, sp)
|
|
008E3E A4 80 [ 1] 1101 and a, #0x80
|
|
008E40 44 [ 1] 1102 srl a
|
|
008E41 1A 08 [ 1] 1103 or a, (0x08, sp)
|
|
008E43 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));
|
|
008E45 16 09 [ 2] 1106 ldw y, (0x09, sp)
|
|
008E47 7B 02 [ 1] 1107 ld a, (0x02, sp)
|
|
008E49 A4 3F [ 1] 1108 and a, #0x3f
|
|
008E4B 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);
|
|
008E4D 1E 09 [ 2] 1111 ldw x, (0x09, sp)
|
|
008E4F 1C 00 03 [ 2] 1112 addw x, #0x0003
|
|
008E52 7B 02 [ 1] 1113 ld a, (0x02, sp)
|
|
008E54 A4 40 [ 1] 1114 and a, #0x40
|
|
008E56 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));
|
|
008E57 7B 02 [ 1] 1117 ld a, (0x02, sp)
|
|
008E59 A4 80 [ 1] 1118 and a, #0x80
|
|
008E5B 44 [ 1] 1119 srl a
|
|
008E5C 44 [ 1] 1120 srl a
|
|
008E5D 1A 08 [ 1] 1121 or a, (0x08, sp)
|
|
008E5F 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));
|
|
008E61 1E 09 [ 2] 1124 ldw x, (0x09, sp)
|
|
008E63 1C 00 06 [ 2] 1125 addw x, #0x0006
|
|
008E66 1F 01 [ 2] 1126 ldw (0x01, sp), x
|
|
008E68 7B 03 [ 1] 1127 ld a, (0x03, sp)
|
|
008E6A A4 3F [ 1] 1128 and a, #0x3f
|
|
008E6C 1E 01 [ 2] 1129 ldw x, (0x01, sp)
|
|
008E6E 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);
|
|
008E6F 1E 09 [ 2] 1132 ldw x, (0x09, sp)
|
|
008E71 1C 00 05 [ 2] 1133 addw x, #0x0005
|
|
008E74 7B 03 [ 1] 1134 ld a, (0x03, sp)
|
|
008E76 A4 40 [ 1] 1135 and a, #0x40
|
|
008E78 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));
|
|
008E79 7B 03 [ 1] 1138 ld a, (0x03, sp)
|
|
008E7B A4 80 [ 1] 1139 and a, #0x80
|
|
008E7D 44 [ 1] 1140 srl a
|
|
008E7E 44 [ 1] 1141 srl a
|
|
008E7F 44 [ 1] 1142 srl a
|
|
008E80 1A 08 [ 1] 1143 or a, (0x08, sp)
|
|
1144 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1224: RTC_AlarmStruct->RTC_AlarmMask = alarmmask;
|
|
008E82 1E 09 [ 2] 1145 ldw x, (0x09, sp)
|
|
008E84 1C 00 04 [ 2] 1146 addw x, #0x0004
|
|
008E87 F7 [ 1] 1147 ld (x), a
|
|
1148 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1226: if (RTC_Format == RTC_Format_BIN)
|
|
008E88 0D 0B [ 1] 1149 tnz (0x0b, sp)
|
|
008E8A 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);
|
|
008E8C 90 F6 [ 1] 1152 ld a, (y)
|
|
008E8E 90 89 [ 2] 1153 pushw y
|
|
008E90 CD 92 48 [ 4] 1154 call _Bcd2ToByte
|
|
008E93 90 85 [ 2] 1155 popw y
|
|
008E95 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);
|
|
008E97 1E 06 [ 2] 1158 ldw x, (0x06, sp)
|
|
008E99 F6 [ 1] 1159 ld a, (x)
|
|
008E9A CD 92 48 [ 4] 1160 call _Bcd2ToByte
|
|
008E9D 1E 06 [ 2] 1161 ldw x, (0x06, sp)
|
|
008E9F 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);
|
|
008EA0 1E 04 [ 2] 1164 ldw x, (0x04, sp)
|
|
008EA2 F6 [ 1] 1165 ld a, (x)
|
|
008EA3 CD 92 48 [ 4] 1166 call _Bcd2ToByte
|
|
008EA6 1E 04 [ 2] 1167 ldw x, (0x04, sp)
|
|
008EA8 F7 [ 1] 1168 ld (x), a
|
|
1169 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1231: RTC_AlarmStruct->RTC_AlarmDateWeekDay = Bcd2ToByte(RTC_AlarmStruct->RTC_AlarmDateWeekDay);
|
|
008EA9 1E 01 [ 2] 1170 ldw x, (0x01, sp)
|
|
008EAB F6 [ 1] 1171 ld a, (x)
|
|
008EAC CD 92 48 [ 4] 1172 call _Bcd2ToByte
|
|
008EAF 1E 01 [ 2] 1173 ldw x, (0x01, sp)
|
|
008EB1 F7 [ 1] 1174 ld (x), a
|
|
008EB2 1175 00103$:
|
|
1176 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1233: }
|
|
008EB2 5B 0B [ 2] 1177 addw sp, #11
|
|
008EB4 81 [ 4] 1178 ret
|
|
1179 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1242: ErrorStatus RTC_AlarmCmd(FunctionalState NewState)
|
|
1180 ; -----------------------------------------
|
|
1181 ; function RTC_AlarmCmd
|
|
1182 ; -----------------------------------------
|
|
008EB5 1183 _RTC_AlarmCmd:
|
|
008EB5 52 03 [ 2] 1184 sub sp, #3
|
|
008EB7 6B 03 [ 1] 1185 ld (0x03, sp), a
|
|
1186 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1244: __IO uint16_t alrawfcount = 0;
|
|
008EB9 5F [ 1] 1187 clrw x
|
|
008EBA 1F 01 [ 2] 1188 ldw (0x01, sp), x
|
|
1189 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1252: RTC->WPR = 0xCA;
|
|
008EBC 35 CA 51 59 [ 1] 1190 mov 0x5159+0, #0xca
|
|
1191 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1253: RTC->WPR = 0x53;
|
|
008EC0 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);
|
|
008EC4 C6 51 49 [ 1] 1194 ld a, 0x5149
|
|
1195 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1256: if (NewState != DISABLE)
|
|
008EC7 0D 03 [ 1] 1196 tnz (0x03, sp)
|
|
008EC9 27 09 [ 1] 1197 jreq 00109$
|
|
1198 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1258: RTC->CR2 |= (uint8_t)(RTC_CR2_ALRAE);
|
|
008ECB AA 01 [ 1] 1199 or a, #0x01
|
|
008ECD C7 51 49 [ 1] 1200 ld 0x5149, a
|
|
1201 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1259: status = SUCCESS;
|
|
008ED0 A6 01 [ 1] 1202 ld a, #0x01
|
|
008ED2 20 22 [ 2] 1203 jra 00110$
|
|
008ED4 1204 00109$:
|
|
1205 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1263: RTC->CR2 &= (uint8_t)~(RTC_CR2_ALRAE) ;
|
|
008ED4 A4 FE [ 1] 1206 and a, #0xfe
|
|
008ED6 C7 51 49 [ 1] 1207 ld 0x5149, a
|
|
1208 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1266: temp1 = (uint8_t)(RTC->ISR1 & RTC_ISR1_ALRAWF);
|
|
008ED9 C6 51 4C [ 1] 1209 ld a, 0x514c
|
|
008EDC A4 01 [ 1] 1210 and a, #0x01
|
|
1211 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1267: while ((alrawfcount != ALRAWF_TIMEOUT) && (temp1 == RESET))
|
|
008EDE 1212 00102$:
|
|
008EDE 1E 01 [ 2] 1213 ldw x, (0x01, sp)
|
|
008EE0 5C [ 1] 1214 incw x
|
|
008EE1 27 0A [ 1] 1215 jreq 00104$
|
|
008EE3 4D [ 1] 1216 tnz a
|
|
008EE4 26 07 [ 1] 1217 jrne 00104$
|
|
1218 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1269: alrawfcount++;
|
|
008EE6 1E 01 [ 2] 1219 ldw x, (0x01, sp)
|
|
008EE8 5C [ 1] 1220 incw x
|
|
008EE9 1F 01 [ 2] 1221 ldw (0x01, sp), x
|
|
008EEB 20 F1 [ 2] 1222 jra 00102$
|
|
008EED 1223 00104$:
|
|
1224 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1272: if ((RTC->ISR1 & RTC_ISR1_ALRAWF) == RESET)
|
|
008EED 72 00 51 4C 02 [ 2] 1225 btjt 0x514c, #0, 00106$
|
|
1226 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1274: status = ERROR;
|
|
008EF2 4F [ 1] 1227 clr a
|
|
1228 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1278: status = SUCCESS;
|
|
008EF3 C5 1229 .byte 0xc5
|
|
008EF4 1230 00106$:
|
|
008EF4 A6 01 [ 1] 1231 ld a, #0x01
|
|
008EF6 1232 00110$:
|
|
1233 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1283: RTC->WPR = 0xFF;
|
|
008EF6 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: }
|
|
008EFA 5B 03 [ 2] 1237 addw sp, #3
|
|
008EFC 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 ; -----------------------------------------
|
|
008EFD 1243 _RTC_AlarmSubSecondConfig:
|
|
008EFD 89 [ 2] 1244 pushw x
|
|
008EFE 6B 02 [ 1] 1245 ld (0x02, sp), a
|
|
1246 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1309: RTC->WPR = 0xCA;
|
|
008F00 35 CA 51 59 [ 1] 1247 mov 0x5159+0, #0xca
|
|
1248 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1310: RTC->WPR = 0x53;
|
|
008F04 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)
|
|
008F08 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);
|
|
008F0D C6 51 49 [ 1] 1253 ld a, 0x5149
|
|
008F10 AA 01 [ 1] 1254 or a, #0x01
|
|
008F12 6B 01 [ 1] 1255 ld (0x01, sp), a
|
|
1256 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1319: RTC->CR2 &= (uint8_t)~(RTC_CR2_ALRAE);
|
|
008F14 72 11 51 49 [ 1] 1257 bres 0x5149, #0
|
|
1258 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1322: RTC->ALRMASSRH = (uint8_t)(RTC_AlarmSubSecondValue >> 8);
|
|
008F18 9E [ 1] 1259 ld a, xh
|
|
008F19 C7 51 64 [ 1] 1260 ld 0x5164, a
|
|
1261 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1323: RTC->ALRMASSRL = (uint8_t)(RTC_AlarmSubSecondValue);
|
|
008F1C 9F [ 1] 1262 ld a, xl
|
|
008F1D C7 51 65 [ 1] 1263 ld 0x5165, a
|
|
1264 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1324: RTC->ALRMASSMSKR = (uint8_t)RTC_AlarmSubSecondMask;
|
|
008F20 AE 51 66 [ 2] 1265 ldw x, #0x5166
|
|
008F23 7B 02 [ 1] 1266 ld a, (0x02, sp)
|
|
008F25 F7 [ 1] 1267 ld (x), a
|
|
1268 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1327: RTC->CR2 |= alarmstatus;
|
|
008F26 C6 51 49 [ 1] 1269 ld a, 0x5149
|
|
008F29 1A 01 [ 1] 1270 or a, (0x01, sp)
|
|
008F2B C7 51 49 [ 1] 1271 ld 0x5149, a
|
|
1272 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1329: status = SUCCESS;
|
|
008F2E A6 01 [ 1] 1273 ld a, #0x01
|
|
1274 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1333: status = ERROR;
|
|
008F30 21 1275 .byte 0x21
|
|
008F31 1276 00102$:
|
|
008F31 4F [ 1] 1277 clr a
|
|
008F32 1278 00103$:
|
|
1279 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1337: RTC->WPR = 0xFF;
|
|
008F32 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: }
|
|
008F36 85 [ 2] 1283 popw x
|
|
008F37 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 ; -----------------------------------------
|
|
008F38 1289 _RTC_WakeUpClockConfig:
|
|
008F38 88 [ 1] 1290 push a
|
|
008F39 6B 01 [ 1] 1291 ld (0x01, sp), a
|
|
1292 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1376: RTC->WPR = 0xCA;
|
|
008F3B 35 CA 51 59 [ 1] 1293 mov 0x5159+0, #0xca
|
|
1294 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1377: RTC->WPR = 0x53;
|
|
008F3F 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;
|
|
008F43 72 15 51 49 [ 1] 1297 bres 0x5149, #2
|
|
1298 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1383: RTC->CR1 &= (uint8_t)~RTC_CR1_WUCKSEL;
|
|
008F47 C6 51 48 [ 1] 1299 ld a, 0x5148
|
|
008F4A A4 F8 [ 1] 1300 and a, #0xf8
|
|
008F4C C7 51 48 [ 1] 1301 ld 0x5148, a
|
|
1302 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1386: RTC->CR1 |= (uint8_t)RTC_WakeUpClock;
|
|
008F4F C6 51 48 [ 1] 1303 ld a, 0x5148
|
|
008F52 1A 01 [ 1] 1304 or a, (0x01, sp)
|
|
008F54 C7 51 48 [ 1] 1305 ld 0x5148, a
|
|
1306 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1389: RTC->WPR = 0xFF;
|
|
008F57 35 FF 51 59 [ 1] 1307 mov 0x5159+0, #0xff
|
|
1308 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1390: }
|
|
008F5B 84 [ 1] 1309 pop a
|
|
008F5C 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 ; -----------------------------------------
|
|
008F5D 1315 _RTC_SetWakeUpCounter:
|
|
1316 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1403: RTC->WPR = 0xCA;
|
|
008F5D 35 CA 51 59 [ 1] 1317 mov 0x5159+0, #0xca
|
|
1318 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1404: RTC->WPR = 0x53;
|
|
008F61 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);
|
|
008F65 9E [ 1] 1321 ld a, xh
|
|
008F66 C7 51 54 [ 1] 1322 ld 0x5154, a
|
|
1323 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1409: RTC->WUTRL = (uint8_t)(RTC_WakeupCounter);
|
|
008F69 9F [ 1] 1324 ld a, xl
|
|
008F6A C7 51 55 [ 1] 1325 ld 0x5155, a
|
|
1326 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1412: RTC->WPR = 0xFF;
|
|
008F6D 35 FF 51 59 [ 1] 1327 mov 0x5159+0, #0xff
|
|
1328 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1413: }
|
|
008F71 81 [ 4] 1329 ret
|
|
1330 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1420: uint16_t RTC_GetWakeUpCounter(void)
|
|
1331 ; -----------------------------------------
|
|
1332 ; function RTC_GetWakeUpCounter
|
|
1333 ; -----------------------------------------
|
|
008F72 1334 _RTC_GetWakeUpCounter:
|
|
008F72 89 [ 2] 1335 pushw x
|
|
1336 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1425: tmpreg = ((uint16_t)RTC->WUTRH) << 8;
|
|
008F73 C6 51 54 [ 1] 1337 ld a, 0x5154
|
|
008F76 95 [ 1] 1338 ld xh, a
|
|
008F77 0F 02 [ 1] 1339 clr (0x02, sp)
|
|
1340 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1426: tmpreg |= RTC->WUTRL;
|
|
008F79 C6 51 55 [ 1] 1341 ld a, 0x5155
|
|
1342 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1429: return (uint16_t)tmpreg;
|
|
008F7C 97 [ 1] 1343 ld xl, a
|
|
1344 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1430: }
|
|
008F7D 5B 02 [ 2] 1345 addw sp, #2
|
|
008F7F 81 [ 4] 1346 ret
|
|
1347 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1440: ErrorStatus RTC_WakeUpCmd(FunctionalState NewState)
|
|
1348 ; -----------------------------------------
|
|
1349 ; function RTC_WakeUpCmd
|
|
1350 ; -----------------------------------------
|
|
008F80 1351 _RTC_WakeUpCmd:
|
|
008F80 88 [ 1] 1352 push a
|
|
008F81 6B 01 [ 1] 1353 ld (0x01, sp), a
|
|
1354 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1449: RTC->WPR = 0xCA;
|
|
008F83 35 CA 51 59 [ 1] 1355 mov 0x5159+0, #0xca
|
|
1356 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1450: RTC->WPR = 0x53;
|
|
008F87 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;
|
|
008F8B C6 51 49 [ 1] 1359 ld a, 0x5149
|
|
1360 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1452: if (NewState != DISABLE)
|
|
008F8E 0D 01 [ 1] 1361 tnz (0x01, sp)
|
|
008F90 27 09 [ 1] 1362 jreq 00109$
|
|
1363 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1455: RTC->CR2 |= (uint8_t)RTC_CR2_WUTE;
|
|
008F92 AA 04 [ 1] 1364 or a, #0x04
|
|
008F94 C7 51 49 [ 1] 1365 ld 0x5149, a
|
|
1366 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1457: status = SUCCESS;
|
|
008F97 A6 01 [ 1] 1367 ld a, #0x01
|
|
008F99 20 1C [ 2] 1368 jra 00110$
|
|
008F9B 1369 00109$:
|
|
1370 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1462: RTC->CR2 &= (uint8_t)~RTC_CR2_WUTE;
|
|
008F9B A4 FB [ 1] 1371 and a, #0xfb
|
|
008F9D 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))
|
|
008FA0 5F [ 1] 1374 clrw x
|
|
008FA1 1375 00102$:
|
|
008FA1 72 04 51 4C 08 [ 2] 1376 btjt 0x514c, #2, 00104$
|
|
008FA6 A3 FF FF [ 2] 1377 cpw x, #0xffff
|
|
008FA9 27 03 [ 1] 1378 jreq 00104$
|
|
1379 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1467: wutwfcount++;
|
|
008FAB 5C [ 1] 1380 incw x
|
|
008FAC 20 F3 [ 2] 1381 jra 00102$
|
|
008FAE 1382 00104$:
|
|
1383 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1471: if ((RTC->ISR1 & RTC_ISR1_WUTWF) == RESET)
|
|
008FAE 72 04 51 4C 02 [ 2] 1384 btjt 0x514c, #2, 00106$
|
|
1385 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1473: status = ERROR;
|
|
008FB3 4F [ 1] 1386 clr a
|
|
1387 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1477: status = SUCCESS;
|
|
008FB4 C5 1388 .byte 0xc5
|
|
008FB5 1389 00106$:
|
|
008FB5 A6 01 [ 1] 1390 ld a, #0x01
|
|
008FB7 1391 00110$:
|
|
1392 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1482: RTC->WPR = 0xFF;
|
|
008FB7 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: }
|
|
008FBB 5B 01 [ 2] 1396 addw sp, #1
|
|
008FBD 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 ; -----------------------------------------
|
|
008FBE 1402 _RTC_DayLightSavingConfig:
|
|
008FBE 88 [ 1] 1403 push a
|
|
008FBF 97 [ 1] 1404 ld xl, a
|
|
1405 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1530: RTC->WPR = 0xCA;
|
|
008FC0 35 CA 51 59 [ 1] 1406 mov 0x5159+0, #0xca
|
|
1407 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1531: RTC->WPR = 0x53;
|
|
008FC4 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);
|
|
008FC8 C6 51 4A [ 1] 1410 ld a, 0x514a
|
|
008FCB A4 FB [ 1] 1411 and a, #0xfb
|
|
008FCD 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);
|
|
008FD0 C6 51 4A [ 1] 1414 ld a, 0x514a
|
|
008FD3 6B 01 [ 1] 1415 ld (0x01, sp), a
|
|
008FD5 9F [ 1] 1416 ld a, xl
|
|
008FD6 1A 04 [ 1] 1417 or a, (0x04, sp)
|
|
008FD8 1A 01 [ 1] 1418 or a, (0x01, sp)
|
|
008FDA C7 51 4A [ 1] 1419 ld 0x514a, a
|
|
1420 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1540: RTC->WPR = 0xFF;
|
|
008FDD 35 FF 51 59 [ 1] 1421 mov 0x5159+0, #0xff
|
|
1422 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1541: }
|
|
008FE1 84 [ 1] 1423 pop a
|
|
008FE2 85 [ 2] 1424 popw x
|
|
008FE3 84 [ 1] 1425 pop a
|
|
008FE4 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 ; -----------------------------------------
|
|
008FE5 1431 _RTC_GetStoreOperation:
|
|
1432 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1552: return (RTC_StoreOperation_TypeDef)(RTC->CR3 & RTC_CR3_BCK);
|
|
008FE5 C6 51 4A [ 1] 1433 ld a, 0x514a
|
|
008FE8 A4 04 [ 1] 1434 and a, #0x04
|
|
1435 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1553: }
|
|
008FEA 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 ; -----------------------------------------
|
|
008FEB 1441 _RTC_OutputConfig:
|
|
008FEB 88 [ 1] 1442 push a
|
|
008FEC 97 [ 1] 1443 ld xl, a
|
|
1444 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1595: RTC->WPR = 0xCA;
|
|
008FED 35 CA 51 59 [ 1] 1445 mov 0x5159+0, #0xca
|
|
1446 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1596: RTC->WPR = 0x53;
|
|
008FF1 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);
|
|
008FF5 C6 51 4A [ 1] 1449 ld a, 0x514a
|
|
008FF8 A4 8F [ 1] 1450 and a, #0x8f
|
|
008FFA 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);
|
|
008FFD C6 51 4A [ 1] 1453 ld a, 0x514a
|
|
009000 6B 01 [ 1] 1454 ld (0x01, sp), a
|
|
009002 9F [ 1] 1455 ld a, xl
|
|
009003 1A 04 [ 1] 1456 or a, (0x04, sp)
|
|
009005 1A 01 [ 1] 1457 or a, (0x01, sp)
|
|
009007 C7 51 4A [ 1] 1458 ld 0x514a, a
|
|
1459 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1605: RTC->WPR = 0xFF;
|
|
00900A 35 FF 51 59 [ 1] 1460 mov 0x5159+0, #0xff
|
|
1461 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1606: }
|
|
00900E 84 [ 1] 1462 pop a
|
|
00900F 85 [ 2] 1463 popw x
|
|
009010 84 [ 1] 1464 pop a
|
|
009011 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 ; -----------------------------------------
|
|
009012 1470 _RTC_SynchroShiftConfig:
|
|
009012 88 [ 1] 1471 push a
|
|
009013 6B 01 [ 1] 1472 ld (0x01, sp), a
|
|
009015 51 [ 1] 1473 exgw x, y
|
|
1474 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1651: RTC->WPR = 0xCA;
|
|
009016 35 CA 51 59 [ 1] 1475 mov 0x5159+0, #0xca
|
|
1476 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1652: RTC->WPR = 0x53;
|
|
00901A 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)
|
|
00901E 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))
|
|
009023 5F [ 1] 1481 clrw x
|
|
009024 1482 00102$:
|
|
009024 72 07 51 4C 08 [ 2] 1483 btjf 0x514c, #3, 00106$
|
|
009029 A3 FF FF [ 2] 1484 cpw x, #0xffff
|
|
00902C 27 03 [ 1] 1485 jreq 00106$
|
|
1486 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1660: shpfcount++;
|
|
00902E 5C [ 1] 1487 incw x
|
|
00902F 20 F3 [ 2] 1488 jra 00102$
|
|
009031 1489 00106$:
|
|
1490 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1665: if ((RTC->ISR1 & RTC_ISR1_SHPF) == RESET)
|
|
009031 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));
|
|
009036 90 9E [ 1] 1493 ld a, yh
|
|
009038 1A 01 [ 1] 1494 or a, (0x01, sp)
|
|
1495 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1669: RTC->SHIFTRH = (uint8_t)(shiftrhreg);
|
|
00903A C7 51 5A [ 1] 1496 ld 0x515a, a
|
|
1497 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1670: RTC->SHIFTRL = (uint8_t)(RTC_ShiftSubFS);
|
|
00903D 90 9F [ 1] 1498 ld a, yl
|
|
00903F C7 51 5B [ 1] 1499 ld 0x515b, a
|
|
1500 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1672: status = SUCCESS;
|
|
009042 A6 01 [ 1] 1501 ld a, #0x01
|
|
1502 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1676: status = ERROR;
|
|
009044 21 1503 .byte 0x21
|
|
009045 1504 00108$:
|
|
009045 4F [ 1] 1505 clr a
|
|
009046 1506 00109$:
|
|
1507 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1680: RTC->WPR = 0xFF;
|
|
009046 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: }
|
|
00904A 5B 01 [ 2] 1511 addw sp, #1
|
|
00904C 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 ; -----------------------------------------
|
|
00904D 1517 _RTC_SmoothCalibConfig:
|
|
00904D 88 [ 1] 1518 push a
|
|
00904E 90 97 [ 1] 1519 ld yl, a
|
|
1520 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1731: RTC->WPR = 0xCA;
|
|
009050 35 CA 51 59 [ 1] 1521 mov 0x5159+0, #0xca
|
|
1522 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1732: RTC->WPR = 0x53;
|
|
009054 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)
|
|
009058 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))
|
|
00905D 5F [ 1] 1527 clrw x
|
|
00905E 1528 00102$:
|
|
00905E 72 03 51 4C 08 [ 2] 1529 btjf 0x514c, #1, 00106$
|
|
009063 A3 FF FF [ 2] 1530 cpw x, #0xffff
|
|
009066 27 03 [ 1] 1531 jreq 00106$
|
|
1532 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1740: recalpfcount++;
|
|
009068 5C [ 1] 1533 incw x
|
|
009069 20 F3 [ 2] 1534 jra 00102$
|
|
00906B 1535 00106$:
|
|
1536 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1746: if ((RTC->ISR1 & RTC_ISR1_RECALPF) == RESET)
|
|
00906B 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 | \
|
|
009070 90 9F [ 1] 1539 ld a, yl
|
|
009072 1A 04 [ 1] 1540 or a, (0x04, sp)
|
|
009074 6B 01 [ 1] 1541 ld (0x01, sp), a
|
|
009076 7B 05 [ 1] 1542 ld a, (0x05, sp)
|
|
009078 1A 01 [ 1] 1543 or a, (0x01, sp)
|
|
00907A C7 51 6A [ 1] 1544 ld 0x516a, a
|
|
1545 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1752: RTC->CALRL = (uint8_t)(RTC_SmouthCalibMinusPulsesValue);
|
|
00907D 7B 06 [ 1] 1546 ld a, (0x06, sp)
|
|
00907F C7 51 6B [ 1] 1547 ld 0x516b, a
|
|
1548 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1754: status = SUCCESS;
|
|
009082 A6 01 [ 1] 1549 ld a, #0x01
|
|
1550 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1758: status = ERROR;
|
|
009084 21 1551 .byte 0x21
|
|
009085 1552 00108$:
|
|
009085 4F [ 1] 1553 clr a
|
|
009086 1554 00109$:
|
|
1555 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1762: RTC->WPR = 0xFF;
|
|
009086 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: }
|
|
00908A 1E 02 [ 2] 1559 ldw x, (2, sp)
|
|
00908C 5B 06 [ 2] 1560 addw sp, #6
|
|
00908E 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 ; -----------------------------------------
|
|
00908F 1566 _RTC_CalibOutputConfig:
|
|
00908F 88 [ 1] 1567 push a
|
|
009090 6B 01 [ 1] 1568 ld (0x01, sp), a
|
|
1569 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1796: RTC->WPR = 0xCA;
|
|
009092 35 CA 51 59 [ 1] 1570 mov 0x5159+0, #0xca
|
|
1571 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1797: RTC->WPR = 0x53;
|
|
009096 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;
|
|
00909A C6 51 4A [ 1] 1574 ld a, 0x514a
|
|
1575 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1799: if (RTC_CalibOutput != RTC_CalibOutput_512Hz)
|
|
00909D 0D 01 [ 1] 1576 tnz (0x01, sp)
|
|
00909F 27 07 [ 1] 1577 jreq 00102$
|
|
1578 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1802: RTC->CR3 |= (uint8_t)RTC_CR3_COSEL;
|
|
0090A1 AA 08 [ 1] 1579 or a, #0x08
|
|
0090A3 C7 51 4A [ 1] 1580 ld 0x514a, a
|
|
0090A6 20 05 [ 2] 1581 jra 00103$
|
|
0090A8 1582 00102$:
|
|
1583 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1807: RTC->CR3 &= (uint8_t)~RTC_CR3_COSEL;
|
|
0090A8 A4 F7 [ 1] 1584 and a, #0xf7
|
|
0090AA C7 51 4A [ 1] 1585 ld 0x514a, a
|
|
0090AD 1586 00103$:
|
|
1587 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1811: RTC->WPR = 0xFF;
|
|
0090AD 35 FF 51 59 [ 1] 1588 mov 0x5159+0, #0xff
|
|
1589 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1812: }
|
|
0090B1 84 [ 1] 1590 pop a
|
|
0090B2 81 [ 4] 1591 ret
|
|
1592 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1820: void RTC_CalibOutputCmd(FunctionalState NewState)
|
|
1593 ; -----------------------------------------
|
|
1594 ; function RTC_CalibOutputCmd
|
|
1595 ; -----------------------------------------
|
|
0090B3 1596 _RTC_CalibOutputCmd:
|
|
0090B3 88 [ 1] 1597 push a
|
|
0090B4 6B 01 [ 1] 1598 ld (0x01, sp), a
|
|
1599 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1826: RTC->WPR = 0xCA;
|
|
0090B6 35 CA 51 59 [ 1] 1600 mov 0x5159+0, #0xca
|
|
1601 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1827: RTC->WPR = 0x53;
|
|
0090BA 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;
|
|
0090BE C6 51 4A [ 1] 1604 ld a, 0x514a
|
|
1605 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1829: if (NewState != DISABLE)
|
|
0090C1 0D 01 [ 1] 1606 tnz (0x01, sp)
|
|
0090C3 27 07 [ 1] 1607 jreq 00102$
|
|
1608 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1832: RTC->CR3 |= (uint8_t)RTC_CR3_COE;
|
|
0090C5 AA 80 [ 1] 1609 or a, #0x80
|
|
0090C7 C7 51 4A [ 1] 1610 ld 0x514a, a
|
|
0090CA 20 05 [ 2] 1611 jra 00103$
|
|
0090CC 1612 00102$:
|
|
1613 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1837: RTC->CR3 &= (uint8_t)~RTC_CR3_COE;
|
|
0090CC A4 7F [ 1] 1614 and a, #0x7f
|
|
0090CE C7 51 4A [ 1] 1615 ld 0x514a, a
|
|
0090D1 1616 00103$:
|
|
1617 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1841: RTC->WPR = 0xFF;
|
|
0090D1 35 FF 51 59 [ 1] 1618 mov 0x5159+0, #0xff
|
|
1619 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1842: }
|
|
0090D5 84 [ 1] 1620 pop a
|
|
0090D6 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 ; -----------------------------------------
|
|
0090D7 1626 _RTC_TamperLevelConfig:
|
|
0090D7 88 [ 1] 1627 push a
|
|
0090D8 97 [ 1] 1628 ld xl, a
|
|
1629 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1879: RTC->WPR = 0xCA;
|
|
0090D9 35 CA 51 59 [ 1] 1630 mov 0x5159+0, #0xca
|
|
1631 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1880: RTC->WPR = 0x53;
|
|
0090DD 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);
|
|
0090E1 C6 51 6C [ 1] 1634 ld a, 0x516c
|
|
0090E4 6B 01 [ 1] 1635 ld (0x01, sp), a
|
|
0090E6 9F [ 1] 1636 ld a, xl
|
|
0090E7 48 [ 1] 1637 sll a
|
|
1638 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1882: if (RTC_TamperLevel != RTC_TamperLevel_Low)
|
|
0090E8 0D 04 [ 1] 1639 tnz (0x04, sp)
|
|
0090EA 27 07 [ 1] 1640 jreq 00102$
|
|
1641 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1885: RTC->TCR1 |= (uint8_t)(RTC_Tamper << 1);
|
|
0090EC 1A 01 [ 1] 1642 or a, (0x01, sp)
|
|
0090EE C7 51 6C [ 1] 1643 ld 0x516c, a
|
|
0090F1 20 06 [ 2] 1644 jra 00103$
|
|
0090F3 1645 00102$:
|
|
1646 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1890: RTC->TCR1 &= (uint8_t)~(uint8_t)(RTC_Tamper << 1);
|
|
0090F3 43 [ 1] 1647 cpl a
|
|
0090F4 14 01 [ 1] 1648 and a, (0x01, sp)
|
|
0090F6 C7 51 6C [ 1] 1649 ld 0x516c, a
|
|
0090F9 1650 00103$:
|
|
1651 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1894: RTC->WPR = 0xFF;
|
|
0090F9 35 FF 51 59 [ 1] 1652 mov 0x5159+0, #0xff
|
|
1653 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1895: }
|
|
0090FD 84 [ 1] 1654 pop a
|
|
0090FE 85 [ 2] 1655 popw x
|
|
0090FF 84 [ 1] 1656 pop a
|
|
009100 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 ; -----------------------------------------
|
|
009101 1662 _RTC_TamperFilterConfig:
|
|
009101 88 [ 1] 1663 push a
|
|
009102 6B 01 [ 1] 1664 ld (0x01, sp), a
|
|
1665 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1910: RTC->WPR = 0xCA;
|
|
009104 35 CA 51 59 [ 1] 1666 mov 0x5159+0, #0xca
|
|
1667 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1911: RTC->WPR = 0x53;
|
|
009108 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);
|
|
00910C C6 51 6D [ 1] 1670 ld a, 0x516d
|
|
00910F A4 E7 [ 1] 1671 and a, #0xe7
|
|
009111 C7 51 6D [ 1] 1672 ld 0x516d, a
|
|
1673 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1917: RTC->TCR2 |= (uint8_t)RTC_TamperFilter;
|
|
009114 C6 51 6D [ 1] 1674 ld a, 0x516d
|
|
009117 1A 01 [ 1] 1675 or a, (0x01, sp)
|
|
009119 C7 51 6D [ 1] 1676 ld 0x516d, a
|
|
1677 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1920: RTC->WPR = 0xFF;
|
|
00911C 35 FF 51 59 [ 1] 1678 mov 0x5159+0, #0xff
|
|
1679 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1922: }
|
|
009120 84 [ 1] 1680 pop a
|
|
009121 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 ; -----------------------------------------
|
|
009122 1686 _RTC_TamperSamplingFreqConfig:
|
|
009122 88 [ 1] 1687 push a
|
|
009123 6B 01 [ 1] 1688 ld (0x01, sp), a
|
|
1689 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1937: RTC->WPR = 0xCA;
|
|
009125 35 CA 51 59 [ 1] 1690 mov 0x5159+0, #0xca
|
|
1691 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1938: RTC->WPR = 0x53;
|
|
009129 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);
|
|
00912D C6 51 6D [ 1] 1694 ld a, 0x516d
|
|
009130 A4 F8 [ 1] 1695 and a, #0xf8
|
|
009132 C7 51 6D [ 1] 1696 ld 0x516d, a
|
|
1697 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1944: RTC->TCR2 |= (uint8_t)RTC_TamperSamplingFreq;
|
|
009135 C6 51 6D [ 1] 1698 ld a, 0x516d
|
|
009138 1A 01 [ 1] 1699 or a, (0x01, sp)
|
|
00913A C7 51 6D [ 1] 1700 ld 0x516d, a
|
|
1701 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1947: RTC->WPR = 0xFF;
|
|
00913D 35 FF 51 59 [ 1] 1702 mov 0x5159+0, #0xff
|
|
1703 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1948: }
|
|
009141 84 [ 1] 1704 pop a
|
|
009142 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 ; -----------------------------------------
|
|
009143 1710 _RTC_TamperPinsPrechargeDuration:
|
|
009143 88 [ 1] 1711 push a
|
|
009144 6B 01 [ 1] 1712 ld (0x01, sp), a
|
|
1713 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1964: RTC->WPR = 0xCA;
|
|
009146 35 CA 51 59 [ 1] 1714 mov 0x5159+0, #0xca
|
|
1715 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1965: RTC->WPR = 0x53;
|
|
00914A 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);
|
|
00914E C6 51 6D [ 1] 1718 ld a, 0x516d
|
|
009151 A4 1F [ 1] 1719 and a, #0x1f
|
|
009153 C7 51 6D [ 1] 1720 ld 0x516d, a
|
|
1721 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1971: RTC->TCR2 |= (uint8_t)RTC_TamperPrechargeDuration;
|
|
009156 C6 51 6D [ 1] 1722 ld a, 0x516d
|
|
009159 1A 01 [ 1] 1723 or a, (0x01, sp)
|
|
00915B C7 51 6D [ 1] 1724 ld 0x516d, a
|
|
1725 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1974: RTC->WPR = 0xFF;
|
|
00915E 35 FF 51 59 [ 1] 1726 mov 0x5159+0, #0xff
|
|
1727 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1975: }
|
|
009162 84 [ 1] 1728 pop a
|
|
009163 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 ; -----------------------------------------
|
|
009164 1734 _RTC_TamperCmd:
|
|
009164 88 [ 1] 1735 push a
|
|
1736 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1996: RTC->WPR = 0xCA;
|
|
009165 35 CA 51 59 [ 1] 1737 mov 0x5159+0, #0xca
|
|
1738 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1997: RTC->WPR = 0x53;
|
|
009169 35 53 51 59 [ 1] 1739 mov 0x5159+0, #0x53
|
|
1740 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2003: RTC->TCR1 |= (uint8_t)RTC_Tamper;
|
|
00916D AE 51 6C [ 2] 1741 ldw x, #0x516c
|
|
009170 88 [ 1] 1742 push a
|
|
009171 F6 [ 1] 1743 ld a, (x)
|
|
009172 6B 02 [ 1] 1744 ld (0x02, sp), a
|
|
009174 84 [ 1] 1745 pop a
|
|
1746 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2000: if (NewState != DISABLE)
|
|
009175 0D 04 [ 1] 1747 tnz (0x04, sp)
|
|
009177 27 07 [ 1] 1748 jreq 00102$
|
|
1749 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2003: RTC->TCR1 |= (uint8_t)RTC_Tamper;
|
|
009179 1A 01 [ 1] 1750 or a, (0x01, sp)
|
|
00917B C7 51 6C [ 1] 1751 ld 0x516c, a
|
|
00917E 20 06 [ 2] 1752 jra 00103$
|
|
009180 1753 00102$:
|
|
1754 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2008: RTC->TCR1 &= (uint8_t)~RTC_Tamper;
|
|
009180 43 [ 1] 1755 cpl a
|
|
009181 14 01 [ 1] 1756 and a, (0x01, sp)
|
|
009183 C7 51 6C [ 1] 1757 ld 0x516c, a
|
|
009186 1758 00103$:
|
|
1759 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2013: RTC->WPR = 0xFF;
|
|
009186 35 FF 51 59 [ 1] 1760 mov 0x5159+0, #0xff
|
|
1761 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2014: }
|
|
00918A 84 [ 1] 1762 pop a
|
|
00918B 85 [ 2] 1763 popw x
|
|
00918C 84 [ 1] 1764 pop a
|
|
00918D 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 ; -----------------------------------------
|
|
00918E 1770 _RTC_ITConfig:
|
|
00918E 52 03 [ 2] 1771 sub sp, #3
|
|
009190 6B 03 [ 1] 1772 ld (0x03, sp), a
|
|
1773 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2065: RTC->WPR = 0xCA;
|
|
009192 35 CA 51 59 [ 1] 1774 mov 0x5159+0, #0xca
|
|
1775 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2066: RTC->WPR = 0x53;
|
|
009196 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);
|
|
00919A C6 51 49 [ 1] 1778 ld a, 0x5149
|
|
00919D 6B 02 [ 1] 1779 ld (0x02, sp), a
|
|
00919F 9F [ 1] 1780 ld a, xl
|
|
0091A0 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);
|
|
0091A2 88 [ 1] 1783 push a
|
|
0091A3 9F [ 1] 1784 ld a, xl
|
|
0091A4 A4 01 [ 1] 1785 and a, #0x01
|
|
0091A6 6B 02 [ 1] 1786 ld (0x02, sp), a
|
|
0091A8 84 [ 1] 1787 pop a
|
|
1788 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2068: if (NewState != DISABLE)
|
|
0091A9 0D 03 [ 1] 1789 tnz (0x03, sp)
|
|
0091AB 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);
|
|
0091AD 1A 02 [ 1] 1792 or a, (0x02, sp)
|
|
0091AF 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);
|
|
0091B2 C6 51 6C [ 1] 1795 ld a, 0x516c
|
|
0091B5 1A 01 [ 1] 1796 or a, (0x01, sp)
|
|
0091B7 C7 51 6C [ 1] 1797 ld 0x516c, a
|
|
0091BA 20 13 [ 2] 1798 jra 00103$
|
|
0091BC 1799 00102$:
|
|
1800 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2077: RTC->CR2 &= (uint8_t)~(uint8_t)((uint16_t)RTC_IT & (uint16_t)0x00F0);
|
|
0091BC 43 [ 1] 1801 cpl a
|
|
0091BD 14 02 [ 1] 1802 and a, (0x02, sp)
|
|
0091BF 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);
|
|
0091C2 C6 51 6C [ 1] 1805 ld a, 0x516c
|
|
0091C5 6B 02 [ 1] 1806 ld (0x02, sp), a
|
|
0091C7 7B 01 [ 1] 1807 ld a, (0x01, sp)
|
|
0091C9 43 [ 1] 1808 cpl a
|
|
0091CA 14 02 [ 1] 1809 and a, (0x02, sp)
|
|
0091CC C7 51 6C [ 1] 1810 ld 0x516c, a
|
|
0091CF 1811 00103$:
|
|
1812 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2082: RTC->WPR = 0xFF;
|
|
0091CF 35 FF 51 59 [ 1] 1813 mov 0x5159+0, #0xff
|
|
1814 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2083: }
|
|
0091D3 5B 03 [ 2] 1815 addw sp, #3
|
|
0091D5 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 ; -----------------------------------------
|
|
0091D6 1821 _RTC_GetFlagStatus:
|
|
0091D6 52 06 [ 2] 1822 sub sp, #6
|
|
1823 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2100: tmpreg2 = (uint16_t)((uint16_t)RTC->ISR1 << 8);
|
|
0091D8 C6 51 4C [ 1] 1824 ld a, 0x514c
|
|
0091DB 90 97 [ 1] 1825 ld yl, a
|
|
0091DD 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);
|
|
0091DF C6 51 4D [ 1] 1828 ld a, 0x514d
|
|
0091E2 0F 03 [ 1] 1829 clr (0x03, sp)
|
|
0091E4 6B 06 [ 1] 1830 ld (0x06, sp), a
|
|
0091E6 61 [ 1] 1831 exg a, yl
|
|
0091E7 6B 05 [ 1] 1832 ld (0x05, sp), a
|
|
0091E9 61 [ 1] 1833 exg a, yl
|
|
1834 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2104: if ((tmpreg1 & (uint16_t)RTC_FLAG) != RESET)
|
|
0091EA 9F [ 1] 1835 ld a, xl
|
|
0091EB 14 06 [ 1] 1836 and a, (0x06, sp)
|
|
0091ED 02 [ 1] 1837 rlwa x
|
|
0091EE 14 05 [ 1] 1838 and a, (0x05, sp)
|
|
0091F0 95 [ 1] 1839 ld xh, a
|
|
0091F1 5D [ 2] 1840 tnzw x
|
|
0091F2 27 03 [ 1] 1841 jreq 00102$
|
|
1842 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2106: flagstatus = SET;
|
|
0091F4 A6 01 [ 1] 1843 ld a, #0x01
|
|
1844 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2110: flagstatus = RESET;
|
|
0091F6 21 1845 .byte 0x21
|
|
0091F7 1846 00102$:
|
|
0091F7 4F [ 1] 1847 clr a
|
|
0091F8 1848 00103$:
|
|
1849 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2112: return (FlagStatus)flagstatus;
|
|
1850 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2113: }
|
|
0091F8 5B 06 [ 2] 1851 addw sp, #6
|
|
0091FA 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 ; -----------------------------------------
|
|
0091FB 1857 _RTC_ClearFlag:
|
|
1858 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2128: RTC->ISR2 = (uint8_t)~((uint8_t)RTC_FLAG) ;
|
|
0091FB 9F [ 1] 1859 ld a, xl
|
|
0091FC 43 [ 1] 1860 cpl a
|
|
0091FD 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)));
|
|
009200 9E [ 1] 1863 ld a, xh
|
|
009201 43 [ 1] 1864 cpl a
|
|
009202 A4 7F [ 1] 1865 and a, #0x7f
|
|
009204 C7 51 4C [ 1] 1866 ld 0x514c, a
|
|
1867 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2130: }
|
|
009207 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 ; -----------------------------------------
|
|
009208 1873 _RTC_GetITStatus:
|
|
009208 88 [ 1] 1874 push a
|
|
1875 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2147: enablestatus = (uint8_t)(RTC->CR2 & (uint16_t)RTC_IT);
|
|
009209 C6 51 49 [ 1] 1876 ld a, 0x5149
|
|
00920C 6B 01 [ 1] 1877 ld (0x01, sp), a
|
|
00920E 9F [ 1] 1878 ld a, xl
|
|
00920F 14 01 [ 1] 1879 and a, (0x01, sp)
|
|
009211 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));
|
|
009213 C6 51 4D [ 1] 1882 ld a, 0x514d
|
|
009216 54 [ 2] 1883 srlw x
|
|
009217 54 [ 2] 1884 srlw x
|
|
009218 54 [ 2] 1885 srlw x
|
|
009219 54 [ 2] 1886 srlw x
|
|
00921A 89 [ 2] 1887 pushw x
|
|
00921B 14 02 [ 1] 1888 and a, (2, sp)
|
|
00921D 85 [ 2] 1889 popw x
|
|
1890 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2153: if ((enablestatus != (uint8_t)RESET) && (tmpreg != (uint8_t)RESET))
|
|
00921E 0D 01 [ 1] 1891 tnz (0x01, sp)
|
|
009220 27 06 [ 1] 1892 jreq 00102$
|
|
009222 4D [ 1] 1893 tnz a
|
|
009223 27 03 [ 1] 1894 jreq 00102$
|
|
1895 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2155: itstatus = SET;
|
|
009225 A6 01 [ 1] 1896 ld a, #0x01
|
|
1897 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2159: itstatus = RESET;
|
|
009227 21 1898 .byte 0x21
|
|
009228 1899 00102$:
|
|
009228 4F [ 1] 1900 clr a
|
|
009229 1901 00103$:
|
|
1902 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2162: return (ITStatus)itstatus;
|
|
1903 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2163: }
|
|
009229 5B 01 [ 2] 1904 addw sp, #1
|
|
00922B 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 ; -----------------------------------------
|
|
00922C 1910 _RTC_ClearITPendingBit:
|
|
1911 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2178: RTC->ISR2 = (uint8_t)~(uint8_t)((uint16_t)RTC_IT >> 4);
|
|
00922C A6 10 [ 1] 1912 ld a, #0x10
|
|
00922E 62 [ 2] 1913 div x, a
|
|
00922F 9F [ 1] 1914 ld a, xl
|
|
009230 43 [ 1] 1915 cpl a
|
|
009231 C7 51 4D [ 1] 1916 ld 0x514d, a
|
|
1917 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2179: }
|
|
009234 81 [ 4] 1918 ret
|
|
1919 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2202: static uint8_t ByteToBcd2(uint8_t Value)
|
|
1920 ; -----------------------------------------
|
|
1921 ; function ByteToBcd2
|
|
1922 ; -----------------------------------------
|
|
009235 1923 _ByteToBcd2:
|
|
1924 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2206: while (Value >= 10)
|
|
009235 5F [ 1] 1925 clrw x
|
|
009236 1926 00101$:
|
|
009236 A1 0A [ 1] 1927 cp a, #0x0a
|
|
009238 25 05 [ 1] 1928 jrc 00103$
|
|
1929 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2208: bcdhigh++;
|
|
00923A 5C [ 1] 1930 incw x
|
|
1931 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2209: Value -= 10;
|
|
00923B A0 0A [ 1] 1932 sub a, #0x0a
|
|
00923D 20 F7 [ 2] 1933 jra 00101$
|
|
00923F 1934 00103$:
|
|
1935 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2212: return (uint8_t)((uint8_t)(bcdhigh << 4) | Value);
|
|
00923F 58 [ 2] 1936 sllw x
|
|
009240 58 [ 2] 1937 sllw x
|
|
009241 58 [ 2] 1938 sllw x
|
|
009242 58 [ 2] 1939 sllw x
|
|
009243 89 [ 2] 1940 pushw x
|
|
009244 1A 02 [ 1] 1941 or a, (2, sp)
|
|
009246 85 [ 2] 1942 popw x
|
|
1943 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2213: }
|
|
009247 81 [ 4] 1944 ret
|
|
1945 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2220: static uint8_t Bcd2ToByte(uint8_t Value)
|
|
1946 ; -----------------------------------------
|
|
1947 ; function Bcd2ToByte
|
|
1948 ; -----------------------------------------
|
|
009248 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);
|
|
009248 90 97 [ 1] 1951 ld yl, a
|
|
00924A A4 F0 [ 1] 1952 and a, #0xf0
|
|
00924C 4E [ 1] 1953 swap a
|
|
00924D A4 0F [ 1] 1954 and a, #0x0f
|
|
00924F 97 [ 1] 1955 ld xl, a
|
|
009250 A6 0A [ 1] 1956 ld a, #0x0a
|
|
009252 42 [ 4] 1957 mul x, a
|
|
1958 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2226: return (uint8_t)(tmp + (Value & (uint8_t)0x0F));
|
|
009253 90 9F [ 1] 1959 ld a, yl
|
|
009255 A4 0F [ 1] 1960 and a, #0x0f
|
|
009257 89 [ 2] 1961 pushw x
|
|
009258 1B 02 [ 1] 1962 add a, (2, sp)
|
|
00925A 85 [ 2] 1963 popw x
|
|
1964 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2227: }
|
|
00925B 81 [ 4] 1965 ret
|
|
1966 .area CODE
|
|
1967 .area CONST
|
|
1968 .area INITIALIZER
|
|
1969 .area CABS (ABS)
|