📄 lowpower.txt
字号:
00001e f7fffffe BL LCD_SetTextColor
;;;114
;;;115 /* Disable the JoyStick interrupts */
;;;116 IntExtOnOffConfig(DISABLE);
000022 2000 MOVS r0,#0
000024 f7fffffe BL IntExtOnOffConfig
|L3.40|
;;;117
;;;118 while(ReadKey() != NOKEY)
000028 f7fffffe BL ReadKey
00002c 2800 CMP r0,#0
00002e d1fb BNE |L3.40|
;;;119 {
;;;120 }
;;;121
;;;122 /* Configure the EXTI Line 8 */
;;;123 EXTI_InitStructure.EXTI_Mode = EXTI_Mode_Interrupt;
000030 f88d6004 STRB r6,[sp,#4]
;;;124 EXTI_InitStructure.EXTI_Line = EXTI_Line8;
;;;125 EXTI_InitStructure.EXTI_Trigger = EXTI_Trigger_Falling;
000034 f04f080c MOV r8,#0xc
000038 f44f7780 MOV r7,#0x100 ;124
00003c f88d8005 STRB r8,[sp,#5]
;;;126 EXTI_InitStructure.EXTI_LineCmd = ENABLE;
000040 2401 MOVS r4,#1
000042 9700 STR r7,[sp,#0] ;125
000044 f88d4006 STRB r4,[sp,#6]
;;;127 EXTI_Init(&EXTI_InitStructure);
000048 4668 MOV r0,sp
00004a f7fffffe BL EXTI_Init
;;;128
;;;129 /* Enable the EXTI0 Interrupt */
;;;130 NVIC_InitStructure.NVIC_IRQChannel = EXTI9_5_IRQChannel;
00004e f04f0917 MOV r9,#0x17
000052 f88d9008 STRB r9,[sp,#8]
;;;131 NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 1;
000056 f88d4009 STRB r4,[sp,#9]
;;;132 NVIC_InitStructure.NVIC_IRQChannelSubPriority = 1;
00005a f88d400a STRB r4,[sp,#0xa]
;;;133 NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
00005e f88d400b STRB r4,[sp,#0xb]
;;;134 NVIC_Init(&NVIC_InitStructure);
000062 a802 ADD r0,sp,#8
000064 f7fffffe BL NVIC_Init
;;;135
;;;136 LCD_DisplayStringLine(Line4, " MCU in STOP Mode ");
000068 a12e ADR r1,|L3.292|
00006a 2060 MOVS r0,#0x60
00006c f7fffffe BL LCD_DisplayStringLine
;;;137 LCD_DisplayStringLine(Line5, "To exit press Key ");
000070 a132 ADR r1,|L3.316|
000072 2078 MOVS r0,#0x78
000074 f7fffffe BL LCD_DisplayStringLine
;;;138 LCD_DisplayStringLine(Line6, "push button ");
000078 a136 ADR r1,|L3.340|
00007a 2090 MOVS r0,#0x90
00007c f7fffffe BL LCD_DisplayStringLine
;;;139
;;;140 /* Clear the RTC Alarm flag */
;;;141 RTC_ClearFlag(RTC_FLAG_ALR);
000080 2002 MOVS r0,#2
000082 f7fffffe BL RTC_ClearFlag
;;;142
;;;143 /* Save the GPIO pins current configuration then put all GPIO pins in Analog
;;;144 Input mode ...*/
;;;145 GPIO_SaveConfig();
000086 f7fffffe BL GPIO_SaveConfig
;;;146
;;;147 /* ... and keep PG.08 configuration which will be used as EXTI Line8 source */
;;;148 GPIOG->CRH = 0x4;
00008a 4938 LDR r1,|L3.364|
00008c 2004 MOVS r0,#4
00008e 6048 STR r0,[r1,#4]
;;;149
;;;150 /* Request to enter STOP mode with regulator in low power */
;;;151 PWR_EnterSTOPMode(PWR_Regulator_LowPower, PWR_STOPEntry_WFI);
000090 2101 MOVS r1,#1
000092 4608 MOV r0,r1
000094 f7fffffe BL PWR_EnterSTOPMode
;;;152
;;;153 /* Restore the GPIO Configurations*/
;;;154 GPIO_RestoreConfig();
000098 f7fffffe BL GPIO_RestoreConfig
;;;155
;;;156 /* At this stage the system has resumed from STOP mode ************************/
;;;157 EXTI_InitStructure.EXTI_Mode = EXTI_Mode_Interrupt;
00009c f88d6004 STRB r6,[sp,#4]
;;;158 EXTI_InitStructure.EXTI_Line = EXTI_Line8;
;;;159 EXTI_InitStructure.EXTI_Trigger = EXTI_Trigger_Falling;
0000a0 f88d8005 STRB r8,[sp,#5]
0000a4 9700 STR r7,[sp,#0]
;;;160 EXTI_InitStructure.EXTI_LineCmd = DISABLE;
0000a6 f88d6006 STRB r6,[sp,#6]
;;;161 EXTI_Init(&EXTI_InitStructure);
0000aa 4668 MOV r0,sp
0000ac f7fffffe BL EXTI_Init
;;;162
;;;163 /* Enable the EXTI9_5 Interrupt */
;;;164 NVIC_InitStructure.NVIC_IRQChannel = EXTI9_5_IRQChannel;
0000b0 f88d9008 STRB r9,[sp,#8]
;;;165 NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 2;
0000b4 2002 MOVS r0,#2
0000b6 f88d0009 STRB r0,[sp,#9]
;;;166 NVIC_InitStructure.NVIC_IRQChannelSubPriority = 1;
0000ba f88d400a STRB r4,[sp,#0xa]
;;;167 NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
0000be f88d400b STRB r4,[sp,#0xb]
;;;168 NVIC_Init(&NVIC_InitStructure);
0000c2 a802 ADD r0,sp,#8
0000c4 f7fffffe BL NVIC_Init
;;;169
;;;170 /* Configures system clock after wake-up from STOP: enable HSE, PLL and select PLL
;;;171 as system clock source (HSE and PLL are disabled in STOP mode) */
;;;172 SYSCLKConfig_STOP();
0000c8 f7fffffe BL SYSCLKConfig_STOP
|L3.204|
;;;173
;;;174 while(ReadKey() != NOKEY)
0000cc f7fffffe BL ReadKey
0000d0 2800 CMP r0,#0
0000d2 d1fb BNE |L3.204|
;;;175 {
;;;176 }
;;;177
;;;178 if(STOPModeStatus != RESET)
0000d4 6828 LDR r0,[r5,#0] ; STOPModeStatus
;;;179 {
;;;180 LCD_DisplayStringLine(Line4, " STOP Mode ");
0000d6 a126 ADR r1,|L3.368|
0000d8 2800 CMP r0,#0 ;178
0000da f04f0060 MOV r0,#0x60
0000de d003 BEQ |L3.232|
0000e0 f7fffffe BL LCD_DisplayStringLine
;;;181 LCD_DisplayStringLine(Line5, "Wake-Up by RTC Alarm");
0000e4 a128 ADR r1,|L3.392|
;;;182 LCD_DisplayStringLine(Line6, "Press JoyStick to ");
;;;183 LCD_DisplayStringLine(Line7, "continue... ");
0000e6 e002 B |L3.238|
|L3.232|
;;;184 }
;;;185 else
;;;186 {
;;;187 LCD_DisplayStringLine(Line4, " STOP Mode ");
0000e8 f7fffffe BL LCD_DisplayStringLine
;;;188 LCD_DisplayStringLine(Line5, "WakeUp by Key Button");
0000ec a12c ADR r1,|L3.416|
|L3.238|
0000ee 2078 MOVS r0,#0x78 ;181
0000f0 f7fffffe BL LCD_DisplayStringLine
0000f4 a130 ADR r1,|L3.440|
0000f6 2090 MOVS r0,#0x90 ;182
0000f8 f7fffffe BL LCD_DisplayStringLine
0000fc a134 ADR r1,|L3.464|
0000fe 20a8 MOVS r0,#0xa8 ;183
000100 f7fffffe BL LCD_DisplayStringLine
|L3.260|
;;;189 LCD_DisplayStringLine(Line6, "Press JoyStick to ");
;;;190 LCD_DisplayStringLine(Line7, "continue... ");
;;;191 }
;;;192
;;;193 while(ReadKey() == NOKEY)
000104 f7fffffe BL ReadKey
000108 2800 CMP r0,#0
00010a d0fb BEQ |L3.260|
;;;194 {
;;;195 }
;;;196
;;;197 /* Clear the LCD */
;;;198 LCD_Clear(White);
00010c 4650 MOV r0,r10
00010e f7fffffe BL LCD_Clear
;;;199 /* Display the previous menu */
;;;200 DisplayMenu();
000112 f7fffffe BL DisplayMenu
;;;201 /* Enable the JoyStick interrupts */
;;;202 IntExtOnOffConfig(ENABLE);
000116 2001 MOVS r0,#1
000118 f7fffffe BL IntExtOnOffConfig
;;;203 }
00011c e8bd8ffe POP {r1-r11,pc}
;;;204
ENDP
|L3.288|
DCD ||.data||
|L3.292|
000124 20204d435520696e2053544f50204d6f6465202000 DCB " MCU in STOP Mode ",0
000139 00 DCB 0
00013a 00 DCB 0
00013b 00 DCB 0
|L3.316|
00013c 546f2065786974207072657373204b657920202000 DCB "To exit press Key ",0
000151 00 DCB 0
000152 00 DCB 0
000153 00 DCB 0
|L3.340|
000154 7075736820627574746f6e20202020202020202000 DCB "push button ",0
000169 00 DCB 0
00016a 00 DCB 0
00016b 00 DCB 0
|L3.364|
DCD 0x40012000
|L3.368|
000170 20202020202053544f50204d6f6465202020202000 DCB " STOP Mode ",0
000185 00 DCB 0
000186 00 DCB 0
000187 00 DCB 0
|L3.392|
000188 57616b652d55702062792052544320416c61726d00 DCB "Wake-Up by RTC Alarm",0
00019d 00 DCB 0
00019e 00 DCB 0
00019f 00 DCB 0
|L3.416|
0001a0 57616b655570206279204b657920427574746f6e00 DCB "WakeUp by Key Button",0
0001b5 00 DCB 0
0001b6 00 DCB 0
0001b7 00 DCB 0
|L3.440|
0001b8 5072657373204a6f79537469636b20746f20202000 DCB "Press JoyStick to ",0
0001cd 00 DCB 0
0001ce 00 DCB 0
0001cf 00 DCB 0
|L3.464|
0001d0 636f6e74696e75652e2e2e20202020202020202000 DCB "continue... ",0
0001e5 00 DCB 0
0001e6 00 DCB 0
0001e7 00 DCB 0
AREA ||i.EnterSTOPMode_RTCAlarm||, CODE, READONLY, ALIGN=2
EnterSTOPMode_RTCAlarm PROC
;;;212 *******************************************************************************/
;;;213 void EnterSTOPMode_RTCAlarm(void)
000000 b570 PUSH {r4-r6,lr}
;;;214 {
;;;215 u32 tmp = 0;
;;;216
;;;217 /* Clear the LCD */
;;;218 LCD_Clear(White);
000002 f64f74ff MOV r4,#0xffff
000006 4620 MOV r0,r4
000008 f7fffffe BL LCD_Clear
;;;219 /* Set the LCD Back Color */
;;;220 LCD_SetBackColor(Blue);
00000c 201f MOVS r0,#0x1f
00000e f7fffffe BL LCD_SetBackColor
;;;221
;;;222 /* Set the LCD Text Color */
;;;223 LCD_SetTextColor(White);
000012 4620 MOV r0,r4
000014 f7fffffe BL LCD_SetTextColor
;;;224
;;;225 /* Disable the JoyStick interrupts */
;;;226 IntExtOnOffConfig(DISABLE);
000018 2000 MOVS r0,#0
00001a f7fffffe BL IntExtOnOffConfig
;;;227
;;;228 while(ReadKey() != NOKEY)
00001e bf00 NOP
|L4.32|
000020 f7fffffe BL ReadKey
000024 2800 CMP r0,#0
000026 d1fb BNE |L4.32|
;;;229 {
;;;230 }
;;;231
;;;232 if(BKP_ReadBackupRegister(BKP_DR1) != 0xA5A5)
000028 2004 MOVS r0,#4
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -