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

📄 stm32f10x_tim.lst

📁 完成数据的采集
💻 LST
📖 第 1 页 / 共 5 页
字号:
   \   00000016   1300               MOVS     R3,R2
   \   00000018   0B43               ORRS     R3,R3,R1
   \   0000001A   2343               ORRS     R3,R3,R4
    515          
    516            TIMx->DCR = (u16)tmpdcr;
   \   0000001C   1C00               MOVS     R4,R3
   \   0000001E   A0F84840           STRH     R4,[R0, #+72]
    517          }
   \   00000022   01B0               ADD      SP,SP,#+4
   \   00000024   10BC               POP      {R4}
   \   00000026   7047               BX       LR               ;; return
    518          
    519          /*******************************************************************************
    520          * Function Name  : TIM_DMACmd
    521          * Description    : Enables or disables the TIMx抯 DMA Requests.
    522          * Input          : - TIMx: where x can be 2, 3 or 4 to select the TIM peripheral.
    523          *                  - TIM_DMASources: specifies the DMA Request sources.
    524          *                    This parameter can be any combination of the following values:
    525          *                       - TIM_DMA_CC1: Capture Compare 1 DMA source
    526          *                       - TIM_DMA_CC2: Capture Compare 2 DMA source
    527          *                       - TIM_DMA_CC3: Capture Compare 3 DMA source
    528          *                       - TIM_DMA_CC4: Capture Compare 4 DMA source
    529          *                       - TIM_DMA_Trigger: Trigger DMA source
    530          *                  - Newstate: new state of the DMA Request sources.
    531          *                    This parameter can be: ENABLE or DISABLE.
    532          * Output         : None
    533          * Return         : None
    534          *******************************************************************************/

   \                                 In section .XML, align 4, keep-with-next
    535          void TIM_DMACmd(TIM_TypeDef* TIMx, u16 TIM_DMASource, FunctionalState Newstate)
    536          {
   \                     TIM_DMACmd:
   \   00000000   11B4               PUSH     {R0,R4}
    537            u32 tmpdier = 0;
   \   00000002   0024               MOVS     R4,#+0
   \   00000004   2300               MOVS     R3,R4
    538            
    539            /* Check the parameters */
    540            assert_param(IS_TIM_DMA_SOURCE(TIM_DMASource));
    541            assert_param(IS_FUNCTIONAL_STATE(Newstate));
    542          
    543            tmpdier = TIMx->DIER;
   \   00000006   8489               LDRH     R4,[R0, #+12]
   \   00000008   2300               MOVS     R3,R4
    544          
    545            if (Newstate != DISABLE)
   \   0000000A   D2B2               UXTB     R2,R2            ;; ZeroExtS R2,R2,#+24,#+24
   \   0000000C   002A               CMP      R2,#+0
   \   0000000E   02D0               BEQ.N    ??TIM_DMACmd_0
    546            {
    547              /* Enable the DMA sources */
    548              tmpdier |= TIM_DMASource;
   \   00000010   89B2               UXTH     R1,R1            ;; ZeroExtS R1,R1,#+16,#+16
   \   00000012   0B43               ORRS     R3,R3,R1
   \   00000014   03E0               B.N      ??TIM_DMACmd_1
    549            }
    550            else
    551            {
    552              /* Disable the DMA sources */
    553              tmpdier &= (u16)(~TIM_DMASource);
   \                     ??TIM_DMACmd_0:
   \   00000016   1C00               MOVS     R4,R3
   \   00000018   CB43               MVNS     R3,R1
   \   0000001A   9BB2               UXTH     R3,R3            ;; ZeroExtS R3,R3,#+16,#+16
   \   0000001C   2340               ANDS     R3,R3,R4
    554            }
    555            TIMx->DIER = (u16)tmpdier;
   \                     ??TIM_DMACmd_1:
   \   0000001E   1C00               MOVS     R4,R3
   \   00000020   8481               STRH     R4,[R0, #+12]
    556          }
   \   00000022   01B0               ADD      SP,SP,#+4
   \   00000024   10BC               POP      {R4}
   \   00000026   7047               BX       LR               ;; return
    557          
    558          /*******************************************************************************
    559          * Function Name  : TIM_InternalClockConfig
    560          * Description    : Configures the TIMx interrnal Clock
    561          * Input          : - TIMx: where x can be 2, 3 or 4 to select the TIM peripheral.
    562          * Output         : None
    563          * Return         : None
    564          *******************************************************************************/

   \                                 In section .XML, align 4, keep-with-next
    565          void TIM_InternalClockConfig(TIM_TypeDef* TIMx)
    566          {
    567            /* Disable slave mode to clock the prescaler directly with the internal clock */
    568            TIMx->SMCR &=  SMCR_SMS_Mask;
   \                     TIM_InternalClockConfig:
   \   00000000   0189               LDRH     R1,[R0, #+8]
   \   00000002   ....               LDR.N    R2,??DataTable5  ;; 0xfff0
   \   00000004   0A40               ANDS     R2,R2,R1
   \   00000006   0281               STRH     R2,[R0, #+8]
    569          }
   \   00000008   7047               BX       LR               ;; return
    570          /*******************************************************************************
    571          * Function Name  : TIM_ITRxExternalClockConfig
    572          * Description    : Configures the TIMx Internal Trigger as External Clock
    573          * Input          : - TIMx: where x can be 2, 3 or 4 to select the TIM peripheral.
    574          *                  - TIM_ITRSource: Trigger source.
    575          *                    This parameter can be one of the following values:
    576          *                       - TIM_TS_ITR0: Internal Trigger 0
    577          *                       - TIM_TS_ITR1: Internal Trigger 1
    578          *                       - TIM_TS_ITR2: Internal Trigger 2
    579          *                       - TIM_TS_ITR3: Internal Trigger 3
    580          * Output         : None
    581          * Return         : None
    582          *******************************************************************************/

   \                                 In section .XML, align 4, keep-with-next
    583          void TIM_ITRxExternalClockConfig(TIM_TypeDef* TIMx, u16 TIM_InputTriggerSource)
    584          {
   \                     TIM_ITRxExternalClockConfig:
   \   00000000   31B5               PUSH     {R0,R4,R5,LR}
   \   00000002   0400               MOVS     R4,R0
   \   00000004   0D00               MOVS     R5,R1
    585            /* Check the parameters */
    586            assert_param(IS_TIM_INTERNAL_TRIGGER_SELECTION(TIM_InputTriggerSource));
    587          
    588            /* Select the Internal Trigger */
    589            TIM_SelectInputTrigger(TIMx, TIM_InputTriggerSource);
   \   00000006   2900               MOVS     R1,R5
   \   00000008   89B2               UXTH     R1,R1            ;; ZeroExtS R1,R1,#+16,#+16
   \   0000000A   2000               MOVS     R0,R4
   \   0000000C   ........           BL       TIM_SelectInputTrigger
    590          
    591            /* Select the External clock mode1 */
    592            TIMx->SMCR |= TIM_SlaveMode_External1;
   \   00000010   2089               LDRH     R0,[R4, #+8]
   \   00000012   50F00700           ORRS     R0,R0,#0x7
   \   00000016   2081               STRH     R0,[R4, #+8]
    593          }
   \   00000018   01B0               ADD      SP,SP,#+4
   \   0000001A   30BD               POP      {R4,R5,PC}       ;; return
    594          /*******************************************************************************
    595          * Function Name  : TIM_TIxExternalClockConfig
    596          * Description    : Configures the TIMx Trigger as External Clock
    597          * Input          : - TIMx: where x can be 2, 3 or 4 to select the TIM peripheral.
    598          *                  - TIM_TIxExternalCLKSource: Trigger source.
    599          *                    This parameter can be one of the following values:
    600          *                       - TIM_TIxExternalCLK1Source_TI1ED: TI1 Edge Detector
    601          *                       - TIM_TIxExternalCLK1Source_TI1: Filtered Timer Input 1
    602          *                       - TIM_TIxExternalCLK1Source_TI2: Filtered Timer Input 2
    603          *                  - TIM_ICPolarity: specifies the TIx Polarity.
    604          *                    This parameter can be:
    605          *                       - TIM_ICPolarity_Rising
    606          *                       - TIM_ICPolarity_Falling
    607          *                   - ICFilter : specifies the filter value.
    608          *                     This parameter must be a value between 0x0 and 0xF.
    609          * Output         : None
    610          * Return         : None
    611          *******************************************************************************/

   \                                 In section .XML, align 4, keep-with-next
    612          void TIM_TIxExternalClockConfig(TIM_TypeDef* TIMx, u16 TIM_TIxExternalCLKSource,
    613                                          u16 TIM_ICPolarity, u8 ICFilter)
    614          {
   \                     TIM_TIxExternalClockConfig:
   \   00000000   F1B5               PUSH     {R0,R4-R7,LR}
   \   00000002   0400               MOVS     R4,R0
   \   00000004   0D00               MOVS     R5,R1
   \   00000006   1600               MOVS     R6,R2
   \   00000008   1F00               MOVS     R7,R3
    615            /* Check the parameters */
    616            assert_param(IS_TIM_TIXCLK_SOURCE(TIM_TIxExternalCLKSource));
    617            assert_param(IS_TIM_IC_POLARITY(TIM_ICPolarity));
    618            assert_param(IS_TIM_IC_FILTER(ICFilter));
    619          
    620            /* Configure the Timer Input Clock Source */
    621            if (TIM_TIxExternalCLKSource == TIM_TIxExternalCLK1Source_TI2)
   \   0000000A   ADB2               UXTH     R5,R5            ;; ZeroExtS R5,R5,#+16,#+16
   \   0000000C   602D               CMP      R5,#+96
   \   0000000E   08D1               BNE.N    ??TIM_TIxExternalClockConfig_0
    622            {
    623              TI2_Config(TIMx, TIM_ICPolarity, TIM_ICSelection_DirectTI, ICFilter);
   \   00000010   3B00               MOVS     R3,R7
   \   00000012   DBB2               UXTB     R3,R3            ;; ZeroExtS R3,R3,#+24,#+24
   \   00000014   0122               MOVS     R2,#+1
   \   00000016   3100               MOVS     R1,R6
   \   00000018   89B2               UXTH     R1,R1            ;; ZeroExtS R1,R1,#+16,#+16
   \   0000001A   2000               MOVS     R0,R4
   \   0000001C   ........           BL       TI2_Config
   \   00000020   07E0               B.N      ??TIM_TIxExternalClockConfig_1
    624            }
    625            else
    626            {
    627              TI1_Config(TIMx, TIM_ICPolarity, TIM_ICSelection_DirectTI, ICFilter);
   \                     ??TIM_TIxExternalClockConfig_0:
   \   00000022   3B00               MOVS     R3,R7
   \   00000024   DBB2               UXTB     R3,R3            ;; ZeroExtS R3,R3,#+24,#+24
   \   00000026   0122               MOVS     R2,#+1
   \   00000028   3100               MOVS     R1,R6
   \   0000002A   89B2               UXTH     R1,R1            ;; ZeroExtS R1,R1,#+16,#+16
   \   0000002C   2000               MOVS     R0,R4
   \   0000002E   ........           BL       TI1_Config
    628            }
    629          
    630            /* Select the Trigger source */
    631            TIM_SelectInputTrigger(TIMx, TIM_TIxExternalCLKSource);
   \                     ??TIM_TIxExternalClockConfig_1:
   \   00000032   2900               MOVS     R1,R5
   \   00000034   89B2               UXTH     R1,R1            ;; ZeroExtS R1,R1,#+16,#+16
   \   00000036   2000               MOVS     R0,R4
   \   00000038   ........           BL       TIM_SelectInputTrigger
    632          
    633            /* Select the External clock mode1 */
    634            TIMx->SMCR |= TIM_SlaveMode_External1;
   \   0000003C   2089               LDRH     R0,[R4, #+8]
   \   0000003E   50F00700           ORRS     R0,R0,#0x7
   \   00000042   2081               STRH     R0,[R4, #+8]
    635          }
   \   00000044   01B0               ADD      SP,SP,#+4
   \   00000046   F0BD               POP      {R4-R7,PC}       ;; return
    636          
    637          /*******************************************************************************
    638          * Function Name  : TIM_ETRClockMode1Config
    639          * Description    : Configures the External clock Mode1
    640          * Input          : - TIMx: where x can be 2, 3 or 4 to select the TIM peripheral.
    641          *               

⌨️ 快捷键说明

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