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 ; -----------------------------------------
|
|
008586 93 _RTC_DeInit:
|
|
94 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 239: RTC->WPR = 0xCA;
|
|
008586 35 CA 51 59 [ 1] 95 mov 0x5159+0, #0xca
|
|
96 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 240: RTC->WPR = 0x53;
|
|
00858A 35 53 51 59 [ 1] 97 mov 0x5159+0, #0x53
|
|
98 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 243: if (RTC_EnterInitMode() == ERROR)
|
|
00858E CD 86 BB [ 4] 99 call _RTC_EnterInitMode
|
|
008591 4D [ 1] 100 tnz a
|
|
008592 26 06 [ 1] 101 jrne 00121$
|
|
102 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 245: status = ERROR;
|
|
008594 4F [ 1] 103 clr a
|
|
104 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 247: RTC->WPR = 0xFF;
|
|
008595 35 FF 51 59 [ 1] 105 mov 0x5159+0, #0xff
|
|
008599 81 [ 4] 106 ret
|
|
00859A 107 00121$:
|
|
108 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 252: RTC->TR1 = RTC_TR1_RESET_VALUE;
|
|
00859A 35 00 51 40 [ 1] 109 mov 0x5140+0, #0x00
|
|
110 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 253: RTC->TR2 = RTC_TR2_RESET_VALUE;
|
|
00859E 35 00 51 41 [ 1] 111 mov 0x5141+0, #0x00
|
|
112 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 254: RTC->TR3 = RTC_TR3_RESET_VALUE;
|
|
0085A2 35 00 51 42 [ 1] 113 mov 0x5142+0, #0x00
|
|
114 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 257: RTC->DR1 = RTC_DR1_RESET_VALUE;
|
|
0085A6 35 01 51 44 [ 1] 115 mov 0x5144+0, #0x01
|
|
116 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 258: RTC->DR2 = RTC_DR2_RESET_VALUE;
|
|
0085AA 35 21 51 45 [ 1] 117 mov 0x5145+0, #0x21
|
|
118 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 259: RTC->DR3 = RTC_DR3_RESET_VALUE;
|
|
0085AE 35 00 51 46 [ 1] 119 mov 0x5146+0, #0x00
|
|
120 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 262: RTC->SPRERH = RTC_SPRERH_RESET_VALUE;
|
|
0085B2 35 00 51 50 [ 1] 121 mov 0x5150+0, #0x00
|
|
122 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 263: RTC->SPRERL = RTC_SPRERL_RESET_VALUE;
|
|
0085B6 35 FF 51 51 [ 1] 123 mov 0x5151+0, #0xff
|
|
124 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 264: RTC->APRER = RTC_APRER_RESET_VALUE;
|
|
0085BA 35 7F 51 52 [ 1] 125 mov 0x5152+0, #0x7f
|
|
126 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 266: RTC->TCR1 = RTC_TCR1_RESET_VALUE;
|
|
0085BE 35 00 51 6C [ 1] 127 mov 0x516c+0, #0x00
|
|
128 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 267: RTC->TCR2 = RTC_TCR2_RESET_VALUE;
|
|
0085C2 35 00 51 6D [ 1] 129 mov 0x516d+0, #0x00
|
|
130 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 271: RTC->CR1 = RTC_CR1_RESET_VALUE;
|
|
0085C6 35 00 51 48 [ 1] 131 mov 0x5148+0, #0x00
|
|
132 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 272: RTC->CR2 = RTC_CR2_RESET_VALUE;
|
|
0085CA 35 00 51 49 [ 1] 133 mov 0x5149+0, #0x00
|
|
134 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 273: RTC->CR3 = RTC_CR3_RESET_VALUE;
|
|
0085CE 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))
|
|
0085D2 5F [ 1] 137 clrw x
|
|
0085D3 138 00102$:
|
|
0085D3 72 04 51 4C 0C [ 2] 139 btjt 0x514c, #2, 00104$
|
|
0085D8 A3 FF FF [ 2] 140 cpw x, #0xffff
|
|
0085DB 27 07 [ 1] 141 jreq 00104$
|
|
142 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 278: wutwfcount++;
|
|
0085DD 5C [ 1] 143 incw x
|
|
144 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 279: RTC->ISR1 = 0;
|
|
0085DE 35 00 51 4C [ 1] 145 mov 0x514c+0, #0x00
|
|
0085E2 20 EF [ 2] 146 jra 00102$
|
|
0085E4 147 00104$:
|
|
148 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 282: if ((RTC->ISR1 & RTC_ISR1_WUTWF) == RESET)
|
|
0085E4 72 04 51 4C 06 [ 2] 149 btjt 0x514c, #2, 00118$
|
|
150 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 284: status = ERROR;
|
|
0085E9 4F [ 1] 151 clr a
|
|
152 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 286: RTC->WPR = 0xFF;
|
|
0085EA 35 FF 51 59 [ 1] 153 mov 0x5159+0, #0xff
|
|
0085EE 81 [ 4] 154 ret
|
|
0085EF 155 00118$:
|
|
156 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 291: RTC->CR1 = RTC_CR1_RESET_VALUE;
|
|
0085EF 35 00 51 48 [ 1] 157 mov 0x5148+0, #0x00
|
|
158 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 294: RTC->WUTRH = RTC_WUTRH_RESET_VALUE;
|
|
0085F3 35 FF 51 54 [ 1] 159 mov 0x5154+0, #0xff
|
|
160 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 295: RTC->WUTRL = RTC_WUTRL_RESET_VALUE;
|
|
0085F7 35 FF 51 55 [ 1] 161 mov 0x5155+0, #0xff
|
|
162 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 298: RTC->ALRMAR1 = RTC_ALRMAR1_RESET_VALUE;
|
|
0085FB 35 00 51 5C [ 1] 163 mov 0x515c+0, #0x00
|
|
164 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 299: RTC->ALRMAR2 = RTC_ALRMAR2_RESET_VALUE;
|
|
0085FF 35 00 51 5D [ 1] 165 mov 0x515d+0, #0x00
|
|
166 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 300: RTC->ALRMAR3 = RTC_ALRMAR3_RESET_VALUE;
|
|
008603 35 00 51 5E [ 1] 167 mov 0x515e+0, #0x00
|
|
168 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 301: RTC->ALRMAR4 = RTC_ALRMAR4_RESET_VALUE;
|
|
008607 35 00 51 5F [ 1] 169 mov 0x515f+0, #0x00
|
|
170 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 303: RTC->ALRMASSRH = RTC_ALRMASSRH_RESET_VALUE;
|
|
00860B 35 00 51 64 [ 1] 171 mov 0x5164+0, #0x00
|
|
172 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 304: RTC->ALRMASSRL = RTC_ALRMASSRL_RESET_VALUE;
|
|
00860F 35 00 51 65 [ 1] 173 mov 0x5165+0, #0x00
|
|
174 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 305: RTC->ALRMASSMSKR = RTC_ALRMASSMSKR_RESET_VALUE;
|
|
008613 35 00 51 66 [ 1] 175 mov 0x5166+0, #0x00
|
|
176 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 308: RTC->ISR1 = (uint8_t)0x00;
|
|
008617 35 00 51 4C [ 1] 177 mov 0x514c+0, #0x00
|
|
178 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 309: RTC->ISR2 = RTC_ISR2_RESET_VALUE;
|
|
00861B 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)
|
|
00861F 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))
|
|
008624 5F [ 1] 183 clrw x
|
|
008625 184 00106$:
|
|
008625 72 03 51 4C 08 [ 2] 185 btjf 0x514c, #1, 00110$
|
|
00862A A3 FF FF [ 2] 186 cpw x, #0xffff
|
|
00862D 27 03 [ 1] 187 jreq 00110$
|
|
188 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 315: recalpfcount++;
|
|
00862F 5C [ 1] 189 incw x
|
|
008630 20 F3 [ 2] 190 jra 00106$
|
|
008632 191 00110$:
|
|
192 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 318: if ((RTC->ISR1 & RTC_ISR1_RECALPF) == RESET)
|
|
008632 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;
|
|
008637 35 00 51 6A [ 1] 195 mov 0x516a+0, #0x00
|
|
196 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 321: RTC->CALRL = RTC_CALRL_RESET_VALUE;
|
|
00863B 35 00 51 6B [ 1] 197 mov 0x516b+0, #0x00
|
|
198 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 323: if (RTC_WaitForSynchro() == ERROR)
|
|
00863F CD 86 E1 [ 4] 199 call _RTC_WaitForSynchro
|
|
008642 4D [ 1] 200 tnz a
|
|
008643 26 03 [ 1] 201 jrne 00112$
|
|
202 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 325: status = ERROR;
|
|
008645 4F [ 1] 203 clr a
|
|
008646 20 04 [ 2] 204 jra 00116$
|
|
008648 205 00112$:
|
|
206 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 329: status = SUCCESS;
|
|
008648 A6 01 [ 1] 207 ld a, #0x01
|
|
208 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 334: status = ERROR;
|
|
00864A 21 209 .byte 0x21
|
|
00864B 210 00115$:
|
|
00864B 4F [ 1] 211 clr a
|
|
00864C 212 00116$:
|
|
213 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 338: RTC->WPR = 0xFF;
|
|
00864C 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: }
|
|
008650 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 ; -----------------------------------------
|
|
008651 222 _RTC_Init:
|
|
008651 52 03 [ 2] 223 sub sp, #3
|
|
008653 1F 02 [ 2] 224 ldw (0x02, sp), x
|
|
225 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 369: RTC->WPR = 0xCA;
|
|
008655 35 CA 51 59 [ 1] 226 mov 0x5159+0, #0xca
|
|
227 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 370: RTC->WPR = 0x53;
|
|
008659 35 53 51 59 [ 1] 228 mov 0x5159+0, #0x53
|
|
229 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 373: if (RTC_EnterInitMode() == ERROR)
|
|
00865D CD 86 BB [ 4] 230 call _RTC_EnterInitMode
|
|
008660 4D [ 1] 231 tnz a
|
|
008661 26 03 [ 1] 232 jrne 00102$
|
|
233 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 375: status = ERROR;
|
|
008663 4F [ 1] 234 clr a
|
|
008664 20 2D [ 2] 235 jra 00103$
|
|
008666 236 00102$:
|
|
237 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 380: RTC->CR1 &= ((uint8_t)~( RTC_CR1_FMT ));
|
|
008666 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));
|
|
00866A C6 51 48 [ 1] 240 ld a, 0x5148
|
|
00866D 6B 01 [ 1] 241 ld (0x01, sp), a
|
|
00866F 1E 02 [ 2] 242 ldw x, (0x02, sp)
|
|
008671 F6 [ 1] 243 ld a, (x)
|
|
008672 1A 01 [ 1] 244 or a, (0x01, sp)
|
|
008674 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);
|
|
008677 1E 02 [ 2] 247 ldw x, (0x02, sp)
|
|
008679 5C [ 1] 248 incw x
|
|
00867A 5C [ 1] 249 incw x
|
|
00867B E6 01 [ 1] 250 ld a, (0x1, x)
|
|
00867D F6 [ 1] 251 ld a, (x)
|
|
00867E C7 51 50 [ 1] 252 ld 0x5150, a
|
|
253 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 387: RTC->SPRERL = (uint8_t)(RTC_InitStruct->RTC_SynchPrediv);
|
|
008681 E6 01 [ 1] 254 ld a, (0x1, x)
|
|
008683 C7 51 51 [ 1] 255 ld 0x5151, a
|
|
256 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 388: RTC->APRER = (uint8_t)(RTC_InitStruct->RTC_AsynchPrediv);
|
|
008686 1E 02 [ 2] 257 ldw x, (0x02, sp)
|
|
008688 E6 01 [ 1] 258 ld a, (0x1, x)
|
|
00868A C7 51 52 [ 1] 259 ld 0x5152, a
|
|
260 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 391: RTC->ISR1 &= (uint8_t)~RTC_ISR1_INIT;
|
|
00868D 72 1F 51 4C [ 1] 261 bres 0x514c, #7
|
|
262 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 393: status = SUCCESS;
|
|
008691 A6 01 [ 1] 263 ld a, #0x01
|
|
008693 264 00103$:
|
|
265 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 397: RTC->WPR = 0xFF;
|
|
008693 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: }
|
|
008697 5B 03 [ 2] 269 addw sp, #3
|
|
008699 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 ; -----------------------------------------
|
|
00869A 275 _RTC_StructInit:
|
|
00869A 51 [ 1] 276 exgw x, y
|
|
277 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 413: RTC_InitStruct->RTC_HourFormat = RTC_HourFormat_24;
|
|
00869B 90 7F [ 1] 278 clr (y)
|
|
279 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 416: RTC_InitStruct->RTC_AsynchPrediv = RTC_APRER_RESET_VALUE;
|
|
00869D 93 [ 1] 280 ldw x, y
|
|
00869E 5C [ 1] 281 incw x
|
|
00869F A6 7F [ 1] 282 ld a, #0x7f
|
|
0086A1 F7 [ 1] 283 ld (x), a
|
|
284 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 419: RTC_InitStruct->RTC_SynchPrediv = RTC_SPRERL_RESET_VALUE;
|
|
0086A2 93 [ 1] 285 ldw x, y
|
|
0086A3 90 AE 00 FF [ 2] 286 ldw y, #0x00ff
|
|
0086A7 EF 02 [ 2] 287 ldw (0x02, x), y
|
|
288 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 420: }
|
|
0086A9 81 [ 4] 289 ret
|
|
290 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 430: void RTC_WriteProtectionCmd(FunctionalState NewState)
|
|
291 ; -----------------------------------------
|
|
292 ; function RTC_WriteProtectionCmd
|
|
293 ; -----------------------------------------
|
|
0086AA 294 _RTC_WriteProtectionCmd:
|
|
295 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 435: if (NewState != DISABLE)
|
|
0086AA 4D [ 1] 296 tnz a
|
|
0086AB 27 05 [ 1] 297 jreq 00102$
|
|
298 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 438: RTC->WPR = RTC_WPR_EnableKey;
|
|
0086AD 35 FF 51 59 [ 1] 299 mov 0x5159+0, #0xff
|
|
0086B1 81 [ 4] 300 ret
|
|
0086B2 301 00102$:
|
|
302 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 443: RTC->WPR = RTC_WPR_DisableKey1;
|
|
0086B2 35 CA 51 59 [ 1] 303 mov 0x5159+0, #0xca
|
|
304 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 444: RTC->WPR = RTC_WPR_DisableKey2;
|
|
0086B6 35 53 51 59 [ 1] 305 mov 0x5159+0, #0x53
|
|
306 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 446: }
|
|
0086BA 81 [ 4] 307 ret
|
|
308 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 458: ErrorStatus RTC_EnterInitMode(void)
|
|
309 ; -----------------------------------------
|
|
310 ; function RTC_EnterInitMode
|
|
311 ; -----------------------------------------
|
|
0086BB 312 _RTC_EnterInitMode:
|
|
313 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 464: if ((RTC->ISR1 & RTC_ISR1_INITF) == RESET)
|
|
0086BB 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;
|
|
0086C0 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))
|
|
0086C4 5F [ 1] 318 clrw x
|
|
0086C5 319 00102$:
|
|
0086C5 72 0C 51 4C 08 [ 2] 320 btjt 0x514c, #6, 00106$
|
|
0086CA A3 FF FF [ 2] 321 cpw x, #0xffff
|
|
0086CD 27 03 [ 1] 322 jreq 00106$
|
|
323 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 472: initfcount++;
|
|
0086CF 5C [ 1] 324 incw x
|
|
0086D0 20 F3 [ 2] 325 jra 00102$
|
|
0086D2 326 00106$:
|
|
327 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 476: if ((RTC->ISR1 & RTC_ISR1_INITF) == RESET)
|
|
0086D2 72 0C 51 4C 02 [ 2] 328 btjt 0x514c, #6, 00108$
|
|
329 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 478: status = ERROR;
|
|
0086D7 4F [ 1] 330 clr a
|
|
0086D8 81 [ 4] 331 ret
|
|
0086D9 332 00108$:
|
|
333 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 482: status = SUCCESS;
|
|
0086D9 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: }
|
|
0086DB 81 [ 4] 337 ret
|
|
338 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 498: void RTC_ExitInitMode(void)
|
|
339 ; -----------------------------------------
|
|
340 ; function RTC_ExitInitMode
|
|
341 ; -----------------------------------------
|
|
0086DC 342 _RTC_ExitInitMode:
|
|
343 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 501: RTC->ISR1 &= (uint8_t)~RTC_ISR1_INIT;
|
|
0086DC 72 1F 51 4C [ 1] 344 bres 0x514c, #7
|
|
345 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 502: }
|
|
0086E0 81 [ 4] 346 ret
|
|
347 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 527: ErrorStatus RTC_WaitForSynchro(void)
|
|
348 ; -----------------------------------------
|
|
349 ; function RTC_WaitForSynchro
|
|
350 ; -----------------------------------------
|
|
0086E1 351 _RTC_WaitForSynchro:
|
|
352 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 533: RTC->WPR = 0xCA;
|
|
0086E1 35 CA 51 59 [ 1] 353 mov 0x5159+0, #0xca
|
|
354 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 534: RTC->WPR = 0x53;
|
|
0086E5 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);
|
|
0086E9 C6 51 4C [ 1] 357 ld a, 0x514c
|
|
0086EC A4 5F [ 1] 358 and a, #0x5f
|
|
0086EE 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))
|
|
0086F1 5F [ 1] 361 clrw x
|
|
0086F2 362 00102$:
|
|
0086F2 72 0A 51 4C 08 [ 2] 363 btjt 0x514c, #5, 00104$
|
|
0086F7 A3 FF FF [ 2] 364 cpw x, #0xffff
|
|
0086FA 27 03 [ 1] 365 jreq 00104$
|
|
366 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 542: rsfcount++;
|
|
0086FC 5C [ 1] 367 incw x
|
|
0086FD 20 F3 [ 2] 368 jra 00102$
|
|
0086FF 369 00104$:
|
|
370 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 546: if ((RTC->ISR1 & RTC_ISR1_RSF) != RESET)
|
|
0086FF 72 0B 51 4C 03 [ 2] 371 btjf 0x514c, #5, 00106$
|
|
372 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 548: status = SUCCESS;
|
|
008704 A6 01 [ 1] 373 ld a, #0x01
|
|
374 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 552: status = ERROR;
|
|
008706 21 375 .byte 0x21
|
|
008707 376 00106$:
|
|
008707 4F [ 1] 377 clr a
|
|
008708 378 00107$:
|
|
379 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 556: RTC->WPR = 0xFF;
|
|
008708 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: }
|
|
00870C 81 [ 4] 383 ret
|
|
384 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 568: void RTC_RatioCmd(FunctionalState NewState)
|
|
385 ; -----------------------------------------
|
|
386 ; function RTC_RatioCmd
|
|
387 ; -----------------------------------------
|
|
00870D 388 _RTC_RatioCmd:
|
|
00870D 88 [ 1] 389 push a
|
|
00870E 6B 01 [ 1] 390 ld (0x01, sp), a
|
|
391 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 574: RTC->WPR = 0xCA;
|
|
008710 35 CA 51 59 [ 1] 392 mov 0x5159+0, #0xca
|
|
393 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 575: RTC->WPR = 0x53;
|
|
008714 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;
|
|
008718 C6 51 48 [ 1] 396 ld a, 0x5148
|
|
397 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 577: if (NewState != DISABLE)
|
|
00871B 0D 01 [ 1] 398 tnz (0x01, sp)
|
|
00871D 27 07 [ 1] 399 jreq 00102$
|
|
400 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 580: RTC->CR1 |= (uint8_t)RTC_CR1_RATIO;
|
|
00871F AA 20 [ 1] 401 or a, #0x20
|
|
008721 C7 51 48 [ 1] 402 ld 0x5148, a
|
|
008724 20 05 [ 2] 403 jra 00103$
|
|
008726 404 00102$:
|
|
405 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 585: RTC->CR1 &= (uint8_t)~RTC_CR1_RATIO;
|
|
008726 A4 DF [ 1] 406 and a, #0xdf
|
|
008728 C7 51 48 [ 1] 407 ld 0x5148, a
|
|
00872B 408 00103$:
|
|
409 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 589: RTC->WPR = 0xFF;
|
|
00872B 35 FF 51 59 [ 1] 410 mov 0x5159+0, #0xff
|
|
411 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 590: }
|
|
00872F 84 [ 1] 412 pop a
|
|
008730 81 [ 4] 413 ret
|
|
414 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 598: void RTC_BypassShadowCmd(FunctionalState NewState)
|
|
415 ; -----------------------------------------
|
|
416 ; function RTC_BypassShadowCmd
|
|
417 ; -----------------------------------------
|
|
008731 418 _RTC_BypassShadowCmd:
|
|
008731 88 [ 1] 419 push a
|
|
008732 6B 01 [ 1] 420 ld (0x01, sp), a
|
|
421 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 604: RTC->WPR = 0xCA;
|
|
008734 35 CA 51 59 [ 1] 422 mov 0x5159+0, #0xca
|
|
423 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 605: RTC->WPR = 0x53;
|
|
008738 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;
|
|
00873C C6 51 48 [ 1] 426 ld a, 0x5148
|
|
427 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 607: if (NewState != DISABLE)
|
|
00873F 0D 01 [ 1] 428 tnz (0x01, sp)
|
|
008741 27 07 [ 1] 429 jreq 00102$
|
|
430 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 610: RTC->CR1 |= (uint8_t)RTC_CR1_BYPSHAD;
|
|
008743 AA 10 [ 1] 431 or a, #0x10
|
|
008745 C7 51 48 [ 1] 432 ld 0x5148, a
|
|
008748 20 05 [ 2] 433 jra 00103$
|
|
00874A 434 00102$:
|
|
435 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 615: RTC->CR1 &= (uint8_t)~RTC_CR1_BYPSHAD;
|
|
00874A A4 EF [ 1] 436 and a, #0xef
|
|
00874C C7 51 48 [ 1] 437 ld 0x5148, a
|
|
00874F 438 00103$:
|
|
439 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 619: RTC->WPR = 0xFF;
|
|
00874F 35 FF 51 59 [ 1] 440 mov 0x5159+0, #0xff
|
|
441 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 620: }
|
|
008753 84 [ 1] 442 pop a
|
|
008754 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 ; -----------------------------------------
|
|
008755 448 _RTC_SetTime:
|
|
008755 52 06 [ 2] 449 sub sp, #6
|
|
008757 6B 06 [ 1] 450 ld (0x06, sp), a
|
|
008759 1F 04 [ 2] 451 ldw (0x04, sp), x
|
|
452 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 671: if ((RTC->CR1 & RTC_CR1_FMT) != RESET)
|
|
00875B C6 51 48 [ 1] 453 ld a, 0x5148
|
|
454 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 701: RTC->WPR = 0xCA;
|
|
00875E 35 CA 51 59 [ 1] 455 mov 0x5159+0, #0xca
|
|
456 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 702: RTC->WPR = 0x53;
|
|
008762 35 53 51 59 [ 1] 457 mov 0x5159+0, #0x53
|
|
458 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 705: if (RTC_EnterInitMode() == ERROR)
|
|
008766 CD 86 BB [ 4] 459 call _RTC_EnterInitMode
|
|
008769 4D [ 1] 460 tnz a
|
|
00876A 26 07 [ 1] 461 jrne 00123$
|
|
462 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 707: status = ERROR;
|
|
00876C 4F [ 1] 463 clr a
|
|
464 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 709: RTC->WPR = 0xFF;
|
|
00876D 35 FF 51 59 [ 1] 465 mov 0x5159+0, #0xff
|
|
008771 20 6B [ 2] 466 jra 00124$
|
|
008773 467 00123$:
|
|
468 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 714: if ((RTC->CR1 & RTC_CR1_FMT) != RESET)
|
|
008773 72 0D 51 48 07 [ 2] 469 btjf 0x5148, #6, 00111$
|
|
470 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 717: temp = RTC_TimeStruct->RTC_H12;
|
|
008778 1E 04 [ 2] 471 ldw x, (0x04, sp)
|
|
00877A E6 03 [ 1] 472 ld a, (0x3, x)
|
|
00877C 6B 01 [ 1] 473 ld (0x01, sp), a
|
|
474 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 721: temp = 0;
|
|
00877E C5 475 .byte 0xc5
|
|
00877F 476 00111$:
|
|
00877F 0F 01 [ 1] 477 clr (0x01, sp)
|
|
008781 478 00112$:
|
|
479 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 726: RTC->TR1 = (uint8_t)(RTC_TimeStruct->RTC_Seconds);
|
|
008781 16 04 [ 2] 480 ldw y, (0x04, sp)
|
|
481 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 727: RTC->TR2 = (uint8_t)(RTC_TimeStruct->RTC_Minutes) ;
|
|
008783 1E 04 [ 2] 482 ldw x, (0x04, sp)
|
|
008785 5C [ 1] 483 incw x
|
|
008786 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) ;
|
|
008788 1E 04 [ 2] 486 ldw x, (0x04, sp)
|
|
487 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 726: RTC->TR1 = (uint8_t)(RTC_TimeStruct->RTC_Seconds);
|
|
00878A 90 E6 02 [ 1] 488 ld a, (0x2, y)
|
|
489 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 724: if (RTC_Format != RTC_Format_BIN)
|
|
00878D 0D 06 [ 1] 490 tnz (0x06, sp)
|
|
00878F 27 12 [ 1] 491 jreq 00114$
|
|
492 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 726: RTC->TR1 = (uint8_t)(RTC_TimeStruct->RTC_Seconds);
|
|
008791 C7 51 40 [ 1] 493 ld 0x5140, a
|
|
494 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 727: RTC->TR2 = (uint8_t)(RTC_TimeStruct->RTC_Minutes) ;
|
|
008794 16 02 [ 2] 495 ldw y, (0x02, sp)
|
|
008796 90 F6 [ 1] 496 ld a, (y)
|
|
008798 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) ;
|
|
00879B F6 [ 1] 499 ld a, (x)
|
|
00879C 1A 01 [ 1] 500 or a, (0x01, sp)
|
|
00879E C7 51 42 [ 1] 501 ld 0x5142, a
|
|
0087A1 20 1D [ 2] 502 jra 00115$
|
|
0087A3 503 00114$:
|
|
504 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 732: RTC->TR1 = (uint8_t)(ByteToBcd2(RTC_TimeStruct->RTC_Seconds));
|
|
0087A3 89 [ 2] 505 pushw x
|
|
0087A4 CD 8E A9 [ 4] 506 call _ByteToBcd2
|
|
0087A7 85 [ 2] 507 popw x
|
|
0087A8 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)) ;
|
|
0087AB 16 02 [ 2] 510 ldw y, (0x02, sp)
|
|
0087AD 90 F6 [ 1] 511 ld a, (y)
|
|
0087AF 89 [ 2] 512 pushw x
|
|
0087B0 CD 8E A9 [ 4] 513 call _ByteToBcd2
|
|
0087B3 85 [ 2] 514 popw x
|
|
0087B4 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));
|
|
0087B7 F6 [ 1] 517 ld a, (x)
|
|
0087B8 CD 8E A9 [ 4] 518 call _ByteToBcd2
|
|
0087BB 1A 01 [ 1] 519 or a, (0x01, sp)
|
|
0087BD C7 51 42 [ 1] 520 ld 0x5142, a
|
|
0087C0 521 00115$:
|
|
522 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 737: (void)(RTC->DR3);
|
|
0087C0 C6 51 46 [ 1] 523 ld a, 0x5146
|
|
524 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 740: RTC->ISR1 &= (uint8_t)~RTC_ISR1_INIT;
|
|
0087C3 72 1F 51 4C [ 1] 525 bres 0x514c, #7
|
|
526 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 743: RTC->WPR = 0xFF;
|
|
0087C7 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)
|
|
0087CB 72 08 51 48 0C [ 2] 529 btjt 0x5148, #4, 00120$
|
|
530 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 748: if (RTC_WaitForSynchro() == ERROR)
|
|
0087D0 CD 86 E1 [ 4] 531 call _RTC_WaitForSynchro
|
|
0087D3 4D [ 1] 532 tnz a
|
|
0087D4 26 03 [ 1] 533 jrne 00117$
|
|
534 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 750: status = ERROR;
|
|
0087D6 4F [ 1] 535 clr a
|
|
0087D7 20 05 [ 2] 536 jra 00124$
|
|
0087D9 537 00117$:
|
|
538 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 754: status = SUCCESS;
|
|
0087D9 A6 01 [ 1] 539 ld a, #0x01
|
|
540 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 759: status = SUCCESS;
|
|
0087DB C5 541 .byte 0xc5
|
|
0087DC 542 00120$:
|
|
0087DC A6 01 [ 1] 543 ld a, #0x01
|
|
0087DE 544 00124$:
|
|
545 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 763: return (ErrorStatus)status;
|
|
546 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 764: }
|
|
0087DE 5B 06 [ 2] 547 addw sp, #6
|
|
0087E0 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 ; -----------------------------------------
|
|
0087E1 553 _RTC_TimeStructInit:
|
|
554 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 778: RTC_TimeStruct->RTC_H12 = RTC_H12_AM;
|
|
0087E1 90 93 [ 1] 555 ldw y, x
|
|
0087E3 6F 03 [ 1] 556 clr (0x0003, x)
|
|
557 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 779: RTC_TimeStruct->RTC_Hours = 0;
|
|
0087E5 90 7F [ 1] 558 clr (y)
|
|
559 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 780: RTC_TimeStruct->RTC_Minutes = 0;
|
|
0087E7 93 [ 1] 560 ldw x, y
|
|
0087E8 6F 01 [ 1] 561 clr (0x01, x)
|
|
562 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 781: RTC_TimeStruct->RTC_Seconds = 0;
|
|
0087EA 93 [ 1] 563 ldw x, y
|
|
0087EB 6F 02 [ 1] 564 clr (0x02, x)
|
|
565 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 782: }
|
|
0087ED 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 ; -----------------------------------------
|
|
0087EE 571 _RTC_GetTime:
|
|
0087EE 52 06 [ 2] 572 sub sp, #6
|
|
0087F0 6B 06 [ 1] 573 ld (0x06, sp), a
|
|
574 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 808: RTC_TimeStruct->RTC_Seconds = RTC->TR1;
|
|
0087F2 90 93 [ 1] 575 ldw y, x
|
|
0087F4 5C [ 1] 576 incw x
|
|
0087F5 5C [ 1] 577 incw x
|
|
0087F6 1F 01 [ 2] 578 ldw (0x01, sp), x
|
|
0087F8 C6 51 40 [ 1] 579 ld a, 0x5140
|
|
0087FB 1E 01 [ 2] 580 ldw x, (0x01, sp)
|
|
0087FD F7 [ 1] 581 ld (x), a
|
|
582 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 811: RTC_TimeStruct->RTC_Minutes = RTC->TR2;
|
|
0087FE 93 [ 1] 583 ldw x, y
|
|
0087FF 5C [ 1] 584 incw x
|
|
008800 1F 03 [ 2] 585 ldw (0x03, sp), x
|
|
008802 C6 51 41 [ 1] 586 ld a, 0x5141
|
|
008805 1E 03 [ 2] 587 ldw x, (0x03, sp)
|
|
008807 F7 [ 1] 588 ld (x), a
|
|
589 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 814: tmpreg = (uint8_t)RTC->TR3;
|
|
008808 C6 51 42 [ 1] 590 ld a, 0x5142
|
|
00880B 6B 05 [ 1] 591 ld (0x05, sp), a
|
|
592 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 817: (void) (RTC->DR3) ;
|
|
00880D 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));
|
|
008810 93 [ 1] 595 ldw x, y
|
|
008811 7B 05 [ 1] 596 ld a, (0x05, sp)
|
|
008813 A4 BF [ 1] 597 and a, #0xbf
|
|
008815 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);
|
|
008816 72 A9 00 03 [ 2] 600 addw y, #0x0003
|
|
00881A 7B 05 [ 1] 601 ld a, (0x05, sp)
|
|
00881C A4 40 [ 1] 602 and a, #0x40
|
|
00881E 90 F7 [ 1] 603 ld (y), a
|
|
604 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 827: if (RTC_Format == RTC_Format_BIN)
|
|
008820 0D 06 [ 1] 605 tnz (0x06, sp)
|
|
008822 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);
|
|
008824 F6 [ 1] 608 ld a, (x)
|
|
008825 89 [ 2] 609 pushw x
|
|
008826 CD 8E BC [ 4] 610 call _Bcd2ToByte
|
|
008829 85 [ 2] 611 popw x
|
|
00882A 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);
|
|
00882B 1E 03 [ 2] 614 ldw x, (0x03, sp)
|
|
00882D F6 [ 1] 615 ld a, (x)
|
|
00882E CD 8E BC [ 4] 616 call _Bcd2ToByte
|
|
008831 1E 03 [ 2] 617 ldw x, (0x03, sp)
|
|
008833 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);
|
|
008834 1E 01 [ 2] 620 ldw x, (0x01, sp)
|
|
008836 F6 [ 1] 621 ld a, (x)
|
|
008837 CD 8E BC [ 4] 622 call _Bcd2ToByte
|
|
00883A 1E 01 [ 2] 623 ldw x, (0x01, sp)
|
|
00883C F7 [ 1] 624 ld (x), a
|
|
00883D 625 00103$:
|
|
626 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 834: }
|
|
00883D 5B 06 [ 2] 627 addw sp, #6
|
|
00883F 81 [ 4] 628 ret
|
|
629 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 845: uint16_t RTC_GetSubSecond(void)
|
|
630 ; -----------------------------------------
|
|
631 ; function RTC_GetSubSecond
|
|
632 ; -----------------------------------------
|
|
008840 633 _RTC_GetSubSecond:
|
|
008840 89 [ 2] 634 pushw x
|
|
635 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 851: ssrhreg = RTC->SSRH;
|
|
008841 C6 51 57 [ 1] 636 ld a, 0x5157
|
|
008844 95 [ 1] 637 ld xh, a
|
|
638 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 852: ssrlreg = RTC->SSRL;
|
|
008845 C6 51 58 [ 1] 639 ld a, 0x5158
|
|
008848 97 [ 1] 640 ld xl, a
|
|
641 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 855: (void) (RTC->DR3);
|
|
008849 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));
|
|
00884C 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: }
|
|
00884E 5B 02 [ 2] 647 addw sp, #2
|
|
008850 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 ; -----------------------------------------
|
|
008851 653 _RTC_SetDate:
|
|
008851 52 0A [ 2] 654 sub sp, #10
|
|
008853 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))
|
|
008855 1F 08 [ 2] 657 ldw (0x08, sp), x
|
|
008857 5C [ 1] 658 incw x
|
|
008858 1F 01 [ 2] 659 ldw (0x01, sp), x
|
|
00885A 0D 0A [ 1] 660 tnz (0x0a, sp)
|
|
00885C 26 11 [ 1] 661 jrne 00106$
|
|
00885E 1E 01 [ 2] 662 ldw x, (0x01, sp)
|
|
008860 F6 [ 1] 663 ld a, (x)
|
|
008861 97 [ 1] 664 ld xl, a
|
|
008862 43 [ 1] 665 cpl a
|
|
008863 A5 10 [ 1] 666 bcp a, #0x10
|
|
008865 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);
|
|
008867 9F [ 1] 669 ld a, xl
|
|
008868 A4 EF [ 1] 670 and a, #0xef
|
|
00886A AB 0A [ 1] 671 add a, #0x0a
|
|
00886C 1E 01 [ 2] 672 ldw x, (0x01, sp)
|
|
00886E 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)));
|
|
00886F 675 00106$:
|
|
676 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 907: RTC->WPR = 0xCA;
|
|
00886F 35 CA 51 59 [ 1] 677 mov 0x5159+0, #0xca
|
|
678 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 908: RTC->WPR = 0x53;
|
|
008873 35 53 51 59 [ 1] 679 mov 0x5159+0, #0x53
|
|
680 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 911: if (RTC_EnterInitMode() == ERROR)
|
|
008877 CD 86 BB [ 4] 681 call _RTC_EnterInitMode
|
|
00887A 4D [ 1] 682 tnz a
|
|
00887B 26 07 [ 1] 683 jrne 00117$
|
|
684 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 913: status = ERROR;
|
|
00887D 4F [ 1] 685 clr a
|
|
686 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 915: RTC->WPR = 0xFF;
|
|
00887E 35 FF 51 59 [ 1] 687 mov 0x5159+0, #0xff
|
|
008882 20 71 [ 2] 688 jra 00118$
|
|
008884 689 00117$:
|
|
690 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 919: (void)(RTC->TR1);
|
|
008884 C6 51 40 [ 1] 691 ld a, 0x5140
|
|
692 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 924: RTC->DR1 = (uint8_t)(RTC_DateStruct->RTC_Date);
|
|
008887 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));
|
|
008889 16 08 [ 2] 695 ldw y, (0x08, sp)
|
|
00888B 17 03 [ 2] 696 ldw (0x03, sp), y
|
|
697 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 926: RTC->DR3 = (uint8_t)((RTC_DateStruct->RTC_Year));
|
|
00888D 16 08 [ 2] 698 ldw y, (0x08, sp)
|
|
00888F 72 A9 00 03 [ 2] 699 addw y, #0x0003
|
|
008893 17 05 [ 2] 700 ldw (0x05, sp), y
|
|
701 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 924: RTC->DR1 = (uint8_t)(RTC_DateStruct->RTC_Date);
|
|
008895 E6 02 [ 1] 702 ld a, (0x2, x)
|
|
703 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 922: if (RTC_Format != RTC_Format_BIN)
|
|
008897 0D 0A [ 1] 704 tnz (0x0a, sp)
|
|
008899 27 1C [ 1] 705 jreq 00108$
|
|
706 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 924: RTC->DR1 = (uint8_t)(RTC_DateStruct->RTC_Date);
|
|
00889B 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));
|
|
00889E 1E 01 [ 2] 709 ldw x, (0x01, sp)
|
|
0088A0 F6 [ 1] 710 ld a, (x)
|
|
0088A1 6B 07 [ 1] 711 ld (0x07, sp), a
|
|
0088A3 1E 03 [ 2] 712 ldw x, (0x03, sp)
|
|
0088A5 F6 [ 1] 713 ld a, (x)
|
|
0088A6 4E [ 1] 714 swap a
|
|
0088A7 A4 F0 [ 1] 715 and a, #0xf0
|
|
0088A9 48 [ 1] 716 sll a
|
|
0088AA 1A 07 [ 1] 717 or a, (0x07, sp)
|
|
0088AC C7 51 45 [ 1] 718 ld 0x5145, a
|
|
719 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 926: RTC->DR3 = (uint8_t)((RTC_DateStruct->RTC_Year));
|
|
0088AF 1E 05 [ 2] 720 ldw x, (0x05, sp)
|
|
0088B1 F6 [ 1] 721 ld a, (x)
|
|
0088B2 C7 51 46 [ 1] 722 ld 0x5146, a
|
|
0088B5 20 23 [ 2] 723 jra 00109$
|
|
0088B7 724 00108$:
|
|
725 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 930: RTC->DR1 = (uint8_t)(ByteToBcd2 ((uint8_t)RTC_DateStruct->RTC_Date));
|
|
0088B7 CD 8E A9 [ 4] 726 call _ByteToBcd2
|
|
0088BA 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));
|
|
0088BD 1E 01 [ 2] 729 ldw x, (0x01, sp)
|
|
0088BF F6 [ 1] 730 ld a, (x)
|
|
0088C0 CD 8E A9 [ 4] 731 call _ByteToBcd2
|
|
0088C3 6B 07 [ 1] 732 ld (0x07, sp), a
|
|
0088C5 1E 03 [ 2] 733 ldw x, (0x03, sp)
|
|
0088C7 F6 [ 1] 734 ld a, (x)
|
|
0088C8 4E [ 1] 735 swap a
|
|
0088C9 A4 F0 [ 1] 736 and a, #0xf0
|
|
0088CB 48 [ 1] 737 sll a
|
|
0088CC 1A 07 [ 1] 738 or a, (0x07, sp)
|
|
0088CE 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));
|
|
0088D1 1E 05 [ 2] 741 ldw x, (0x05, sp)
|
|
0088D3 F6 [ 1] 742 ld a, (x)
|
|
0088D4 CD 8E A9 [ 4] 743 call _ByteToBcd2
|
|
0088D7 C7 51 46 [ 1] 744 ld 0x5146, a
|
|
0088DA 745 00109$:
|
|
746 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 936: RTC->ISR1 &= (uint8_t)~RTC_ISR1_INIT;
|
|
0088DA 72 1F 51 4C [ 1] 747 bres 0x514c, #7
|
|
748 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 939: RTC->WPR = 0xFF;
|
|
0088DE 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)
|
|
0088E2 72 08 51 48 0C [ 2] 751 btjt 0x5148, #4, 00114$
|
|
752 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 944: if (RTC_WaitForSynchro() == ERROR)
|
|
0088E7 CD 86 E1 [ 4] 753 call _RTC_WaitForSynchro
|
|
0088EA 4D [ 1] 754 tnz a
|
|
0088EB 26 03 [ 1] 755 jrne 00111$
|
|
756 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 946: status = ERROR;
|
|
0088ED 4F [ 1] 757 clr a
|
|
0088EE 20 05 [ 2] 758 jra 00118$
|
|
0088F0 759 00111$:
|
|
760 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 950: status = SUCCESS;
|
|
0088F0 A6 01 [ 1] 761 ld a, #0x01
|
|
762 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 955: status = SUCCESS;
|
|
0088F2 C5 763 .byte 0xc5
|
|
0088F3 764 00114$:
|
|
0088F3 A6 01 [ 1] 765 ld a, #0x01
|
|
0088F5 766 00118$:
|
|
767 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 959: return (ErrorStatus)status;
|
|
768 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 960: }
|
|
0088F5 5B 0A [ 2] 769 addw sp, #10
|
|
0088F7 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 ; -----------------------------------------
|
|
0088F8 775 _RTC_DateStructInit:
|
|
0088F8 51 [ 1] 776 exgw x, y
|
|
777 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 971: RTC_DateStruct->RTC_WeekDay = RTC_Weekday_Monday;
|
|
0088F9 A6 01 [ 1] 778 ld a, #0x01
|
|
0088FB 90 F7 [ 1] 779 ld (y), a
|
|
780 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 972: RTC_DateStruct->RTC_Date = 1;
|
|
0088FD 93 [ 1] 781 ldw x, y
|
|
0088FE 5C [ 1] 782 incw x
|
|
0088FF 5C [ 1] 783 incw x
|
|
008900 A6 01 [ 1] 784 ld a, #0x01
|
|
008902 F7 [ 1] 785 ld (x), a
|
|
786 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 973: RTC_DateStruct->RTC_Month = RTC_Month_January;
|
|
008903 93 [ 1] 787 ldw x, y
|
|
008904 5C [ 1] 788 incw x
|
|
008905 A6 01 [ 1] 789 ld a, #0x01
|
|
008907 F7 [ 1] 790 ld (x), a
|
|
791 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 974: RTC_DateStruct->RTC_Year = 0;
|
|
008908 93 [ 1] 792 ldw x, y
|
|
008909 6F 03 [ 1] 793 clr (0x0003, x)
|
|
794 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 975: }
|
|
00890B 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 ; -----------------------------------------
|
|
00890C 800 _RTC_GetDate:
|
|
00890C 52 06 [ 2] 801 sub sp, #6
|
|
00890E 6B 06 [ 1] 802 ld (0x06, sp), a
|
|
008910 51 [ 1] 803 exgw x, y
|
|
804 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 997: (void) (RTC->TR1) ;
|
|
008911 C6 51 40 [ 1] 805 ld a, 0x5140
|
|
806 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 998: RTC_DateStruct->RTC_Date = (uint8_t)(RTC->DR1);
|
|
008914 93 [ 1] 807 ldw x, y
|
|
008915 5C [ 1] 808 incw x
|
|
008916 5C [ 1] 809 incw x
|
|
008917 1F 01 [ 2] 810 ldw (0x01, sp), x
|
|
008919 C6 51 44 [ 1] 811 ld a, 0x5144
|
|
00891C 1E 01 [ 2] 812 ldw x, (0x01, sp)
|
|
00891E F7 [ 1] 813 ld (x), a
|
|
814 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 999: tmpreg = (uint8_t)RTC->DR2;
|
|
00891F C6 51 45 [ 1] 815 ld a, 0x5145
|
|
008922 6B 03 [ 1] 816 ld (0x03, sp), a
|
|
817 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1000: RTC_DateStruct->RTC_Year = (uint8_t)(RTC->DR3);
|
|
008924 93 [ 1] 818 ldw x, y
|
|
008925 1C 00 03 [ 2] 819 addw x, #0x0003
|
|
008928 1F 04 [ 2] 820 ldw (0x04, sp), x
|
|
00892A C6 51 46 [ 1] 821 ld a, 0x5146
|
|
00892D 1E 04 [ 2] 822 ldw x, (0x04, sp)
|
|
00892F 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));
|
|
008930 93 [ 1] 825 ldw x, y
|
|
008931 5C [ 1] 826 incw x
|
|
008932 7B 03 [ 1] 827 ld a, (0x03, sp)
|
|
008934 A4 1F [ 1] 828 and a, #0x1f
|
|
008936 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);
|
|
008937 7B 03 [ 1] 831 ld a, (0x03, sp)
|
|
008939 A4 E0 [ 1] 832 and a, #0xe0
|
|
00893B 4E [ 1] 833 swap a
|
|
00893C A4 0F [ 1] 834 and a, #0x0f
|
|
00893E 44 [ 1] 835 srl a
|
|
00893F 90 F7 [ 1] 836 ld (y), a
|
|
837 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1007: if (RTC_Format == RTC_Format_BIN)
|
|
008941 0D 06 [ 1] 838 tnz (0x06, sp)
|
|
008943 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);
|
|
008945 16 04 [ 2] 841 ldw y, (0x04, sp)
|
|
008947 90 F6 [ 1] 842 ld a, (y)
|
|
008949 89 [ 2] 843 pushw x
|
|
00894A CD 8E BC [ 4] 844 call _Bcd2ToByte
|
|
00894D 85 [ 2] 845 popw x
|
|
00894E 16 04 [ 2] 846 ldw y, (0x04, sp)
|
|
008950 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);
|
|
008952 F6 [ 1] 849 ld a, (x)
|
|
008953 89 [ 2] 850 pushw x
|
|
008954 CD 8E BC [ 4] 851 call _Bcd2ToByte
|
|
008957 85 [ 2] 852 popw x
|
|
008958 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));
|
|
008959 1E 01 [ 2] 855 ldw x, (0x01, sp)
|
|
00895B F6 [ 1] 856 ld a, (x)
|
|
00895C CD 8E BC [ 4] 857 call _Bcd2ToByte
|
|
00895F 1E 01 [ 2] 858 ldw x, (0x01, sp)
|
|
008961 F7 [ 1] 859 ld (x), a
|
|
008962 860 00103$:
|
|
861 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1014: }
|
|
008962 5B 06 [ 2] 862 addw sp, #6
|
|
008964 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 ; -----------------------------------------
|
|
008965 868 _RTC_SetAlarm:
|
|
008965 52 11 [ 2] 869 sub sp, #17
|
|
008967 6B 11 [ 1] 870 ld (0x11, sp), a
|
|
008969 51 [ 1] 871 exgw x, y
|
|
872 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1062: if ((RTC->CR1 & RTC_CR1_FMT) != RESET)
|
|
00896A 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 )
|
|
00896D 93 [ 1] 875 ldw x, y
|
|
00896E 1C 00 04 [ 2] 876 addw x, #0x0004
|
|
008971 1F 05 [ 2] 877 ldw (0x05, sp), x
|
|
878 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1108: RTC->WPR = 0xCA;
|
|
008973 35 CA 51 59 [ 1] 879 mov 0x5159+0, #0xca
|
|
880 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1109: RTC->WPR = 0x53;
|
|
008977 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) | \
|
|
00897B 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) | \
|
|
00897D 93 [ 1] 885 ldw x, y
|
|
00897E 5C [ 1] 886 incw x
|
|
00897F 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) | \
|
|
008981 17 07 [ 2] 889 ldw (0x07, sp), y
|
|
008983 93 [ 1] 890 ldw x, y
|
|
008984 1C 00 03 [ 2] 891 addw x, #0x0003
|
|
008987 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) | \
|
|
008989 93 [ 1] 894 ldw x, y
|
|
00898A 1C 00 06 [ 2] 895 addw x, #0x0006
|
|
00898D 1F 0B [ 2] 896 ldw (0x0b, sp), x
|
|
00898F 93 [ 1] 897 ldw x, y
|
|
008990 1C 00 05 [ 2] 898 addw x, #0x0005
|
|
008993 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) | \
|
|
008995 1E 01 [ 2] 901 ldw x, (0x01, sp)
|
|
008997 E6 02 [ 1] 902 ld a, (0x2, x)
|
|
008999 6B 10 [ 1] 903 ld (0x10, sp), a
|
|
904 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1113: if (RTC_Format != RTC_Format_BIN)
|
|
00899B 0D 11 [ 1] 905 tnz (0x11, sp)
|
|
00899D 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) | \
|
|
00899F 1E 05 [ 2] 908 ldw x, (0x05, sp)
|
|
0089A1 F6 [ 1] 909 ld a, (x)
|
|
0089A2 97 [ 1] 910 ld xl, a
|
|
0089A3 A4 80 [ 1] 911 and a, #0x80
|
|
0089A5 1A 10 [ 1] 912 or a, (0x10, sp)
|
|
0089A7 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) | \
|
|
0089A9 16 03 [ 2] 915 ldw y, (0x03, sp)
|
|
0089AB 90 F6 [ 1] 916 ld a, (y)
|
|
0089AD 6B 10 [ 1] 917 ld (0x10, sp), a
|
|
0089AF 9F [ 1] 918 ld a, xl
|
|
0089B0 48 [ 1] 919 sll a
|
|
0089B1 A4 80 [ 1] 920 and a, #0x80
|
|
0089B3 1A 10 [ 1] 921 or a, (0x10, sp)
|
|
0089B5 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) | \
|
|
0089B7 16 07 [ 2] 924 ldw y, (0x07, sp)
|
|
0089B9 90 F6 [ 1] 925 ld a, (y)
|
|
0089BB 6B 06 [ 1] 926 ld (0x06, sp), a
|
|
0089BD 16 09 [ 2] 927 ldw y, (0x09, sp)
|
|
0089BF 90 F6 [ 1] 928 ld a, (y)
|
|
0089C1 1A 06 [ 1] 929 or a, (0x06, sp)
|
|
0089C3 6B 0A [ 1] 930 ld (0x0a, sp), a
|
|
0089C5 9F [ 1] 931 ld a, xl
|
|
0089C6 48 [ 1] 932 sll a
|
|
0089C7 48 [ 1] 933 sll a
|
|
0089C8 A4 80 [ 1] 934 and a, #0x80
|
|
0089CA 1A 0A [ 1] 935 or a, (0x0a, sp)
|
|
0089CC 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) | \
|
|
0089CE 16 0B [ 2] 938 ldw y, (0x0b, sp)
|
|
0089D0 90 F6 [ 1] 939 ld a, (y)
|
|
0089D2 6B 09 [ 1] 940 ld (0x09, sp), a
|
|
0089D4 16 0D [ 2] 941 ldw y, (0x0d, sp)
|
|
0089D6 90 F6 [ 1] 942 ld a, (y)
|
|
0089D8 1A 09 [ 1] 943 or a, (0x09, sp)
|
|
0089DA 6B 0E [ 1] 944 ld (0x0e, sp), a
|
|
0089DC 9F [ 1] 945 ld a, xl
|
|
0089DD 48 [ 1] 946 sll a
|
|
0089DE 48 [ 1] 947 sll a
|
|
0089DF 48 [ 1] 948 sll a
|
|
0089E0 A4 80 [ 1] 949 and a, #0x80
|
|
0089E2 1A 0E [ 1] 950 or a, (0x0e, sp)
|
|
0089E4 20 55 [ 2] 951 jra 00117$
|
|
0089E6 952 00116$:
|
|
953 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1132: tmpreg1 = (uint8_t)((ByteToBcd2(RTC_AlarmStruct->RTC_AlarmTime.RTC_Seconds)) | \
|
|
0089E6 7B 10 [ 1] 954 ld a, (0x10, sp)
|
|
0089E8 CD 8E A9 [ 4] 955 call _ByteToBcd2
|
|
0089EB 6B 10 [ 1] 956 ld (0x10, sp), a
|
|
0089ED 1E 05 [ 2] 957 ldw x, (0x05, sp)
|
|
0089EF F6 [ 1] 958 ld a, (x)
|
|
0089F0 A4 80 [ 1] 959 and a, #0x80
|
|
0089F2 1A 10 [ 1] 960 or a, (0x10, sp)
|
|
0089F4 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)) | \
|
|
0089F6 1E 03 [ 2] 963 ldw x, (0x03, sp)
|
|
0089F8 F6 [ 1] 964 ld a, (x)
|
|
0089F9 CD 8E A9 [ 4] 965 call _ByteToBcd2
|
|
0089FC 6B 10 [ 1] 966 ld (0x10, sp), a
|
|
0089FE 1E 05 [ 2] 967 ldw x, (0x05, sp)
|
|
008A00 F6 [ 1] 968 ld a, (x)
|
|
008A01 48 [ 1] 969 sll a
|
|
008A02 A4 80 [ 1] 970 and a, #0x80
|
|
008A04 1A 10 [ 1] 971 or a, (0x10, sp)
|
|
008A06 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)) | \
|
|
008A08 1E 07 [ 2] 974 ldw x, (0x07, sp)
|
|
008A0A F6 [ 1] 975 ld a, (x)
|
|
008A0B CD 8E A9 [ 4] 976 call _ByteToBcd2
|
|
008A0E 6B 08 [ 1] 977 ld (0x08, sp), a
|
|
008A10 1E 09 [ 2] 978 ldw x, (0x09, sp)
|
|
008A12 F6 [ 1] 979 ld a, (x)
|
|
008A13 1A 08 [ 1] 980 or a, (0x08, sp)
|
|
008A15 6B 0A [ 1] 981 ld (0x0a, sp), a
|
|
008A17 1E 05 [ 2] 982 ldw x, (0x05, sp)
|
|
008A19 F6 [ 1] 983 ld a, (x)
|
|
008A1A 48 [ 1] 984 sll a
|
|
008A1B 48 [ 1] 985 sll a
|
|
008A1C A4 80 [ 1] 986 and a, #0x80
|
|
008A1E 1A 0A [ 1] 987 or a, (0x0a, sp)
|
|
008A20 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)) | \
|
|
008A22 1E 0B [ 2] 990 ldw x, (0x0b, sp)
|
|
008A24 F6 [ 1] 991 ld a, (x)
|
|
008A25 CD 8E A9 [ 4] 992 call _ByteToBcd2
|
|
008A28 6B 0C [ 1] 993 ld (0x0c, sp), a
|
|
008A2A 1E 0D [ 2] 994 ldw x, (0x0d, sp)
|
|
008A2C F6 [ 1] 995 ld a, (x)
|
|
008A2D 1A 0C [ 1] 996 or a, (0x0c, sp)
|
|
008A2F 6B 0E [ 1] 997 ld (0x0e, sp), a
|
|
008A31 1E 05 [ 2] 998 ldw x, (0x05, sp)
|
|
008A33 F6 [ 1] 999 ld a, (x)
|
|
008A34 48 [ 1] 1000 sll a
|
|
008A35 48 [ 1] 1001 sll a
|
|
008A36 48 [ 1] 1002 sll a
|
|
008A37 A4 80 [ 1] 1003 and a, #0x80
|
|
008A39 1A 0E [ 1] 1004 or a, (0x0e, sp)
|
|
008A3B 1005 00117$:
|
|
1006 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1148: RTC->ALRMAR1 = tmpreg1;
|
|
008A3B AE 51 5C [ 2] 1007 ldw x, #0x515c
|
|
008A3E 88 [ 1] 1008 push a
|
|
008A3F 7B 10 [ 1] 1009 ld a, (0x10, sp)
|
|
008A41 F7 [ 1] 1010 ld (x), a
|
|
008A42 84 [ 1] 1011 pop a
|
|
1012 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1149: RTC->ALRMAR2 = tmpreg2;
|
|
008A43 AE 51 5D [ 2] 1013 ldw x, #0x515d
|
|
008A46 88 [ 1] 1014 push a
|
|
008A47 7B 11 [ 1] 1015 ld a, (0x11, sp)
|
|
008A49 F7 [ 1] 1016 ld (x), a
|
|
008A4A 84 [ 1] 1017 pop a
|
|
1018 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1150: RTC->ALRMAR3 = tmpreg3;
|
|
008A4B AE 51 5E [ 2] 1019 ldw x, #0x515e
|
|
008A4E 88 [ 1] 1020 push a
|
|
008A4F 7B 0B [ 1] 1021 ld a, (0x0b, sp)
|
|
008A51 F7 [ 1] 1022 ld (x), a
|
|
008A52 84 [ 1] 1023 pop a
|
|
1024 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1151: RTC->ALRMAR4 = tmpreg4;
|
|
008A53 C7 51 5F [ 1] 1025 ld 0x515f, a
|
|
1026 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1154: RTC->WPR = 0xFF;
|
|
008A56 35 FF 51 59 [ 1] 1027 mov 0x5159+0, #0xff
|
|
1028 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1155: }
|
|
008A5A 5B 11 [ 2] 1029 addw sp, #17
|
|
008A5C 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 ; -----------------------------------------
|
|
008A5D 1035 _RTC_AlarmStructInit:
|
|
1036 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1168: RTC_AlarmStruct->RTC_AlarmTime.RTC_H12 = RTC_H12_AM;
|
|
008A5D 90 93 [ 1] 1037 ldw y, x
|
|
008A5F 6F 03 [ 1] 1038 clr (0x0003, x)
|
|
1039 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1169: RTC_AlarmStruct->RTC_AlarmTime.RTC_Hours = 0;
|
|
008A61 90 7F [ 1] 1040 clr (y)
|
|
1041 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1170: RTC_AlarmStruct->RTC_AlarmTime.RTC_Minutes = 0;
|
|
008A63 93 [ 1] 1042 ldw x, y
|
|
008A64 6F 01 [ 1] 1043 clr (0x01, x)
|
|
1044 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1171: RTC_AlarmStruct->RTC_AlarmTime.RTC_Seconds = 0;
|
|
008A66 93 [ 1] 1045 ldw x, y
|
|
008A67 6F 02 [ 1] 1046 clr (0x02, x)
|
|
1047 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1174: RTC_AlarmStruct->RTC_AlarmDateWeekDaySel = RTC_AlarmDateWeekDaySel_Date;
|
|
008A69 93 [ 1] 1048 ldw x, y
|
|
008A6A 6F 05 [ 1] 1049 clr (0x0005, x)
|
|
1050 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1175: RTC_AlarmStruct->RTC_AlarmDateWeekDay = 1;
|
|
008A6C A6 01 [ 1] 1051 ld a, #0x01
|
|
008A6E 90 E7 06 [ 1] 1052 ld (0x0006, y), a
|
|
1053 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1178: RTC_AlarmStruct->RTC_AlarmMask = RTC_AlarmMask_All;
|
|
008A71 A6 F0 [ 1] 1054 ld a, #0xf0
|
|
008A73 90 E7 04 [ 1] 1055 ld (0x0004, y), a
|
|
1056 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1179: }
|
|
008A76 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 ; -----------------------------------------
|
|
008A77 1062 _RTC_GetAlarm:
|
|
008A77 52 0B [ 2] 1063 sub sp, #11
|
|
008A79 6B 0B [ 1] 1064 ld (0x0b, sp), a
|
|
008A7B 1F 09 [ 2] 1065 ldw (0x09, sp), x
|
|
1066 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1201: tmpreg1 = (uint8_t)RTC->ALRMAR1;
|
|
008A7D C6 51 5C [ 1] 1067 ld a, 0x515c
|
|
008A80 6B 08 [ 1] 1068 ld (0x08, sp), a
|
|
1069 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1202: tmpreg2 = (uint8_t)RTC->ALRMAR2;
|
|
008A82 C6 51 5D [ 1] 1070 ld a, 0x515d
|
|
008A85 6B 01 [ 1] 1071 ld (0x01, sp), a
|
|
1072 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1203: tmpreg3 = (uint8_t)RTC->ALRMAR3;
|
|
008A87 C6 51 5E [ 1] 1073 ld a, 0x515e
|
|
008A8A 6B 02 [ 1] 1074 ld (0x02, sp), a
|
|
1075 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1204: tmpreg4 = (uint8_t)RTC->ALRMAR4;
|
|
008A8C C6 51 5F [ 1] 1076 ld a, 0x515f
|
|
008A8F 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));
|
|
008A91 1E 09 [ 2] 1079 ldw x, (0x09, sp)
|
|
008A93 5C [ 1] 1080 incw x
|
|
008A94 5C [ 1] 1081 incw x
|
|
008A95 1F 04 [ 2] 1082 ldw (0x04, sp), x
|
|
008A97 7B 08 [ 1] 1083 ld a, (0x08, sp)
|
|
008A99 A4 7F [ 1] 1084 and a, #0x7f
|
|
008A9B 1E 04 [ 2] 1085 ldw x, (0x04, sp)
|
|
008A9D F7 [ 1] 1086 ld (x), a
|
|
1087 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1208: alarmmask = (uint8_t)(tmpreg1 & RTC_ALRMAR1_MSK1);
|
|
008A9E 7B 08 [ 1] 1088 ld a, (0x08, sp)
|
|
008AA0 A4 80 [ 1] 1089 and a, #0x80
|
|
008AA2 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));
|
|
008AA4 1E 09 [ 2] 1092 ldw x, (0x09, sp)
|
|
008AA6 5C [ 1] 1093 incw x
|
|
008AA7 1F 06 [ 2] 1094 ldw (0x06, sp), x
|
|
008AA9 7B 01 [ 1] 1095 ld a, (0x01, sp)
|
|
008AAB A4 7F [ 1] 1096 and a, #0x7f
|
|
008AAD 1E 06 [ 2] 1097 ldw x, (0x06, sp)
|
|
008AAF 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));
|
|
008AB0 7B 01 [ 1] 1100 ld a, (0x01, sp)
|
|
008AB2 A4 80 [ 1] 1101 and a, #0x80
|
|
008AB4 44 [ 1] 1102 srl a
|
|
008AB5 1A 08 [ 1] 1103 or a, (0x08, sp)
|
|
008AB7 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));
|
|
008AB9 16 09 [ 2] 1106 ldw y, (0x09, sp)
|
|
008ABB 7B 02 [ 1] 1107 ld a, (0x02, sp)
|
|
008ABD A4 3F [ 1] 1108 and a, #0x3f
|
|
008ABF 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);
|
|
008AC1 1E 09 [ 2] 1111 ldw x, (0x09, sp)
|
|
008AC3 1C 00 03 [ 2] 1112 addw x, #0x0003
|
|
008AC6 7B 02 [ 1] 1113 ld a, (0x02, sp)
|
|
008AC8 A4 40 [ 1] 1114 and a, #0x40
|
|
008ACA 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));
|
|
008ACB 7B 02 [ 1] 1117 ld a, (0x02, sp)
|
|
008ACD A4 80 [ 1] 1118 and a, #0x80
|
|
008ACF 44 [ 1] 1119 srl a
|
|
008AD0 44 [ 1] 1120 srl a
|
|
008AD1 1A 08 [ 1] 1121 or a, (0x08, sp)
|
|
008AD3 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));
|
|
008AD5 1E 09 [ 2] 1124 ldw x, (0x09, sp)
|
|
008AD7 1C 00 06 [ 2] 1125 addw x, #0x0006
|
|
008ADA 1F 01 [ 2] 1126 ldw (0x01, sp), x
|
|
008ADC 7B 03 [ 1] 1127 ld a, (0x03, sp)
|
|
008ADE A4 3F [ 1] 1128 and a, #0x3f
|
|
008AE0 1E 01 [ 2] 1129 ldw x, (0x01, sp)
|
|
008AE2 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);
|
|
008AE3 1E 09 [ 2] 1132 ldw x, (0x09, sp)
|
|
008AE5 1C 00 05 [ 2] 1133 addw x, #0x0005
|
|
008AE8 7B 03 [ 1] 1134 ld a, (0x03, sp)
|
|
008AEA A4 40 [ 1] 1135 and a, #0x40
|
|
008AEC 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));
|
|
008AED 7B 03 [ 1] 1138 ld a, (0x03, sp)
|
|
008AEF A4 80 [ 1] 1139 and a, #0x80
|
|
008AF1 44 [ 1] 1140 srl a
|
|
008AF2 44 [ 1] 1141 srl a
|
|
008AF3 44 [ 1] 1142 srl a
|
|
008AF4 1A 08 [ 1] 1143 or a, (0x08, sp)
|
|
1144 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1224: RTC_AlarmStruct->RTC_AlarmMask = alarmmask;
|
|
008AF6 1E 09 [ 2] 1145 ldw x, (0x09, sp)
|
|
008AF8 1C 00 04 [ 2] 1146 addw x, #0x0004
|
|
008AFB F7 [ 1] 1147 ld (x), a
|
|
1148 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1226: if (RTC_Format == RTC_Format_BIN)
|
|
008AFC 0D 0B [ 1] 1149 tnz (0x0b, sp)
|
|
008AFE 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);
|
|
008B00 90 F6 [ 1] 1152 ld a, (y)
|
|
008B02 90 89 [ 2] 1153 pushw y
|
|
008B04 CD 8E BC [ 4] 1154 call _Bcd2ToByte
|
|
008B07 90 85 [ 2] 1155 popw y
|
|
008B09 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);
|
|
008B0B 1E 06 [ 2] 1158 ldw x, (0x06, sp)
|
|
008B0D F6 [ 1] 1159 ld a, (x)
|
|
008B0E CD 8E BC [ 4] 1160 call _Bcd2ToByte
|
|
008B11 1E 06 [ 2] 1161 ldw x, (0x06, sp)
|
|
008B13 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);
|
|
008B14 1E 04 [ 2] 1164 ldw x, (0x04, sp)
|
|
008B16 F6 [ 1] 1165 ld a, (x)
|
|
008B17 CD 8E BC [ 4] 1166 call _Bcd2ToByte
|
|
008B1A 1E 04 [ 2] 1167 ldw x, (0x04, sp)
|
|
008B1C F7 [ 1] 1168 ld (x), a
|
|
1169 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1231: RTC_AlarmStruct->RTC_AlarmDateWeekDay = Bcd2ToByte(RTC_AlarmStruct->RTC_AlarmDateWeekDay);
|
|
008B1D 1E 01 [ 2] 1170 ldw x, (0x01, sp)
|
|
008B1F F6 [ 1] 1171 ld a, (x)
|
|
008B20 CD 8E BC [ 4] 1172 call _Bcd2ToByte
|
|
008B23 1E 01 [ 2] 1173 ldw x, (0x01, sp)
|
|
008B25 F7 [ 1] 1174 ld (x), a
|
|
008B26 1175 00103$:
|
|
1176 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1233: }
|
|
008B26 5B 0B [ 2] 1177 addw sp, #11
|
|
008B28 81 [ 4] 1178 ret
|
|
1179 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1242: ErrorStatus RTC_AlarmCmd(FunctionalState NewState)
|
|
1180 ; -----------------------------------------
|
|
1181 ; function RTC_AlarmCmd
|
|
1182 ; -----------------------------------------
|
|
008B29 1183 _RTC_AlarmCmd:
|
|
008B29 52 03 [ 2] 1184 sub sp, #3
|
|
008B2B 6B 03 [ 1] 1185 ld (0x03, sp), a
|
|
1186 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1244: __IO uint16_t alrawfcount = 0;
|
|
008B2D 5F [ 1] 1187 clrw x
|
|
008B2E 1F 01 [ 2] 1188 ldw (0x01, sp), x
|
|
1189 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1252: RTC->WPR = 0xCA;
|
|
008B30 35 CA 51 59 [ 1] 1190 mov 0x5159+0, #0xca
|
|
1191 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1253: RTC->WPR = 0x53;
|
|
008B34 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);
|
|
008B38 C6 51 49 [ 1] 1194 ld a, 0x5149
|
|
1195 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1256: if (NewState != DISABLE)
|
|
008B3B 0D 03 [ 1] 1196 tnz (0x03, sp)
|
|
008B3D 27 09 [ 1] 1197 jreq 00109$
|
|
1198 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1258: RTC->CR2 |= (uint8_t)(RTC_CR2_ALRAE);
|
|
008B3F AA 01 [ 1] 1199 or a, #0x01
|
|
008B41 C7 51 49 [ 1] 1200 ld 0x5149, a
|
|
1201 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1259: status = SUCCESS;
|
|
008B44 A6 01 [ 1] 1202 ld a, #0x01
|
|
008B46 20 22 [ 2] 1203 jra 00110$
|
|
008B48 1204 00109$:
|
|
1205 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1263: RTC->CR2 &= (uint8_t)~(RTC_CR2_ALRAE) ;
|
|
008B48 A4 FE [ 1] 1206 and a, #0xfe
|
|
008B4A C7 51 49 [ 1] 1207 ld 0x5149, a
|
|
1208 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1266: temp1 = (uint8_t)(RTC->ISR1 & RTC_ISR1_ALRAWF);
|
|
008B4D C6 51 4C [ 1] 1209 ld a, 0x514c
|
|
008B50 A4 01 [ 1] 1210 and a, #0x01
|
|
1211 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1267: while ((alrawfcount != ALRAWF_TIMEOUT) && (temp1 == RESET))
|
|
008B52 1212 00102$:
|
|
008B52 1E 01 [ 2] 1213 ldw x, (0x01, sp)
|
|
008B54 5C [ 1] 1214 incw x
|
|
008B55 27 0A [ 1] 1215 jreq 00104$
|
|
008B57 4D [ 1] 1216 tnz a
|
|
008B58 26 07 [ 1] 1217 jrne 00104$
|
|
1218 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1269: alrawfcount++;
|
|
008B5A 1E 01 [ 2] 1219 ldw x, (0x01, sp)
|
|
008B5C 5C [ 1] 1220 incw x
|
|
008B5D 1F 01 [ 2] 1221 ldw (0x01, sp), x
|
|
008B5F 20 F1 [ 2] 1222 jra 00102$
|
|
008B61 1223 00104$:
|
|
1224 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1272: if ((RTC->ISR1 & RTC_ISR1_ALRAWF) == RESET)
|
|
008B61 72 00 51 4C 02 [ 2] 1225 btjt 0x514c, #0, 00106$
|
|
1226 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1274: status = ERROR;
|
|
008B66 4F [ 1] 1227 clr a
|
|
1228 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1278: status = SUCCESS;
|
|
008B67 C5 1229 .byte 0xc5
|
|
008B68 1230 00106$:
|
|
008B68 A6 01 [ 1] 1231 ld a, #0x01
|
|
008B6A 1232 00110$:
|
|
1233 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1283: RTC->WPR = 0xFF;
|
|
008B6A 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: }
|
|
008B6E 5B 03 [ 2] 1237 addw sp, #3
|
|
008B70 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 ; -----------------------------------------
|
|
008B71 1243 _RTC_AlarmSubSecondConfig:
|
|
008B71 89 [ 2] 1244 pushw x
|
|
008B72 6B 02 [ 1] 1245 ld (0x02, sp), a
|
|
1246 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1309: RTC->WPR = 0xCA;
|
|
008B74 35 CA 51 59 [ 1] 1247 mov 0x5159+0, #0xca
|
|
1248 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1310: RTC->WPR = 0x53;
|
|
008B78 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)
|
|
008B7C 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);
|
|
008B81 C6 51 49 [ 1] 1253 ld a, 0x5149
|
|
008B84 AA 01 [ 1] 1254 or a, #0x01
|
|
008B86 6B 01 [ 1] 1255 ld (0x01, sp), a
|
|
1256 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1319: RTC->CR2 &= (uint8_t)~(RTC_CR2_ALRAE);
|
|
008B88 72 11 51 49 [ 1] 1257 bres 0x5149, #0
|
|
1258 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1322: RTC->ALRMASSRH = (uint8_t)(RTC_AlarmSubSecondValue >> 8);
|
|
008B8C 9E [ 1] 1259 ld a, xh
|
|
008B8D C7 51 64 [ 1] 1260 ld 0x5164, a
|
|
1261 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1323: RTC->ALRMASSRL = (uint8_t)(RTC_AlarmSubSecondValue);
|
|
008B90 9F [ 1] 1262 ld a, xl
|
|
008B91 C7 51 65 [ 1] 1263 ld 0x5165, a
|
|
1264 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1324: RTC->ALRMASSMSKR = (uint8_t)RTC_AlarmSubSecondMask;
|
|
008B94 AE 51 66 [ 2] 1265 ldw x, #0x5166
|
|
008B97 7B 02 [ 1] 1266 ld a, (0x02, sp)
|
|
008B99 F7 [ 1] 1267 ld (x), a
|
|
1268 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1327: RTC->CR2 |= alarmstatus;
|
|
008B9A C6 51 49 [ 1] 1269 ld a, 0x5149
|
|
008B9D 1A 01 [ 1] 1270 or a, (0x01, sp)
|
|
008B9F C7 51 49 [ 1] 1271 ld 0x5149, a
|
|
1272 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1329: status = SUCCESS;
|
|
008BA2 A6 01 [ 1] 1273 ld a, #0x01
|
|
1274 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1333: status = ERROR;
|
|
008BA4 21 1275 .byte 0x21
|
|
008BA5 1276 00102$:
|
|
008BA5 4F [ 1] 1277 clr a
|
|
008BA6 1278 00103$:
|
|
1279 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1337: RTC->WPR = 0xFF;
|
|
008BA6 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: }
|
|
008BAA 85 [ 2] 1283 popw x
|
|
008BAB 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 ; -----------------------------------------
|
|
008BAC 1289 _RTC_WakeUpClockConfig:
|
|
008BAC 88 [ 1] 1290 push a
|
|
008BAD 6B 01 [ 1] 1291 ld (0x01, sp), a
|
|
1292 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1376: RTC->WPR = 0xCA;
|
|
008BAF 35 CA 51 59 [ 1] 1293 mov 0x5159+0, #0xca
|
|
1294 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1377: RTC->WPR = 0x53;
|
|
008BB3 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;
|
|
008BB7 72 15 51 49 [ 1] 1297 bres 0x5149, #2
|
|
1298 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1383: RTC->CR1 &= (uint8_t)~RTC_CR1_WUCKSEL;
|
|
008BBB C6 51 48 [ 1] 1299 ld a, 0x5148
|
|
008BBE A4 F8 [ 1] 1300 and a, #0xf8
|
|
008BC0 C7 51 48 [ 1] 1301 ld 0x5148, a
|
|
1302 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1386: RTC->CR1 |= (uint8_t)RTC_WakeUpClock;
|
|
008BC3 C6 51 48 [ 1] 1303 ld a, 0x5148
|
|
008BC6 1A 01 [ 1] 1304 or a, (0x01, sp)
|
|
008BC8 C7 51 48 [ 1] 1305 ld 0x5148, a
|
|
1306 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1389: RTC->WPR = 0xFF;
|
|
008BCB 35 FF 51 59 [ 1] 1307 mov 0x5159+0, #0xff
|
|
1308 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1390: }
|
|
008BCF 84 [ 1] 1309 pop a
|
|
008BD0 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 ; -----------------------------------------
|
|
008BD1 1315 _RTC_SetWakeUpCounter:
|
|
1316 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1403: RTC->WPR = 0xCA;
|
|
008BD1 35 CA 51 59 [ 1] 1317 mov 0x5159+0, #0xca
|
|
1318 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1404: RTC->WPR = 0x53;
|
|
008BD5 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);
|
|
008BD9 9E [ 1] 1321 ld a, xh
|
|
008BDA C7 51 54 [ 1] 1322 ld 0x5154, a
|
|
1323 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1409: RTC->WUTRL = (uint8_t)(RTC_WakeupCounter);
|
|
008BDD 9F [ 1] 1324 ld a, xl
|
|
008BDE C7 51 55 [ 1] 1325 ld 0x5155, a
|
|
1326 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1412: RTC->WPR = 0xFF;
|
|
008BE1 35 FF 51 59 [ 1] 1327 mov 0x5159+0, #0xff
|
|
1328 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1413: }
|
|
008BE5 81 [ 4] 1329 ret
|
|
1330 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1420: uint16_t RTC_GetWakeUpCounter(void)
|
|
1331 ; -----------------------------------------
|
|
1332 ; function RTC_GetWakeUpCounter
|
|
1333 ; -----------------------------------------
|
|
008BE6 1334 _RTC_GetWakeUpCounter:
|
|
008BE6 89 [ 2] 1335 pushw x
|
|
1336 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1425: tmpreg = ((uint16_t)RTC->WUTRH) << 8;
|
|
008BE7 C6 51 54 [ 1] 1337 ld a, 0x5154
|
|
008BEA 95 [ 1] 1338 ld xh, a
|
|
008BEB 0F 02 [ 1] 1339 clr (0x02, sp)
|
|
1340 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1426: tmpreg |= RTC->WUTRL;
|
|
008BED C6 51 55 [ 1] 1341 ld a, 0x5155
|
|
1342 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1429: return (uint16_t)tmpreg;
|
|
008BF0 97 [ 1] 1343 ld xl, a
|
|
1344 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1430: }
|
|
008BF1 5B 02 [ 2] 1345 addw sp, #2
|
|
008BF3 81 [ 4] 1346 ret
|
|
1347 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1440: ErrorStatus RTC_WakeUpCmd(FunctionalState NewState)
|
|
1348 ; -----------------------------------------
|
|
1349 ; function RTC_WakeUpCmd
|
|
1350 ; -----------------------------------------
|
|
008BF4 1351 _RTC_WakeUpCmd:
|
|
008BF4 88 [ 1] 1352 push a
|
|
008BF5 6B 01 [ 1] 1353 ld (0x01, sp), a
|
|
1354 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1449: RTC->WPR = 0xCA;
|
|
008BF7 35 CA 51 59 [ 1] 1355 mov 0x5159+0, #0xca
|
|
1356 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1450: RTC->WPR = 0x53;
|
|
008BFB 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;
|
|
008BFF C6 51 49 [ 1] 1359 ld a, 0x5149
|
|
1360 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1452: if (NewState != DISABLE)
|
|
008C02 0D 01 [ 1] 1361 tnz (0x01, sp)
|
|
008C04 27 09 [ 1] 1362 jreq 00109$
|
|
1363 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1455: RTC->CR2 |= (uint8_t)RTC_CR2_WUTE;
|
|
008C06 AA 04 [ 1] 1364 or a, #0x04
|
|
008C08 C7 51 49 [ 1] 1365 ld 0x5149, a
|
|
1366 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1457: status = SUCCESS;
|
|
008C0B A6 01 [ 1] 1367 ld a, #0x01
|
|
008C0D 20 1C [ 2] 1368 jra 00110$
|
|
008C0F 1369 00109$:
|
|
1370 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1462: RTC->CR2 &= (uint8_t)~RTC_CR2_WUTE;
|
|
008C0F A4 FB [ 1] 1371 and a, #0xfb
|
|
008C11 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))
|
|
008C14 5F [ 1] 1374 clrw x
|
|
008C15 1375 00102$:
|
|
008C15 72 04 51 4C 08 [ 2] 1376 btjt 0x514c, #2, 00104$
|
|
008C1A A3 FF FF [ 2] 1377 cpw x, #0xffff
|
|
008C1D 27 03 [ 1] 1378 jreq 00104$
|
|
1379 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1467: wutwfcount++;
|
|
008C1F 5C [ 1] 1380 incw x
|
|
008C20 20 F3 [ 2] 1381 jra 00102$
|
|
008C22 1382 00104$:
|
|
1383 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1471: if ((RTC->ISR1 & RTC_ISR1_WUTWF) == RESET)
|
|
008C22 72 04 51 4C 02 [ 2] 1384 btjt 0x514c, #2, 00106$
|
|
1385 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1473: status = ERROR;
|
|
008C27 4F [ 1] 1386 clr a
|
|
1387 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1477: status = SUCCESS;
|
|
008C28 C5 1388 .byte 0xc5
|
|
008C29 1389 00106$:
|
|
008C29 A6 01 [ 1] 1390 ld a, #0x01
|
|
008C2B 1391 00110$:
|
|
1392 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1482: RTC->WPR = 0xFF;
|
|
008C2B 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: }
|
|
008C2F 5B 01 [ 2] 1396 addw sp, #1
|
|
008C31 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 ; -----------------------------------------
|
|
008C32 1402 _RTC_DayLightSavingConfig:
|
|
008C32 88 [ 1] 1403 push a
|
|
008C33 97 [ 1] 1404 ld xl, a
|
|
1405 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1530: RTC->WPR = 0xCA;
|
|
008C34 35 CA 51 59 [ 1] 1406 mov 0x5159+0, #0xca
|
|
1407 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1531: RTC->WPR = 0x53;
|
|
008C38 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);
|
|
008C3C C6 51 4A [ 1] 1410 ld a, 0x514a
|
|
008C3F A4 FB [ 1] 1411 and a, #0xfb
|
|
008C41 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);
|
|
008C44 C6 51 4A [ 1] 1414 ld a, 0x514a
|
|
008C47 6B 01 [ 1] 1415 ld (0x01, sp), a
|
|
008C49 9F [ 1] 1416 ld a, xl
|
|
008C4A 1A 04 [ 1] 1417 or a, (0x04, sp)
|
|
008C4C 1A 01 [ 1] 1418 or a, (0x01, sp)
|
|
008C4E C7 51 4A [ 1] 1419 ld 0x514a, a
|
|
1420 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1540: RTC->WPR = 0xFF;
|
|
008C51 35 FF 51 59 [ 1] 1421 mov 0x5159+0, #0xff
|
|
1422 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1541: }
|
|
008C55 84 [ 1] 1423 pop a
|
|
008C56 85 [ 2] 1424 popw x
|
|
008C57 84 [ 1] 1425 pop a
|
|
008C58 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 ; -----------------------------------------
|
|
008C59 1431 _RTC_GetStoreOperation:
|
|
1432 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1552: return (RTC_StoreOperation_TypeDef)(RTC->CR3 & RTC_CR3_BCK);
|
|
008C59 C6 51 4A [ 1] 1433 ld a, 0x514a
|
|
008C5C A4 04 [ 1] 1434 and a, #0x04
|
|
1435 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1553: }
|
|
008C5E 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 ; -----------------------------------------
|
|
008C5F 1441 _RTC_OutputConfig:
|
|
008C5F 88 [ 1] 1442 push a
|
|
008C60 97 [ 1] 1443 ld xl, a
|
|
1444 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1595: RTC->WPR = 0xCA;
|
|
008C61 35 CA 51 59 [ 1] 1445 mov 0x5159+0, #0xca
|
|
1446 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1596: RTC->WPR = 0x53;
|
|
008C65 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);
|
|
008C69 C6 51 4A [ 1] 1449 ld a, 0x514a
|
|
008C6C A4 8F [ 1] 1450 and a, #0x8f
|
|
008C6E 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);
|
|
008C71 C6 51 4A [ 1] 1453 ld a, 0x514a
|
|
008C74 6B 01 [ 1] 1454 ld (0x01, sp), a
|
|
008C76 9F [ 1] 1455 ld a, xl
|
|
008C77 1A 04 [ 1] 1456 or a, (0x04, sp)
|
|
008C79 1A 01 [ 1] 1457 or a, (0x01, sp)
|
|
008C7B C7 51 4A [ 1] 1458 ld 0x514a, a
|
|
1459 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1605: RTC->WPR = 0xFF;
|
|
008C7E 35 FF 51 59 [ 1] 1460 mov 0x5159+0, #0xff
|
|
1461 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1606: }
|
|
008C82 84 [ 1] 1462 pop a
|
|
008C83 85 [ 2] 1463 popw x
|
|
008C84 84 [ 1] 1464 pop a
|
|
008C85 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 ; -----------------------------------------
|
|
008C86 1470 _RTC_SynchroShiftConfig:
|
|
008C86 88 [ 1] 1471 push a
|
|
008C87 6B 01 [ 1] 1472 ld (0x01, sp), a
|
|
008C89 51 [ 1] 1473 exgw x, y
|
|
1474 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1651: RTC->WPR = 0xCA;
|
|
008C8A 35 CA 51 59 [ 1] 1475 mov 0x5159+0, #0xca
|
|
1476 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1652: RTC->WPR = 0x53;
|
|
008C8E 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)
|
|
008C92 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))
|
|
008C97 5F [ 1] 1481 clrw x
|
|
008C98 1482 00102$:
|
|
008C98 72 07 51 4C 08 [ 2] 1483 btjf 0x514c, #3, 00106$
|
|
008C9D A3 FF FF [ 2] 1484 cpw x, #0xffff
|
|
008CA0 27 03 [ 1] 1485 jreq 00106$
|
|
1486 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1660: shpfcount++;
|
|
008CA2 5C [ 1] 1487 incw x
|
|
008CA3 20 F3 [ 2] 1488 jra 00102$
|
|
008CA5 1489 00106$:
|
|
1490 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1665: if ((RTC->ISR1 & RTC_ISR1_SHPF) == RESET)
|
|
008CA5 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));
|
|
008CAA 90 9E [ 1] 1493 ld a, yh
|
|
008CAC 1A 01 [ 1] 1494 or a, (0x01, sp)
|
|
1495 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1669: RTC->SHIFTRH = (uint8_t)(shiftrhreg);
|
|
008CAE C7 51 5A [ 1] 1496 ld 0x515a, a
|
|
1497 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1670: RTC->SHIFTRL = (uint8_t)(RTC_ShiftSubFS);
|
|
008CB1 90 9F [ 1] 1498 ld a, yl
|
|
008CB3 C7 51 5B [ 1] 1499 ld 0x515b, a
|
|
1500 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1672: status = SUCCESS;
|
|
008CB6 A6 01 [ 1] 1501 ld a, #0x01
|
|
1502 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1676: status = ERROR;
|
|
008CB8 21 1503 .byte 0x21
|
|
008CB9 1504 00108$:
|
|
008CB9 4F [ 1] 1505 clr a
|
|
008CBA 1506 00109$:
|
|
1507 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1680: RTC->WPR = 0xFF;
|
|
008CBA 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: }
|
|
008CBE 5B 01 [ 2] 1511 addw sp, #1
|
|
008CC0 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 ; -----------------------------------------
|
|
008CC1 1517 _RTC_SmoothCalibConfig:
|
|
008CC1 88 [ 1] 1518 push a
|
|
008CC2 90 97 [ 1] 1519 ld yl, a
|
|
1520 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1731: RTC->WPR = 0xCA;
|
|
008CC4 35 CA 51 59 [ 1] 1521 mov 0x5159+0, #0xca
|
|
1522 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1732: RTC->WPR = 0x53;
|
|
008CC8 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)
|
|
008CCC 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))
|
|
008CD1 5F [ 1] 1527 clrw x
|
|
008CD2 1528 00102$:
|
|
008CD2 72 03 51 4C 08 [ 2] 1529 btjf 0x514c, #1, 00106$
|
|
008CD7 A3 FF FF [ 2] 1530 cpw x, #0xffff
|
|
008CDA 27 03 [ 1] 1531 jreq 00106$
|
|
1532 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1740: recalpfcount++;
|
|
008CDC 5C [ 1] 1533 incw x
|
|
008CDD 20 F3 [ 2] 1534 jra 00102$
|
|
008CDF 1535 00106$:
|
|
1536 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1746: if ((RTC->ISR1 & RTC_ISR1_RECALPF) == RESET)
|
|
008CDF 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 | \
|
|
008CE4 90 9F [ 1] 1539 ld a, yl
|
|
008CE6 1A 04 [ 1] 1540 or a, (0x04, sp)
|
|
008CE8 6B 01 [ 1] 1541 ld (0x01, sp), a
|
|
008CEA 7B 05 [ 1] 1542 ld a, (0x05, sp)
|
|
008CEC 1A 01 [ 1] 1543 or a, (0x01, sp)
|
|
008CEE C7 51 6A [ 1] 1544 ld 0x516a, a
|
|
1545 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1752: RTC->CALRL = (uint8_t)(RTC_SmouthCalibMinusPulsesValue);
|
|
008CF1 7B 06 [ 1] 1546 ld a, (0x06, sp)
|
|
008CF3 C7 51 6B [ 1] 1547 ld 0x516b, a
|
|
1548 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1754: status = SUCCESS;
|
|
008CF6 A6 01 [ 1] 1549 ld a, #0x01
|
|
1550 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1758: status = ERROR;
|
|
008CF8 21 1551 .byte 0x21
|
|
008CF9 1552 00108$:
|
|
008CF9 4F [ 1] 1553 clr a
|
|
008CFA 1554 00109$:
|
|
1555 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1762: RTC->WPR = 0xFF;
|
|
008CFA 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: }
|
|
008CFE 1E 02 [ 2] 1559 ldw x, (2, sp)
|
|
008D00 5B 06 [ 2] 1560 addw sp, #6
|
|
008D02 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 ; -----------------------------------------
|
|
008D03 1566 _RTC_CalibOutputConfig:
|
|
008D03 88 [ 1] 1567 push a
|
|
008D04 6B 01 [ 1] 1568 ld (0x01, sp), a
|
|
1569 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1796: RTC->WPR = 0xCA;
|
|
008D06 35 CA 51 59 [ 1] 1570 mov 0x5159+0, #0xca
|
|
1571 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1797: RTC->WPR = 0x53;
|
|
008D0A 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;
|
|
008D0E C6 51 4A [ 1] 1574 ld a, 0x514a
|
|
1575 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1799: if (RTC_CalibOutput != RTC_CalibOutput_512Hz)
|
|
008D11 0D 01 [ 1] 1576 tnz (0x01, sp)
|
|
008D13 27 07 [ 1] 1577 jreq 00102$
|
|
1578 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1802: RTC->CR3 |= (uint8_t)RTC_CR3_COSEL;
|
|
008D15 AA 08 [ 1] 1579 or a, #0x08
|
|
008D17 C7 51 4A [ 1] 1580 ld 0x514a, a
|
|
008D1A 20 05 [ 2] 1581 jra 00103$
|
|
008D1C 1582 00102$:
|
|
1583 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1807: RTC->CR3 &= (uint8_t)~RTC_CR3_COSEL;
|
|
008D1C A4 F7 [ 1] 1584 and a, #0xf7
|
|
008D1E C7 51 4A [ 1] 1585 ld 0x514a, a
|
|
008D21 1586 00103$:
|
|
1587 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1811: RTC->WPR = 0xFF;
|
|
008D21 35 FF 51 59 [ 1] 1588 mov 0x5159+0, #0xff
|
|
1589 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1812: }
|
|
008D25 84 [ 1] 1590 pop a
|
|
008D26 81 [ 4] 1591 ret
|
|
1592 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1820: void RTC_CalibOutputCmd(FunctionalState NewState)
|
|
1593 ; -----------------------------------------
|
|
1594 ; function RTC_CalibOutputCmd
|
|
1595 ; -----------------------------------------
|
|
008D27 1596 _RTC_CalibOutputCmd:
|
|
008D27 88 [ 1] 1597 push a
|
|
008D28 6B 01 [ 1] 1598 ld (0x01, sp), a
|
|
1599 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1826: RTC->WPR = 0xCA;
|
|
008D2A 35 CA 51 59 [ 1] 1600 mov 0x5159+0, #0xca
|
|
1601 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1827: RTC->WPR = 0x53;
|
|
008D2E 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;
|
|
008D32 C6 51 4A [ 1] 1604 ld a, 0x514a
|
|
1605 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1829: if (NewState != DISABLE)
|
|
008D35 0D 01 [ 1] 1606 tnz (0x01, sp)
|
|
008D37 27 07 [ 1] 1607 jreq 00102$
|
|
1608 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1832: RTC->CR3 |= (uint8_t)RTC_CR3_COE;
|
|
008D39 AA 80 [ 1] 1609 or a, #0x80
|
|
008D3B C7 51 4A [ 1] 1610 ld 0x514a, a
|
|
008D3E 20 05 [ 2] 1611 jra 00103$
|
|
008D40 1612 00102$:
|
|
1613 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1837: RTC->CR3 &= (uint8_t)~RTC_CR3_COE;
|
|
008D40 A4 7F [ 1] 1614 and a, #0x7f
|
|
008D42 C7 51 4A [ 1] 1615 ld 0x514a, a
|
|
008D45 1616 00103$:
|
|
1617 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1841: RTC->WPR = 0xFF;
|
|
008D45 35 FF 51 59 [ 1] 1618 mov 0x5159+0, #0xff
|
|
1619 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1842: }
|
|
008D49 84 [ 1] 1620 pop a
|
|
008D4A 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 ; -----------------------------------------
|
|
008D4B 1626 _RTC_TamperLevelConfig:
|
|
008D4B 88 [ 1] 1627 push a
|
|
008D4C 97 [ 1] 1628 ld xl, a
|
|
1629 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1879: RTC->WPR = 0xCA;
|
|
008D4D 35 CA 51 59 [ 1] 1630 mov 0x5159+0, #0xca
|
|
1631 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1880: RTC->WPR = 0x53;
|
|
008D51 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);
|
|
008D55 C6 51 6C [ 1] 1634 ld a, 0x516c
|
|
008D58 6B 01 [ 1] 1635 ld (0x01, sp), a
|
|
008D5A 9F [ 1] 1636 ld a, xl
|
|
008D5B 48 [ 1] 1637 sll a
|
|
1638 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1882: if (RTC_TamperLevel != RTC_TamperLevel_Low)
|
|
008D5C 0D 04 [ 1] 1639 tnz (0x04, sp)
|
|
008D5E 27 07 [ 1] 1640 jreq 00102$
|
|
1641 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1885: RTC->TCR1 |= (uint8_t)(RTC_Tamper << 1);
|
|
008D60 1A 01 [ 1] 1642 or a, (0x01, sp)
|
|
008D62 C7 51 6C [ 1] 1643 ld 0x516c, a
|
|
008D65 20 06 [ 2] 1644 jra 00103$
|
|
008D67 1645 00102$:
|
|
1646 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1890: RTC->TCR1 &= (uint8_t)~(uint8_t)(RTC_Tamper << 1);
|
|
008D67 43 [ 1] 1647 cpl a
|
|
008D68 14 01 [ 1] 1648 and a, (0x01, sp)
|
|
008D6A C7 51 6C [ 1] 1649 ld 0x516c, a
|
|
008D6D 1650 00103$:
|
|
1651 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1894: RTC->WPR = 0xFF;
|
|
008D6D 35 FF 51 59 [ 1] 1652 mov 0x5159+0, #0xff
|
|
1653 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1895: }
|
|
008D71 84 [ 1] 1654 pop a
|
|
008D72 85 [ 2] 1655 popw x
|
|
008D73 84 [ 1] 1656 pop a
|
|
008D74 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 ; -----------------------------------------
|
|
008D75 1662 _RTC_TamperFilterConfig:
|
|
008D75 88 [ 1] 1663 push a
|
|
008D76 6B 01 [ 1] 1664 ld (0x01, sp), a
|
|
1665 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1910: RTC->WPR = 0xCA;
|
|
008D78 35 CA 51 59 [ 1] 1666 mov 0x5159+0, #0xca
|
|
1667 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1911: RTC->WPR = 0x53;
|
|
008D7C 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);
|
|
008D80 C6 51 6D [ 1] 1670 ld a, 0x516d
|
|
008D83 A4 E7 [ 1] 1671 and a, #0xe7
|
|
008D85 C7 51 6D [ 1] 1672 ld 0x516d, a
|
|
1673 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1917: RTC->TCR2 |= (uint8_t)RTC_TamperFilter;
|
|
008D88 C6 51 6D [ 1] 1674 ld a, 0x516d
|
|
008D8B 1A 01 [ 1] 1675 or a, (0x01, sp)
|
|
008D8D C7 51 6D [ 1] 1676 ld 0x516d, a
|
|
1677 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1920: RTC->WPR = 0xFF;
|
|
008D90 35 FF 51 59 [ 1] 1678 mov 0x5159+0, #0xff
|
|
1679 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1922: }
|
|
008D94 84 [ 1] 1680 pop a
|
|
008D95 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 ; -----------------------------------------
|
|
008D96 1686 _RTC_TamperSamplingFreqConfig:
|
|
008D96 88 [ 1] 1687 push a
|
|
008D97 6B 01 [ 1] 1688 ld (0x01, sp), a
|
|
1689 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1937: RTC->WPR = 0xCA;
|
|
008D99 35 CA 51 59 [ 1] 1690 mov 0x5159+0, #0xca
|
|
1691 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1938: RTC->WPR = 0x53;
|
|
008D9D 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);
|
|
008DA1 C6 51 6D [ 1] 1694 ld a, 0x516d
|
|
008DA4 A4 F8 [ 1] 1695 and a, #0xf8
|
|
008DA6 C7 51 6D [ 1] 1696 ld 0x516d, a
|
|
1697 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1944: RTC->TCR2 |= (uint8_t)RTC_TamperSamplingFreq;
|
|
008DA9 C6 51 6D [ 1] 1698 ld a, 0x516d
|
|
008DAC 1A 01 [ 1] 1699 or a, (0x01, sp)
|
|
008DAE C7 51 6D [ 1] 1700 ld 0x516d, a
|
|
1701 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1947: RTC->WPR = 0xFF;
|
|
008DB1 35 FF 51 59 [ 1] 1702 mov 0x5159+0, #0xff
|
|
1703 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1948: }
|
|
008DB5 84 [ 1] 1704 pop a
|
|
008DB6 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 ; -----------------------------------------
|
|
008DB7 1710 _RTC_TamperPinsPrechargeDuration:
|
|
008DB7 88 [ 1] 1711 push a
|
|
008DB8 6B 01 [ 1] 1712 ld (0x01, sp), a
|
|
1713 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1964: RTC->WPR = 0xCA;
|
|
008DBA 35 CA 51 59 [ 1] 1714 mov 0x5159+0, #0xca
|
|
1715 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1965: RTC->WPR = 0x53;
|
|
008DBE 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);
|
|
008DC2 C6 51 6D [ 1] 1718 ld a, 0x516d
|
|
008DC5 A4 1F [ 1] 1719 and a, #0x1f
|
|
008DC7 C7 51 6D [ 1] 1720 ld 0x516d, a
|
|
1721 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1971: RTC->TCR2 |= (uint8_t)RTC_TamperPrechargeDuration;
|
|
008DCA C6 51 6D [ 1] 1722 ld a, 0x516d
|
|
008DCD 1A 01 [ 1] 1723 or a, (0x01, sp)
|
|
008DCF C7 51 6D [ 1] 1724 ld 0x516d, a
|
|
1725 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1974: RTC->WPR = 0xFF;
|
|
008DD2 35 FF 51 59 [ 1] 1726 mov 0x5159+0, #0xff
|
|
1727 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1975: }
|
|
008DD6 84 [ 1] 1728 pop a
|
|
008DD7 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 ; -----------------------------------------
|
|
008DD8 1734 _RTC_TamperCmd:
|
|
008DD8 88 [ 1] 1735 push a
|
|
1736 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1996: RTC->WPR = 0xCA;
|
|
008DD9 35 CA 51 59 [ 1] 1737 mov 0x5159+0, #0xca
|
|
1738 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1997: RTC->WPR = 0x53;
|
|
008DDD 35 53 51 59 [ 1] 1739 mov 0x5159+0, #0x53
|
|
1740 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2003: RTC->TCR1 |= (uint8_t)RTC_Tamper;
|
|
008DE1 AE 51 6C [ 2] 1741 ldw x, #0x516c
|
|
008DE4 88 [ 1] 1742 push a
|
|
008DE5 F6 [ 1] 1743 ld a, (x)
|
|
008DE6 6B 02 [ 1] 1744 ld (0x02, sp), a
|
|
008DE8 84 [ 1] 1745 pop a
|
|
1746 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2000: if (NewState != DISABLE)
|
|
008DE9 0D 04 [ 1] 1747 tnz (0x04, sp)
|
|
008DEB 27 07 [ 1] 1748 jreq 00102$
|
|
1749 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2003: RTC->TCR1 |= (uint8_t)RTC_Tamper;
|
|
008DED 1A 01 [ 1] 1750 or a, (0x01, sp)
|
|
008DEF C7 51 6C [ 1] 1751 ld 0x516c, a
|
|
008DF2 20 06 [ 2] 1752 jra 00103$
|
|
008DF4 1753 00102$:
|
|
1754 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2008: RTC->TCR1 &= (uint8_t)~RTC_Tamper;
|
|
008DF4 43 [ 1] 1755 cpl a
|
|
008DF5 14 01 [ 1] 1756 and a, (0x01, sp)
|
|
008DF7 C7 51 6C [ 1] 1757 ld 0x516c, a
|
|
008DFA 1758 00103$:
|
|
1759 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2013: RTC->WPR = 0xFF;
|
|
008DFA 35 FF 51 59 [ 1] 1760 mov 0x5159+0, #0xff
|
|
1761 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2014: }
|
|
008DFE 84 [ 1] 1762 pop a
|
|
008DFF 85 [ 2] 1763 popw x
|
|
008E00 84 [ 1] 1764 pop a
|
|
008E01 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 ; -----------------------------------------
|
|
008E02 1770 _RTC_ITConfig:
|
|
008E02 52 03 [ 2] 1771 sub sp, #3
|
|
008E04 6B 03 [ 1] 1772 ld (0x03, sp), a
|
|
1773 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2065: RTC->WPR = 0xCA;
|
|
008E06 35 CA 51 59 [ 1] 1774 mov 0x5159+0, #0xca
|
|
1775 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2066: RTC->WPR = 0x53;
|
|
008E0A 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);
|
|
008E0E C6 51 49 [ 1] 1778 ld a, 0x5149
|
|
008E11 6B 02 [ 1] 1779 ld (0x02, sp), a
|
|
008E13 9F [ 1] 1780 ld a, xl
|
|
008E14 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);
|
|
008E16 88 [ 1] 1783 push a
|
|
008E17 9F [ 1] 1784 ld a, xl
|
|
008E18 A4 01 [ 1] 1785 and a, #0x01
|
|
008E1A 6B 02 [ 1] 1786 ld (0x02, sp), a
|
|
008E1C 84 [ 1] 1787 pop a
|
|
1788 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2068: if (NewState != DISABLE)
|
|
008E1D 0D 03 [ 1] 1789 tnz (0x03, sp)
|
|
008E1F 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);
|
|
008E21 1A 02 [ 1] 1792 or a, (0x02, sp)
|
|
008E23 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);
|
|
008E26 C6 51 6C [ 1] 1795 ld a, 0x516c
|
|
008E29 1A 01 [ 1] 1796 or a, (0x01, sp)
|
|
008E2B C7 51 6C [ 1] 1797 ld 0x516c, a
|
|
008E2E 20 13 [ 2] 1798 jra 00103$
|
|
008E30 1799 00102$:
|
|
1800 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2077: RTC->CR2 &= (uint8_t)~(uint8_t)((uint16_t)RTC_IT & (uint16_t)0x00F0);
|
|
008E30 43 [ 1] 1801 cpl a
|
|
008E31 14 02 [ 1] 1802 and a, (0x02, sp)
|
|
008E33 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);
|
|
008E36 C6 51 6C [ 1] 1805 ld a, 0x516c
|
|
008E39 6B 02 [ 1] 1806 ld (0x02, sp), a
|
|
008E3B 7B 01 [ 1] 1807 ld a, (0x01, sp)
|
|
008E3D 43 [ 1] 1808 cpl a
|
|
008E3E 14 02 [ 1] 1809 and a, (0x02, sp)
|
|
008E40 C7 51 6C [ 1] 1810 ld 0x516c, a
|
|
008E43 1811 00103$:
|
|
1812 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2082: RTC->WPR = 0xFF;
|
|
008E43 35 FF 51 59 [ 1] 1813 mov 0x5159+0, #0xff
|
|
1814 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2083: }
|
|
008E47 5B 03 [ 2] 1815 addw sp, #3
|
|
008E49 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 ; -----------------------------------------
|
|
008E4A 1821 _RTC_GetFlagStatus:
|
|
008E4A 52 06 [ 2] 1822 sub sp, #6
|
|
1823 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2100: tmpreg2 = (uint16_t)((uint16_t)RTC->ISR1 << 8);
|
|
008E4C C6 51 4C [ 1] 1824 ld a, 0x514c
|
|
008E4F 90 97 [ 1] 1825 ld yl, a
|
|
008E51 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);
|
|
008E53 C6 51 4D [ 1] 1828 ld a, 0x514d
|
|
008E56 0F 03 [ 1] 1829 clr (0x03, sp)
|
|
008E58 6B 06 [ 1] 1830 ld (0x06, sp), a
|
|
008E5A 61 [ 1] 1831 exg a, yl
|
|
008E5B 6B 05 [ 1] 1832 ld (0x05, sp), a
|
|
008E5D 61 [ 1] 1833 exg a, yl
|
|
1834 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2104: if ((tmpreg1 & (uint16_t)RTC_FLAG) != RESET)
|
|
008E5E 9F [ 1] 1835 ld a, xl
|
|
008E5F 14 06 [ 1] 1836 and a, (0x06, sp)
|
|
008E61 02 [ 1] 1837 rlwa x
|
|
008E62 14 05 [ 1] 1838 and a, (0x05, sp)
|
|
008E64 95 [ 1] 1839 ld xh, a
|
|
008E65 5D [ 2] 1840 tnzw x
|
|
008E66 27 03 [ 1] 1841 jreq 00102$
|
|
1842 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2106: flagstatus = SET;
|
|
008E68 A6 01 [ 1] 1843 ld a, #0x01
|
|
1844 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2110: flagstatus = RESET;
|
|
008E6A 21 1845 .byte 0x21
|
|
008E6B 1846 00102$:
|
|
008E6B 4F [ 1] 1847 clr a
|
|
008E6C 1848 00103$:
|
|
1849 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2112: return (FlagStatus)flagstatus;
|
|
1850 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2113: }
|
|
008E6C 5B 06 [ 2] 1851 addw sp, #6
|
|
008E6E 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 ; -----------------------------------------
|
|
008E6F 1857 _RTC_ClearFlag:
|
|
1858 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2128: RTC->ISR2 = (uint8_t)~((uint8_t)RTC_FLAG) ;
|
|
008E6F 9F [ 1] 1859 ld a, xl
|
|
008E70 43 [ 1] 1860 cpl a
|
|
008E71 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)));
|
|
008E74 9E [ 1] 1863 ld a, xh
|
|
008E75 43 [ 1] 1864 cpl a
|
|
008E76 A4 7F [ 1] 1865 and a, #0x7f
|
|
008E78 C7 51 4C [ 1] 1866 ld 0x514c, a
|
|
1867 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2130: }
|
|
008E7B 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 ; -----------------------------------------
|
|
008E7C 1873 _RTC_GetITStatus:
|
|
008E7C 88 [ 1] 1874 push a
|
|
1875 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2147: enablestatus = (uint8_t)(RTC->CR2 & (uint16_t)RTC_IT);
|
|
008E7D C6 51 49 [ 1] 1876 ld a, 0x5149
|
|
008E80 6B 01 [ 1] 1877 ld (0x01, sp), a
|
|
008E82 9F [ 1] 1878 ld a, xl
|
|
008E83 14 01 [ 1] 1879 and a, (0x01, sp)
|
|
008E85 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));
|
|
008E87 C6 51 4D [ 1] 1882 ld a, 0x514d
|
|
008E8A 54 [ 2] 1883 srlw x
|
|
008E8B 54 [ 2] 1884 srlw x
|
|
008E8C 54 [ 2] 1885 srlw x
|
|
008E8D 54 [ 2] 1886 srlw x
|
|
008E8E 89 [ 2] 1887 pushw x
|
|
008E8F 14 02 [ 1] 1888 and a, (2, sp)
|
|
008E91 85 [ 2] 1889 popw x
|
|
1890 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2153: if ((enablestatus != (uint8_t)RESET) && (tmpreg != (uint8_t)RESET))
|
|
008E92 0D 01 [ 1] 1891 tnz (0x01, sp)
|
|
008E94 27 06 [ 1] 1892 jreq 00102$
|
|
008E96 4D [ 1] 1893 tnz a
|
|
008E97 27 03 [ 1] 1894 jreq 00102$
|
|
1895 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2155: itstatus = SET;
|
|
008E99 A6 01 [ 1] 1896 ld a, #0x01
|
|
1897 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2159: itstatus = RESET;
|
|
008E9B 21 1898 .byte 0x21
|
|
008E9C 1899 00102$:
|
|
008E9C 4F [ 1] 1900 clr a
|
|
008E9D 1901 00103$:
|
|
1902 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2162: return (ITStatus)itstatus;
|
|
1903 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2163: }
|
|
008E9D 5B 01 [ 2] 1904 addw sp, #1
|
|
008E9F 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 ; -----------------------------------------
|
|
008EA0 1910 _RTC_ClearITPendingBit:
|
|
1911 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2178: RTC->ISR2 = (uint8_t)~(uint8_t)((uint16_t)RTC_IT >> 4);
|
|
008EA0 A6 10 [ 1] 1912 ld a, #0x10
|
|
008EA2 62 [ 2] 1913 div x, a
|
|
008EA3 9F [ 1] 1914 ld a, xl
|
|
008EA4 43 [ 1] 1915 cpl a
|
|
008EA5 C7 51 4D [ 1] 1916 ld 0x514d, a
|
|
1917 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2179: }
|
|
008EA8 81 [ 4] 1918 ret
|
|
1919 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2202: static uint8_t ByteToBcd2(uint8_t Value)
|
|
1920 ; -----------------------------------------
|
|
1921 ; function ByteToBcd2
|
|
1922 ; -----------------------------------------
|
|
008EA9 1923 _ByteToBcd2:
|
|
1924 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2206: while (Value >= 10)
|
|
008EA9 5F [ 1] 1925 clrw x
|
|
008EAA 1926 00101$:
|
|
008EAA A1 0A [ 1] 1927 cp a, #0x0a
|
|
008EAC 25 05 [ 1] 1928 jrc 00103$
|
|
1929 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2208: bcdhigh++;
|
|
008EAE 5C [ 1] 1930 incw x
|
|
1931 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2209: Value -= 10;
|
|
008EAF A0 0A [ 1] 1932 sub a, #0x0a
|
|
008EB1 20 F7 [ 2] 1933 jra 00101$
|
|
008EB3 1934 00103$:
|
|
1935 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2212: return (uint8_t)((uint8_t)(bcdhigh << 4) | Value);
|
|
008EB3 58 [ 2] 1936 sllw x
|
|
008EB4 58 [ 2] 1937 sllw x
|
|
008EB5 58 [ 2] 1938 sllw x
|
|
008EB6 58 [ 2] 1939 sllw x
|
|
008EB7 89 [ 2] 1940 pushw x
|
|
008EB8 1A 02 [ 1] 1941 or a, (2, sp)
|
|
008EBA 85 [ 2] 1942 popw x
|
|
1943 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2213: }
|
|
008EBB 81 [ 4] 1944 ret
|
|
1945 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2220: static uint8_t Bcd2ToByte(uint8_t Value)
|
|
1946 ; -----------------------------------------
|
|
1947 ; function Bcd2ToByte
|
|
1948 ; -----------------------------------------
|
|
008EBC 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);
|
|
008EBC 90 97 [ 1] 1951 ld yl, a
|
|
008EBE A4 F0 [ 1] 1952 and a, #0xf0
|
|
008EC0 4E [ 1] 1953 swap a
|
|
008EC1 A4 0F [ 1] 1954 and a, #0x0f
|
|
008EC3 97 [ 1] 1955 ld xl, a
|
|
008EC4 A6 0A [ 1] 1956 ld a, #0x0a
|
|
008EC6 42 [ 4] 1957 mul x, a
|
|
1958 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2226: return (uint8_t)(tmp + (Value & (uint8_t)0x0F));
|
|
008EC7 90 9F [ 1] 1959 ld a, yl
|
|
008EC9 A4 0F [ 1] 1960 and a, #0x0f
|
|
008ECB 89 [ 2] 1961 pushw x
|
|
008ECC 1B 02 [ 1] 1962 add a, (2, sp)
|
|
008ECE 85 [ 2] 1963 popw x
|
|
1964 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2227: }
|
|
008ECF 81 [ 4] 1965 ret
|
|
1966 .area CODE
|
|
1967 .area CONST
|
|
1968 .area INITIALIZER
|
|
1969 .area CABS (ABS)
|