⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lowpower.txt

📁 STM32外部SRAM用作datamemery的程序 开发环境MDK
💻 TXT
📖 第 1 页 / 共 4 页
字号:
000008  f7fff7ff          BL       LCD_Clear
;;;219      /* Set the LCD Back Color */
;;;220      LCD_SetBackColor(Blue);
00000c  201f              MOVS     r0,#0x1f
00000e  f7fff7ff          BL       LCD_SetBackColor
;;;221    
;;;222      /* Set the LCD Text Color */
;;;223      LCD_SetTextColor(White);
000012  4628              MOV      r0,r5
000014  f7fff7ff          BL       LCD_SetTextColor
;;;224    
;;;225      /* Disable the JoyStick interrupts */
;;;226      IntExtOnOffConfig(DISABLE);
000018  2000              MOVS     r0,#0
00001a  f7fff7ff          BL       IntExtOnOffConfig
;;;227    
;;;228      while(ReadKey() != NOKEY)
00001e  bf00              NOP      
                  |L6.32|
000020  f7fff7ff          BL       ReadKey
000024  2800              CMP      r0,#0
000026  d1fb              BNE      |L6.32|
;;;229      {
;;;230      }
;;;231    
;;;232      if(BKP_ReadBackupRegister(BKP_DR1) != 0xA5A5)
000028  2004              MOVS     r0,#4
00002a  f7fff7ff          BL       BKP_ReadBackupRegister
00002e  f5a0f5a0          SUB      r1,r0,#0xa500
000032  39a5              SUBS     r1,r1,#0xa5
000034  d025              BEQ      |L6.130|
;;;233      {
;;;234        LCD_DisplayStringLine(Line1, "Time and Date are   ");
000036  a133              ADR      r1,|L6.260|
000038  2018              MOVS     r0,#0x18
00003a  f7fff7ff          BL       LCD_DisplayStringLine
;;;235        LCD_DisplayStringLine(Line2, "not configured,     ");
00003e  a137              ADR      r1,|L6.284|
000040  2030              MOVS     r0,#0x30
000042  f7fff7ff          BL       LCD_DisplayStringLine
;;;236        LCD_DisplayStringLine(Line3, "please go to the    ");
000046  a13b              ADR      r1,|L6.308|
000048  2048              MOVS     r0,#0x48
00004a  f7fff7ff          BL       LCD_DisplayStringLine
;;;237        LCD_DisplayStringLine(Line4, "calendar menu and   ");
00004e  a13f              ADR      r1,|L6.332|
000050  2060              MOVS     r0,#0x60
000052  f7fff7ff          BL       LCD_DisplayStringLine
;;;238        LCD_DisplayStringLine(Line5, "set the time and    ");
000056  a143              ADR      r1,|L6.356|
000058  2078              MOVS     r0,#0x78
00005a  f7fff7ff          BL       LCD_DisplayStringLine
;;;239        LCD_DisplayStringLine(Line6, "date parameters.    ");
00005e  a147              ADR      r1,|L6.380|
000060  2090              MOVS     r0,#0x90
000062  f7fff7ff          BL       LCD_DisplayStringLine
;;;240        LCD_DisplayStringLine(Line7, "Press JoyStick to   ");
000066  a14b              ADR      r1,|L6.404|
000068  20a8              MOVS     r0,#0xa8
00006a  f7fff7ff          BL       LCD_DisplayStringLine
;;;241        LCD_DisplayStringLine(Line8, "continue...         ");
00006e  a14f              ADR      r1,|L6.428|
000070  20c0              MOVS     r0,#0xc0
000072  f7fff7ff          BL       LCD_DisplayStringLine
;;;242        while(ReadKey() == NOKEY)
000076  bf00              NOP      
                  |L6.120|
000078  f7fff7ff          BL       ReadKey
00007c  2800              CMP      r0,#0
00007e  d0fb              BEQ      |L6.120|
000080  e036              B        |L6.240|
                  |L6.130|
;;;243        {
;;;244        }
;;;245        /* Clear the LCD */
;;;246        LCD_Clear(White);
;;;247        /* Display the previous menu */
;;;248        DisplayMenu();
;;;249        /* Enable the JoyStick interrupts */
;;;250        IntExtOnOffConfig(ENABLE);
;;;251        return;
;;;252      }
;;;253      tmp = RTC_GetCounter();
000082  f7fff7ff          BL       RTC_GetCounter
000086  4604              MOV      r4,r0
;;;254    
;;;255      /* Save the Alarm value in the Backup register */
;;;256      BKP_WriteBackupRegister(BKP_DR6, (tmp & 0x0000FFFF));
000088  b281              UXTH     r1,r0
00008a  2018              MOVS     r0,#0x18
00008c  f7fff7ff          BL       BKP_WriteBackupRegister
;;;257      BKP_WriteBackupRegister(BKP_DR7, (tmp >> 16));
000090  0c21              LSRS     r1,r4,#16
000092  201c              MOVS     r0,#0x1c
000094  f7fff7ff          BL       BKP_WriteBackupRegister
;;;258      
;;;259      Alarm_PreAdjust();
000098  f7fff7ff          BL       Alarm_PreAdjust
;;;260      LCD_ClearLine(Line8);
00009c  20c0              MOVS     r0,#0xc0
00009e  f7fff7ff          BL       LCD_ClearLine
;;;261      LCD_DisplayStringLine(Line6, "  MCU in STOP Mode  "); 
0000a2  a148              ADR      r1,|L6.452|
0000a4  2090              MOVS     r0,#0x90
0000a6  f7fff7ff          BL       LCD_DisplayStringLine
;;;262      LCD_DisplayStringLine(Line7, " Wait For RTC Alarm ");
0000aa  a14c              ADR      r1,|L6.476|
0000ac  20a8              MOVS     r0,#0xa8
0000ae  f7fff7ff          BL       LCD_DisplayStringLine
;;;263      
;;;264      /* Save the GPIO pins current configuration then put all GPIO pins in Analog Input mode */
;;;265      GPIO_SaveConfig();
0000b2  f7fff7ff          BL       GPIO_SaveConfig
;;;266      
;;;267      /* Request to enter STOP mode with regulator in low power */
;;;268      PWR_EnterSTOPMode(PWR_Regulator_LowPower, PWR_STOPEntry_WFI);
0000b6  2101              MOVS     r1,#1
0000b8  4608              MOV      r0,r1
0000ba  f7fff7ff          BL       PWR_EnterSTOPMode
;;;269    
;;;270      /* Restore the GPIO Configurations*/
;;;271      GPIO_RestoreConfig();
0000be  f7fff7ff          BL       GPIO_RestoreConfig
;;;272      
;;;273      /* Configures system clock after wake-up from STOP: enable HSE, PLL and select PLL
;;;274         as system clock source (HSE and PLL are disabled in STOP mode) */
;;;275      SYSCLKConfig_STOP();
0000c2  f7fff7ff          BL       SYSCLKConfig_STOP
;;;276    
;;;277      LCD_DisplayStringLine(Line4, "      STOP Mode     ");
0000c6  a14b              ADR      r1,|L6.500|
0000c8  2060              MOVS     r0,#0x60
0000ca  f7fff7ff          BL       LCD_DisplayStringLine
;;;278      LCD_DisplayStringLine(Line5, "Wake-Up by RTC Alarm");
0000ce  a14f              ADR      r1,|L6.524|
0000d0  2078              MOVS     r0,#0x78
0000d2  f7fff7ff          BL       LCD_DisplayStringLine
;;;279      LCD_DisplayStringLine(Line6, "Press JoyStick to   ");
0000d6  a12f              ADR      r1,|L6.404|
0000d8  2090              MOVS     r0,#0x90
0000da  f7fff7ff          BL       LCD_DisplayStringLine
;;;280      LCD_DisplayStringLine(Line7, "continue...         ");
0000de  a133              ADR      r1,|L6.428|
0000e0  20a8              MOVS     r0,#0xa8
0000e2  f7fff7ff          BL       LCD_DisplayStringLine
;;;281    
;;;282      while(ReadKey() == NOKEY)
0000e6  bf00              NOP      
                  |L6.232|
0000e8  f7fff7ff          BL       ReadKey
0000ec  2800              CMP      r0,#0
0000ee  d0fb              BEQ      |L6.232|
                  |L6.240|
;;;283      {
;;;284      }
;;;285    
;;;286      /* Clear the LCD */
;;;287      LCD_Clear(White);
0000f0  4628              MOV      r0,r5
0000f2  f7fff7ff          BL       LCD_Clear
;;;288      /* Display the previous menu */
;;;289      DisplayMenu();
0000f6  f7fff7ff          BL       DisplayMenu
;;;290      /* Enable the JoyStick interrupts */
;;;291      IntExtOnOffConfig(ENABLE);
0000fa  e8bde8bd          POP      {r4-r6,lr}
0000fe  2001              MOVS     r0,#1
000100  f7fff7ff          B.W      IntExtOnOffConfig
;;;292    }
;;;293    
                          ENDP

                  |L6.260|
000104  54696d65          DCB      "Time"
000108  20616e64          DCB      " and"
00010c  20446174          DCB      " Dat"
000110  65206172          DCB      "e ar"
000114  65202020          DCB      "e   "
000118  00000000          DCB      "\0\0\0\0"
                  |L6.284|
00011c  6e6f7420          DCB      "not "
000120  636f6e66          DCB      "conf"
000124  69677572          DCB      "igur"
000128  65642c20          DCB      "ed, "
00012c  20202020          DCB      "    "
000130  00000000          DCB      "\0\0\0\0"
                  |L6.308|
000134  706c6561          DCB      "plea"
000138  73652067          DCB      "se g"
00013c  6f20746f          DCB      "o to"
000140  20746865          DCB      " the"
000144  20202020          DCB      "    "
000148  00000000          DCB      "\0\0\0\0"
                  |L6.332|
00014c  63616c65          DCB      "cale"
000150  6e646172          DCB      "ndar"
000154  206d656e          DCB      " men"
000158  7520616e          DCB      "u an"
00015c  64202020          DCB      "d   "
000160  00000000          DCB      "\0\0\0\0"
                  |L6.356|
000164  73657420          DCB      "set "
000168  74686520          DCB      "the "
00016c  74696d65          DCB      "time"
000170  20616e64          DCB      " and"
000174  20202020          DCB      "    "
000178  00000000          DCB      "\0\0\0\0"
                  |L6.380|
00017c  64617465          DCB      "date"
000180  20706172          DCB      " par"
000184  616d6574          DCB      "amet"
000188  6572732e          DCB      "ers."
00018c  20202020          DCB      "    "
000190  00000000          DCB      "\0\0\0\0"
                  |L6.404|
000194  50726573          DCB      "Pres"
000198  73204a6f          DCB      "s Jo"
00019c  79537469          DCB      "ySti"
0001a0  636b2074          DCB      "ck t"
0001a4  6f202020          DCB      "o   "
0001a8  00000000          DCB      "\0\0\0\0"
                  |L6.428|
0001ac  636f6e74          DCB      "cont"
0001b0  696e7565          DCB      "inue"
0001b4  2e2e2e20          DCB      "... "
0001b8  20202020          DCB      "    "
0001bc  20202020          DCB      "    "
0001c0  00000000          DCB      "\0\0\0\0"
                  |L6.452|
0001c4  20204d43          DCB      "  MC"
0001c8  5520696e          DCB      "U in"
0001cc  2053544f          DCB      " STO"
0001d0  50204d6f          DCB      "P Mo"
0001d4  64652020          DCB      "de  "
0001d8  00000000          DCB      "\0\0\0\0"
                  |L6.476|
0001dc  20576169          DCB      " Wai"
0001e0  7420466f          DCB      "t Fo"
0001e4  72205254          DCB      "r RT"
0001e8  4320416c          DCB      "C Al"
0001ec  61726d20          DCB      "arm "
0001f0  00000000          DCB      "\0\0\0\0"
                  |L6.500|
0001f4  20202020          DCB      "    "
0001f8  20205354          DCB      "  ST"
0001fc  4f50204d          DCB      "OP M"
000200  6f646520          DCB      "ode "
000204  20202020          DCB      "    "
000208  00000000          DCB      "\0\0\0\0"
                  |L6.524|
00020c  57616b65          DCB      "Wake"
000210  2d557020          DCB      "-Up "
000214  62792052          DCB      "by R"
000218  54432041          DCB      "TC A"
00021c  6c61726d          DCB      "larm"
000220  00000000          DCB      "\0\0\0\0"

                          AREA ||i.EnterSTANDBYMode_WAKEUP||, CODE, READONLY, ALIGN=2

                  EnterSTANDBYMode_WAKEUP PROC
;;;302    void EnterSTANDBYMode_WAKEUP(void)
;;;303    {
000000  b510              PUSH     {r4,lr}
;;;304      LCD_Clear(White);
000002  f64ff64f          MOV      r4,#0xffff
000006  4620              MOV      r0,r4
000008  f7fff7ff          BL       LCD_Clear
;;;305      /* Set the LCD Back Color */
;;;306      LCD_SetBackColor(Blue);
00000c  201f              MOVS     r0,#0x1f
00000e  f7fff7ff          BL       LCD_SetBackColor
;;;307    
;;;308      /* Set the LCD Text Color */
;;;309      LCD_SetTextColor(White);
000012  4620              MOV      r0,r4
000014  f7fff7ff          BL       LCD_SetTextColor
;;;310    
;;;311      LCD_DisplayStringLine(Line7, " MCU in STANDBY Mode"); 
000018  a105              ADR      r1,|L7.48|
00001a  20a8              MOVS     r0,#0xa8
00001c  f7fff7ff          BL       LCD_DisplayStringLine

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -