📄 lowpower.txt
字号:
;;;100 {
000000 e92de92d PUSH {r1-r11,lr}
;;;101 NVIC_InitTypeDef NVIC_InitStructure;
;;;102 EXTI_InitTypeDef EXTI_InitStructure;
;;;103
;;;104 STOPModeStatus = 0;
000004 4f47 LDR r7,|L5.292|
000006 2500 MOVS r5,#0
000008 603d STR r5,[r7,#0] ; STOPModeStatus
;;;105
;;;106 /* Clear the LCD */
;;;107 LCD_Clear(White);
00000a f64ff64f MOV r6,#0xffff
00000e 4630 MOV r0,r6
000010 f7fff7ff BL LCD_Clear
;;;108
;;;109 /* Set the LCD Back Color */
;;;110 LCD_SetBackColor(Blue);
000014 201f MOVS r0,#0x1f
000016 f7fff7ff BL LCD_SetBackColor
;;;111
;;;112 /* Set the LCD Text Color */
;;;113 LCD_SetTextColor(White);
00001a 4630 MOV r0,r6
00001c f7fff7ff BL LCD_SetTextColor
;;;114
;;;115 /* Disable the JoyStick interrupts */
;;;116 IntExtOnOffConfig(DISABLE);
000020 2000 MOVS r0,#0
000022 f7fff7ff BL IntExtOnOffConfig
;;;117
;;;118 while(ReadKey() != NOKEY)
000026 bf00 NOP
|L5.40|
000028 f7fff7ff BL ReadKey
00002c 2800 CMP r0,#0
00002e d1fb BNE |L5.40|
;;;119 {
;;;120 }
;;;121
;;;122 /* Configure the EXTI Line 8 */
;;;123 EXTI_InitStructure.EXTI_Mode = EXTI_Mode_Interrupt;
000030 f88df88d STRB r5,[sp,#4]
;;;124 EXTI_InitStructure.EXTI_Line = EXTI_Line8;
;;;125 EXTI_InitStructure.EXTI_Trigger = EXTI_Trigger_Falling;
000034 f04ff04f MOV r10,#0xc
000038 f44ff44f MOV r9,#0x100 ;124
00003c f88df88d STRB r10,[sp,#5]
;;;126 EXTI_InitStructure.EXTI_LineCmd = ENABLE;
000040 2401 MOVS r4,#1
000042 f8cdf8cd STR r9,[sp,#0] ;125
000046 f88df88d STRB r4,[sp,#6]
;;;127 EXTI_Init(&EXTI_InitStructure);
00004a 4668 MOV r0,sp
00004c f7fff7ff BL EXTI_Init
;;;128
;;;129 /* Enable the EXTI0 Interrupt */
;;;130 NVIC_InitStructure.NVIC_IRQChannel = EXTI9_5_IRQChannel;
000050 f04ff04f MOV r8,#0x17
000054 f88df88d STRB r8,[sp,#8]
;;;131 NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 1;
000058 f88df88d STRB r4,[sp,#9]
;;;132 NVIC_InitStructure.NVIC_IRQChannelSubPriority = 1;
00005c f88df88d STRB r4,[sp,#0xa]
;;;133 NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
000060 f88df88d STRB r4,[sp,#0xb]
;;;134 NVIC_Init(&NVIC_InitStructure);
000064 a802 ADD r0,sp,#8
000066 f7fff7ff BL NVIC_Init
;;;135
;;;136 LCD_DisplayStringLine(Line4, " MCU in STOP Mode ");
00006a a12f ADR r1,|L5.296|
00006c 2060 MOVS r0,#0x60
00006e f7fff7ff BL LCD_DisplayStringLine
;;;137 LCD_DisplayStringLine(Line5, "To exit press Key ");
000072 a133 ADR r1,|L5.320|
000074 2078 MOVS r0,#0x78
000076 f7fff7ff BL LCD_DisplayStringLine
;;;138 LCD_DisplayStringLine(Line6, "push button ");
00007a a137 ADR r1,|L5.344|
00007c 2090 MOVS r0,#0x90
00007e f7fff7ff BL LCD_DisplayStringLine
;;;139
;;;140 /* Clear the RTC Alarm flag */
;;;141 RTC_ClearFlag(RTC_FLAG_ALR);
000082 2002 MOVS r0,#2
000084 f7fff7ff BL RTC_ClearFlag
;;;142
;;;143 /* Save the GPIO pins current configuration then put all GPIO pins in Analog
;;;144 Input mode ...*/
;;;145 GPIO_SaveConfig();
000088 f7fff7ff BL GPIO_SaveConfig
;;;146
;;;147 /* ... and keep PG.08 configuration which will be used as EXTI Line8 source */
;;;148 GPIOG->CRH = 0x4;
00008c 4938 LDR r1,|L5.368|
00008e 2004 MOVS r0,#4
000090 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);
000092 2101 MOVS r1,#1
000094 4608 MOV r0,r1
000096 f7fff7ff BL PWR_EnterSTOPMode
;;;152
;;;153 /* Restore the GPIO Configurations*/
;;;154 GPIO_RestoreConfig();
00009a f7fff7ff BL GPIO_RestoreConfig
;;;155
;;;156 /* At this stage the system has resumed from STOP mode ************************/
;;;157 EXTI_InitStructure.EXTI_Mode = EXTI_Mode_Interrupt;
00009e f88df88d STRB r5,[sp,#4]
;;;158 EXTI_InitStructure.EXTI_Line = EXTI_Line8;
;;;159 EXTI_InitStructure.EXTI_Trigger = EXTI_Trigger_Falling;
0000a2 f88df88d STRB r10,[sp,#5]
0000a6 f8cdf8cd STR r9,[sp,#0]
;;;160 EXTI_InitStructure.EXTI_LineCmd = DISABLE;
0000aa f88df88d STRB r5,[sp,#6]
;;;161 EXTI_Init(&EXTI_InitStructure);
0000ae 4668 MOV r0,sp
0000b0 f7fff7ff BL EXTI_Init
;;;162
;;;163 /* Enable the EXTI9_5 Interrupt */
;;;164 NVIC_InitStructure.NVIC_IRQChannel = EXTI9_5_IRQChannel;
0000b4 f88df88d STRB r8,[sp,#8]
;;;165 NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 2;
0000b8 2002 MOVS r0,#2
0000ba f88df88d STRB r0,[sp,#9]
;;;166 NVIC_InitStructure.NVIC_IRQChannelSubPriority = 1;
0000be f88df88d STRB r4,[sp,#0xa]
;;;167 NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
0000c2 f88df88d STRB r4,[sp,#0xb]
;;;168 NVIC_Init(&NVIC_InitStructure);
0000c6 a802 ADD r0,sp,#8
0000c8 f7fff7ff 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();
0000cc f7fff7ff BL SYSCLKConfig_STOP
|L5.208|
;;;173
;;;174 while(ReadKey() != NOKEY)
0000d0 f7fff7ff BL ReadKey
0000d4 2800 CMP r0,#0
0000d6 d1fb BNE |L5.208|
;;;175 {
;;;176 }
;;;177
;;;178 if(STOPModeStatus != RESET)
0000d8 6838 LDR r0,[r7,#0] ; STOPModeStatus
;;;179 {
;;;180 LCD_DisplayStringLine(Line4, " STOP Mode ");
0000da a126 ADR r1,|L5.372|
0000dc 2800 CMP r0,#0 ;178
0000de f04ff04f MOV r0,#0x60
0000e2 d003 BEQ |L5.236|
0000e4 f7fff7ff BL LCD_DisplayStringLine
;;;181 LCD_DisplayStringLine(Line5, "Wake-Up by RTC Alarm");
0000e8 a128 ADR r1,|L5.396|
;;;182 LCD_DisplayStringLine(Line6, "Press JoyStick to ");
;;;183 LCD_DisplayStringLine(Line7, "continue... ");
0000ea e002 B |L5.242|
|L5.236|
;;;184 }
;;;185 else
;;;186 {
;;;187 LCD_DisplayStringLine(Line4, " STOP Mode ");
0000ec f7fff7ff BL LCD_DisplayStringLine
;;;188 LCD_DisplayStringLine(Line5, "WakeUp by Key Button");
0000f0 a12c ADR r1,|L5.420|
|L5.242|
0000f2 2078 MOVS r0,#0x78 ;181
0000f4 f7fff7ff BL LCD_DisplayStringLine
0000f8 a130 ADR r1,|L5.444|
0000fa 2090 MOVS r0,#0x90 ;182
0000fc f7fff7ff BL LCD_DisplayStringLine
000100 a134 ADR r1,|L5.468|
000102 20a8 MOVS r0,#0xa8 ;183
000104 f7fff7ff BL LCD_DisplayStringLine
|L5.264|
;;;189 LCD_DisplayStringLine(Line6, "Press JoyStick to ");
;;;190 LCD_DisplayStringLine(Line7, "continue... ");
;;;191 }
;;;192
;;;193 while(ReadKey() == NOKEY)
000108 f7fff7ff BL ReadKey
00010c 2800 CMP r0,#0
00010e d0fb BEQ |L5.264|
;;;194 {
;;;195 }
;;;196
;;;197 /* Clear the LCD */
;;;198 LCD_Clear(White);
000110 4630 MOV r0,r6
000112 f7fff7ff BL LCD_Clear
;;;199 /* Display the previous menu */
;;;200 DisplayMenu();
000116 f7fff7ff BL DisplayMenu
;;;201 /* Enable the JoyStick interrupts */
;;;202 IntExtOnOffConfig(ENABLE);
00011a 2001 MOVS r0,#1
00011c f7fff7ff BL IntExtOnOffConfig
;;;203 }
000120 e8bde8bd POP {r1-r11,pc}
;;;204
ENDP
|L5.292|
000124 00000000 DCD ||.data||
|L5.296|
000128 20204d43 DCB " MC"
00012c 5520696e DCB "U in"
000130 2053544f DCB " STO"
000134 50204d6f DCB "P Mo"
000138 64652020 DCB "de "
00013c 00000000 DCB "\0\0\0\0"
|L5.320|
000140 546f2065 DCB "To e"
000144 78697420 DCB "xit "
000148 70726573 DCB "pres"
00014c 73204b65 DCB "s Ke"
000150 79202020 DCB "y "
000154 00000000 DCB "\0\0\0\0"
|L5.344|
000158 70757368 DCB "push"
00015c 20627574 DCB " but"
000160 746f6e20 DCB "ton "
000164 20202020 DCB " "
000168 20202020 DCB " "
00016c 00000000 DCB "\0\0\0\0"
|L5.368|
000170 40012000 DCD 0x40012000
|L5.372|
000174 20202020 DCB " "
000178 20205354 DCB " ST"
00017c 4f50204d DCB "OP M"
000180 6f646520 DCB "ode "
000184 20202020 DCB " "
000188 00000000 DCB "\0\0\0\0"
|L5.396|
00018c 57616b65 DCB "Wake"
000190 2d557020 DCB "-Up "
000194 62792052 DCB "by R"
000198 54432041 DCB "TC A"
00019c 6c61726d DCB "larm"
0001a0 00000000 DCB "\0\0\0\0"
|L5.420|
0001a4 57616b65 DCB "Wake"
0001a8 55702062 DCB "Up b"
0001ac 79204b65 DCB "y Ke"
0001b0 79204275 DCB "y Bu"
0001b4 74746f6e DCB "tton"
0001b8 00000000 DCB "\0\0\0\0"
|L5.444|
0001bc 50726573 DCB "Pres"
0001c0 73204a6f DCB "s Jo"
0001c4 79537469 DCB "ySti"
0001c8 636b2074 DCB "ck t"
0001cc 6f202020 DCB "o "
0001d0 00000000 DCB "\0\0\0\0"
|L5.468|
0001d4 636f6e74 DCB "cont"
0001d8 696e7565 DCB "inue"
0001dc 2e2e2e20 DCB "... "
0001e0 20202020 DCB " "
0001e4 20202020 DCB " "
0001e8 00000000 DCB "\0\0\0\0"
AREA ||i.EnterSTOPMode_RTCAlarm||, CODE, READONLY, ALIGN=2
EnterSTOPMode_RTCAlarm PROC
;;;213 void EnterSTOPMode_RTCAlarm(void)
;;;214 {
000000 b570 PUSH {r4-r6,lr}
;;;215 u32 tmp = 0;
;;;216
;;;217 /* Clear the LCD */
;;;218 LCD_Clear(White);
000002 f64ff64f MOV r5,#0xffff
000006 4628 MOV r0,r5
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -