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

📄 stm32f10x_pwr.lst

📁 针对STM32F103的UCOS移植
💻 LST
📖 第 1 页 / 共 2 页
字号:

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

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

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

   \                                 In segment CODE, align 4, keep-with-next
    247          FlagStatus PWR_GetFlagStatus(u32 PWR_FLAG)
    248          {
    249            FlagStatus bitstatus = RESET;
    250          
    251            /* Check the parameters */
    252            assert(IS_PWR_GET_FLAG(PWR_FLAG));
    253            
    254            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
    255            {
    256              bitstatus = SET;
   \   00000008   0120               MOVS     R0,#+1
   \   0000000A   7047               BX       LR
    257            }
    258            else
    259            {
    260              bitstatus = RESET;
   \                     ??PWR_GetFlagStatus_1:
   \   0000000C   0020               MOVS     R0,#+0
    261            }
    262          
    263            /* Return the flag status */
    264            return bitstatus;
   \   0000000E   7047               BX       LR               ;; return
   \                     ??PWR_GetFlagStatus_0:
   \   00000010   04700040           DC32     0x40007004
    265          }
    266          
    267          /*******************************************************************************
    268          * Function Name  : PWR_ClearFlag
    269          * Description    : Clears the PWR's pending flags.
    270          * Input          : - PWR_FLAG: specifies the flag to clear.
    271          *                    This parameter can be one of the following values:
    272          *                       - PWR_FLAG_WU: Wake Up flag
    273          *                       - PWR_FLAG_SB: StandBy flag
    274          * Output         : None
    275          * Return         : None
    276          *******************************************************************************/

   \                                 In segment CODE, align 4, keep-with-next
    277          void PWR_ClearFlag(u32 PWR_FLAG)
    278          {
    279            /* Check the parameters */
    280            assert(IS_PWR_CLEAR_FLAG(PWR_FLAG));
    281                   
    282            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]
    283          }
   \   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
    284          
    285          /******************* (C) COPYRIGHT 2007 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 + -