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

📄 stm32f10x_pwr.lst

📁 编译环境是 iar EWARM ,STM32 下的UCOSII
💻 LST
📖 第 1 页 / 共 2 页
字号:
   \                                 In segment CODE, align 4, keep-with-next
    151          void PWR_WakeUpPinCmd(FunctionalState NewState)
    152          {
    153            /* Check the parameters */
    154            assert_param(IS_FUNCTIONAL_STATE(NewState));
    155          
    156            *(vu32 *) CSR_EWUP_BB = (u32)NewState;
   \                     PWR_WakeUpPinCmd:
   \   00000000   0149               LDR.N    R1,??PWR_WakeUpPinCmd_0  ;; 0x420e00a0
   \   00000002   0860               STR      R0,[R1, #+0]
    157          }
   \   00000004   7047               BX       LR               ;; return
   \   00000006   00BF               Nop      
   \                     ??PWR_WakeUpPinCmd_0:
   \   00000008   A0000E42           DC32     0x420e00a0
    158          
    159          /*******************************************************************************
    160          * Function Name  : PWR_EnterSTOPMode
    161          * Description    : Enters STOP mode.
    162          * Input          : - PWR_Regulator: specifies the regulator state in STOP mode.
    163          *                    This parameter can be one of the following values:
    164          *                       - PWR_Regulator_ON: STOP mode with regulator ON
    165          *                       - PWR_Regulator_LowPower: STOP mode with
    166          *                         regulator in low power mode
    167          *                  - PWR_STOPEntry: specifies if STOP mode in entered with WFI or 
    168          *                    WFE instruction.
    169          *                    This parameter can be one of the following values:
    170          *                       - PWR_STOPEntry_WFI: enter STOP mode with WFI instruction
    171          *                       - PWR_STOPEntry_WFE: enter STOP mode with WFE instruction
    172          * Output         : None
    173          * Return         : None
    174          *******************************************************************************/

   \                                 In segment CODE, align 4, keep-with-next
    175          void PWR_EnterSTOPMode(u32 PWR_Regulator, u8 PWR_STOPEntry)
    176          {
   \                     PWR_EnterSTOPMode:
   \   00000000   10B5               PUSH     {R4,LR}
    177            u32 tmpreg = 0;
    178          
    179            /* Check the parameters */
    180            assert_param(IS_PWR_REGULATOR(PWR_Regulator));
    181            assert_param(IS_PWR_STOP_ENTRY(PWR_STOPEntry));
    182            
    183            /* Select the regulator state in STOP mode ---------------------------------*/
    184            tmpreg = PWR->CR;
   \   00000002   ....               LDR.N    R2,??DataTable5  ;; 0x40007000
   \   00000004   1368               LDR      R3,[R2, #+0]
    185          
    186            /* Clear PDDS and LPDS bits */
    187            tmpreg &= CR_DS_Mask;
    188          
    189            /* Set LPDS bit according to PWR_Regulator value */
    190            tmpreg |= PWR_Regulator;
    191          
    192            /* Store the new value */
    193            PWR->CR = tmpreg;
   \   00000006   0324               MOVS     R4,#+3
   \   00000008   A343               BICS     R3,R3,R4
   \   0000000A   1843               ORRS     R0,R0,R3
   \   0000000C   1060               STR      R0,[R2, #+0]
    194          
    195            /* Set SLEEPDEEP bit of Cortex System Control Register */
    196            *(vu32 *) SCB_SysCtrl |= SysCtrl_SLEEPDEEP_Set;
   \   0000000E   ....               LDR.N    R0,??DataTable4  ;; 0xffffffffe000ed10
   \   00000010   0268               LDR      R2,[R0, #+0]
   \   00000012   52F00402           ORRS     R2,R2,#0x4
   \   00000016   0260               STR      R2,[R0, #+0]
    197            
    198            /* Select STOP mode entry --------------------------------------------------*/
    199            if(PWR_STOPEntry == PWR_STOPEntry_WFI)
   \   00000018   0129               CMP      R1,#+1
   \   0000001A   02D1               BNE.N    ??PWR_EnterSTOPMode_0
    200            {   
    201              /* Request Wait For Interrupt */
    202              __WFI();
   \   0000001C   ........           _BLF     __WFI,??__WFI??rT
   \   00000020   10BD               POP      {R4,PC}
    203            }
    204            else
    205            {
    206              /* Request Wait For Event */
    207              __WFE();
   \                     ??PWR_EnterSTOPMode_0:
   \   00000022   ........           _BLF     __WFE,??__WFE??rT
    208            }
    209          }
   \   00000026   10BD               POP      {R4,PC}          ;; return
    210          
    211          /*******************************************************************************
    212          * Function Name  : PWR_EnterSTANDBYMode
    213          * Description    : Enters STANDBY mode.
    214          * Input          : None
    215          * Output         : None
    216          * Return         : None
    217          *******************************************************************************/

   \                                 In segment CODE, align 4, keep-with-next
    218          void PWR_EnterSTANDBYMode(void)
    219          {
   \                     PWR_EnterSTANDBYMode:
   \   00000000   00B5               PUSH     {LR}
    220            /* Clear Wake-up flag */
    221            PWR->CR |= CR_CWUF_Set;
   \   00000002   ....               LDR.N    R0,??DataTable5  ;; 0x40007000
   \   00000004   0168               LDR      R1,[R0, #+0]
   \   00000006   51F00401           ORRS     R1,R1,#0x4
   \   0000000A   0160               STR      R1,[R0, #+0]
    222          
    223            /* Select STANDBY mode */
    224            PWR->CR |= CR_PDDS_Set;
   \   0000000C   0168               LDR      R1,[R0, #+0]
   \   0000000E   51F00201           ORRS     R1,R1,#0x2
   \   00000012   0160               STR      R1,[R0, #+0]
    225          
    226            /* Set SLEEPDEEP bit of Cortex System Control Register */
    227            *(vu32 *) SCB_SysCtrl |= SysCtrl_SLEEPDEEP_Set;
   \   00000014   ....               LDR.N    R0,??DataTable4  ;; 0xffffffffe000ed10
   \   00000016   0168               LDR      R1,[R0, #+0]
   \   00000018   51F00401           ORRS     R1,R1,#0x4
   \   0000001C   0160               STR      R1,[R0, #+0]
    228          
    229            /* Request Wait For Interrupt */
    230            __WFI();
   \   0000001E   ........           _BLF     __WFI,??__WFI??rT
    231          }
   \   00000022   00BD               POP      {PC}             ;; return
    232          
    233          /*******************************************************************************
    234          * Function Name  : PWR_GetFlagStatus
    235          * Description    : Checks whether the specified PWR flag is set or not.
    236          * Input          : - PWR_FLAG: specifies the flag to check.
    237          *                    This parameter can be one of the following values:
    238          *                       - PWR_FLAG_WU: Wake Up flag
    239          *                       - PWR_FLAG_SB: StandBy flag
    240          *                       - PWR_FLAG_PVDO: PVD Output
    241          * Output         : None
    242          * Return         : The new state of PWR_FLAG (SET or RESET).
    243          *******************************************************************************/

   \                                 In segment CODE, align 4, keep-with-next
    244          FlagStatus PWR_GetFlagStatus(u32 PWR_FLAG)
    245          {
    246            FlagStatus bitstatus = RESET;
    247          
    248            /* Check the parameters */
    249            assert_param(IS_PWR_GET_FLAG(PWR_FLAG));
    250            
    251            if ((PWR->CSR & PWR_FLAG) != (u32)RESET)
   \                     PWR_GetFlagStatus:
   \   00000000   0349               LDR.N    R1,??PWR_GetFlagStatus_0  ;; 0x40007004
   \   00000002   0968               LDR      R1,[R1, #+0]
   \   00000004   0840               ANDS     R0,R0,R1
   \   00000006   01D0               BEQ.N    ??PWR_GetFlagStatus_1
    252            {
    253              bitstatus = SET;
   \   00000008   0120               MOVS     R0,#+1
   \   0000000A   7047               BX       LR
    254            }
    255            else
    256            {
    257              bitstatus = RESET;
   \                     ??PWR_GetFlagStatus_1:
   \   0000000C   0020               MOVS     R0,#+0
    258            }
    259          
    260            /* Return the flag status */
    261            return bitstatus;
   \   0000000E   7047               BX       LR               ;; return
   \                     ??PWR_GetFlagStatus_0:
   \   00000010   04700040           DC32     0x40007004
    262          }
    263          
    264          /*******************************************************************************
    265          * Function Name  : PWR_ClearFlag
    266          * Description    : Clears the PWR's pending flags.
    267          * Input          : - PWR_FLAG: specifies the flag to clear.
    268          *                    This parameter can be one of the following values:
    269          *                       - PWR_FLAG_WU: Wake Up flag
    270          *                       - PWR_FLAG_SB: StandBy flag
    271          * Output         : None
    272          * Return         : None
    273          *******************************************************************************/

   \                                 In segment CODE, align 4, keep-with-next
    274          void PWR_ClearFlag(u32 PWR_FLAG)
    275          {
    276            /* Check the parameters */
    277            assert_param(IS_PWR_CLEAR_FLAG(PWR_FLAG));
    278                   
    279            PWR->CR |=  PWR_FLAG << 2;
   \                     PWR_ClearFlag:
   \   00000000   ....               LDR.N    R1,??DataTable5  ;; 0x40007000
   \   00000002   0A68               LDR      R2,[R1, #+0]
   \   00000004   52EA8000           ORRS     R0,R2,R0, LSL #+2
   \   00000008   0860               STR      R0,[R1, #+0]
    280          }
   \   0000000A   7047               BX       LR               ;; return

   \                                 In segment CODE, align 4, keep-with-next
   \                     ??DataTable4:
   \   00000000   10ED00E0           DC32     0xffffffffe000ed10

   \                                 In segment CODE, align 4, keep-with-next
   \                     ??DataTable5:
   \   00000000   00700040           DC32     0x40007000
    281          
    282          /******************* (C) COPYRIGHT 2008 STMicroelectronics *****END OF FILE****/

   Maximum stack usage in bytes:

     Function             CSTACK
     --------             ------
     PWR_BackupAccessCmd      0
     PWR_ClearFlag            0
     PWR_DeInit               4
     PWR_EnterSTANDBYMode     4
     PWR_EnterSTOPMode        8
     PWR_GetFlagStatus        0
     PWR_PVDCmd               0
     PWR_PVDLevelConfig       0
     PWR_WakeUpPinCmd         0


   Segment part sizes:

     Function/Label       Bytes
     --------------       -----
     PWR_DeInit             22
     PWR_BackupAccessCmd    12
     PWR_PVDCmd             12
     PWR_PVDLevelConfig     14
     PWR_WakeUpPinCmd       12
     PWR_EnterSTOPMode      40
     PWR_EnterSTANDBYMode   36
     PWR_GetFlagStatus      20
     PWR_ClearFlag          12
     ??DataTable4            4
     ??DataTable5            4
      Others                24

 
 212 bytes in segment CODE
 
 188 bytes of CODE memory (+ 24 bytes shared)

Errors: none
Warnings: none

⌨️ 快捷键说明

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