; generated by Component: ARM Compiler 5.05 update 1 (build 106) Tool: ArmCC [4d0efa]
; commandline ArmCC [--c99 --list --split_sections --debug -c --asm --interleave -o..\output\sc32f1xxx_tim.o --asm_dir=..\List\ --list_dir=..\List\ --depend=..\output\sc32f1xxx_tim.d --cpu=Cortex-M0+ --apcs=interwork --diag_suppress=9931 -I..\FWLib\SC32F1XXX_Lib\inc -I..\User\HeadFiles -I..\User -I..\Drivers -I..\Apps -I..\CMSIS -ID:\Keil5\ARM\Pack\Keil\SC32F10xx_DFP\1.0.0\Device\SC32F10xx\FWLib\SC32_Lib\inc -ID:\Keil5\ARM\Pack\Keil\SC32F10xx_DFP\1.0.0\Device\SH32F2xx\Include -D__UVISION_VERSION=538 -DSC32F10xx --omf_browse=..\output\sc32f1xxx_tim.crf ..\FWLib\SC32F1XXX_Lib\src\sc32f1xxx_tim.c]
                          THUMB

                          AREA ||i.TIM_ClearFlag||, CODE, READONLY, ALIGN=1

                  TIM_ClearFlag PROC
;;;658     */
;;;659    void TIM_ClearFlag(TIM_TypeDef* TIMx, uint16_t TIM_FLAG)
000000  60c1              STR      r1,[r0,#0xc]
;;;660    {
;;;661      /* Check the parameters */
;;;662      assert_param(IS_TIM_ALL_PERIPH(TIMx));
;;;663    
;;;664      /* Clear the flags */
;;;665      TIMx->TIM_STS = (uint16_t)TIM_FLAG;
;;;666    }
000002  4770              BX       lr
;;;667    
                          ENDP


                          AREA ||i.TIM_ClockOutputCmd||, CODE, READONLY, ALIGN=1

                  TIM_ClockOutputCmd PROC
;;;525     */
;;;526    void TIM_ClockOutputCmd(TIM_TypeDef* TIMx, FunctionalState NewState)
000000  2201              MOVS     r2,#1
;;;527    {
;;;528      /* Check the parameters */
;;;529      assert_param(IS_TIM_ALL_PERIPH(TIMx));
;;;530      assert_param(IS_FUNCTIONAL_STATE(NewState));
;;;531    
;;;532      if(NewState != DISABLE)
;;;533      {
;;;534        /* Enable the TIM Clock Output */
;;;535        TIMx->TIM_CON |= TIM_CON_TXOE;
000002  03d2              LSLS     r2,r2,#15
000004  2900              CMP      r1,#0                 ;532
;;;536      }
;;;537      else
;;;538      {
;;;539        /* Disable the TIM Clock Output */
;;;540        TIMx->TIM_CON &= (uint32_t)~TIM_CON_TXOE;
000006  6801              LDR      r1,[r0,#0]
000008  d001              BEQ      |L2.14|
00000a  4311              ORRS     r1,r1,r2              ;535
00000c  e000              B        |L2.16|
                  |L2.14|
00000e  4391              BICS     r1,r1,r2
                  |L2.16|
000010  6001              STR      r1,[r0,#0]            ;535
;;;541      }
;;;542    }
000012  4770              BX       lr
;;;543    
                          ENDP


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

                  TIM_Cmd PROC
;;;149     */
;;;150    void TIM_Cmd(TIM_TypeDef* TIMx, FunctionalState NewState)
000000  2900              CMP      r1,#0
;;;151    {
;;;152      /* Check the parameters */
;;;153      assert_param(IS_TIM_ALL_PERIPH(TIMx));
;;;154      assert_param(IS_FUNCTIONAL_STATE(NewState));
;;;155    
;;;156      if(NewState != DISABLE)
;;;157      {
;;;158        /* Enable the TIM Counter */
;;;159        TIMx->TIM_CON |= TIM_CON_TR;
;;;160      }
;;;161      else
;;;162      {
;;;163        /* Disable the TIM Counter */
;;;164        TIMx->TIM_CON &= (uint16_t)~TIM_CON_TR;
000002  6801              LDR      r1,[r0,#0]
000004  d002              BEQ      |L3.12|
000006  2280              MOVS     r2,#0x80              ;159
000008  4311              ORRS     r1,r1,r2              ;159
00000a  e001              B        |L3.16|
                  |L3.12|
00000c  4a01              LDR      r2,|L3.20|
00000e  4011              ANDS     r1,r1,r2
                  |L3.16|
000010  6001              STR      r1,[r0,#0]            ;159
;;;165      }
;;;166    }
000012  4770              BX       lr
;;;167    
                          ENDP

                  |L3.20|
                          DCD      0x0000ff7f

                          AREA ||i.TIM_DMACmd||, CODE, READONLY, ALIGN=1

                  TIM_DMACmd PROC
;;;676     */
;;;677    void TIM_DMACmd(TIM_TypeDef* TIMx, uint16_t TIM_DMAReq, FunctionalState NewState)
000000  2a00              CMP      r2,#0
;;;678    {
;;;679      /* Check the parameters */
;;;680      assert_param(IS_TIM_DMA_PERIPH(TIMx));
;;;681      assert_param(IS_FUNCTIONAL_STATE(NewState));
;;;682    
;;;683      if(NewState != DISABLE)
;;;684      {
;;;685        /* Enable the TIM DMA */
;;;686        TIMx->TIM_IDE |= TIM_DMAReq;
;;;687      }
;;;688      else
;;;689      {
;;;690        /* Disable the TIM DMA */
;;;691        TIMx->TIM_IDE &= (uint16_t)~TIM_DMAReq;
000002  6982              LDR      r2,[r0,#0x18]
000004  d001              BEQ      |L4.10|
000006  430a              ORRS     r2,r2,r1              ;686
000008  e002              B        |L4.16|
                  |L4.10|
00000a  43c9              MVNS     r1,r1
00000c  b289              UXTH     r1,r1
00000e  400a              ANDS     r2,r2,r1
                  |L4.16|
000010  6182              STR      r2,[r0,#0x18]         ;686
;;;692      }
;;;693    }
000012  4770              BX       lr
;;;694    
                          ENDP


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

                  TIM_DeInit PROC
;;;43      */
;;;44     void TIM_DeInit(TIM_TypeDef* TIMx)
000000  492d              LDR      r1,|L5.184|
;;;45     {
000002  b510              PUSH     {r4,lr}
;;;46       assert_param(IS_TIM_ALL_PERIPH(TIMx));
;;;47     
;;;48       if(TIMx == TIM0)
000004  4288              CMP      r0,r1
000006  d106              BNE      |L5.22|
;;;49       {
;;;50         RCC_APB0PeriphResetCmd(RCC_APB0Periph_TIM0, ENABLE);
000008  2101              MOVS     r1,#1
00000a  4608              MOV      r0,r1
00000c  f7fffffe          BL       RCC_APB0PeriphResetCmd
;;;51         RCC_APB0PeriphResetCmd(RCC_APB0Periph_TIM0, DISABLE);
000010  2100              MOVS     r1,#0
000012  2001              MOVS     r0,#1
000014  e009              B        |L5.42|
                  |L5.22|
;;;52       }
;;;53       else if(TIMx == TIM1)
000016  4928              LDR      r1,|L5.184|
000018  3140              ADDS     r1,r1,#0x40
00001a  4288              CMP      r0,r1
00001c  d108              BNE      |L5.48|
;;;54       {
;;;55         RCC_APB0PeriphResetCmd(RCC_APB0Periph_TIM1, ENABLE);
00001e  2101              MOVS     r1,#1
000020  2002              MOVS     r0,#2
000022  f7fffffe          BL       RCC_APB0PeriphResetCmd
;;;56         RCC_APB0PeriphResetCmd(RCC_APB0Periph_TIM1, DISABLE);
000026  2100              MOVS     r1,#0
000028  2002              MOVS     r0,#2
                  |L5.42|
00002a  f7fffffe          BL       RCC_APB0PeriphResetCmd
;;;57       }
;;;58       else if(TIMx == TIM2)
;;;59       {
;;;60         RCC_APB0PeriphResetCmd(RCC_APB0Periph_TIM2, ENABLE);
;;;61         RCC_APB0PeriphResetCmd(RCC_APB0Periph_TIM2, DISABLE);
;;;62       }
;;;63       else if(TIMx == TIM3)
;;;64       {
;;;65         RCC_APB0PeriphResetCmd(RCC_APB0Periph_TIM3, ENABLE);
;;;66         RCC_APB0PeriphResetCmd(RCC_APB0Periph_TIM3, DISABLE);
;;;67       }
;;;68       else if(TIMx == TIM4)
;;;69       {
;;;70         RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM4, ENABLE);
;;;71         RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM4, DISABLE);
;;;72       }
;;;73       else if(TIMx == TIM5)
;;;74       {
;;;75         RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM5, ENABLE);
;;;76         RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM5, DISABLE);
;;;77       }
;;;78       else if(TIMx == TIM6)
;;;79       {
;;;80         RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM6, ENABLE);
;;;81         RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM6, DISABLE);
;;;82       }
;;;83       else if(TIMx == TIM7)
;;;84       {
;;;85         RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM7, ENABLE);
;;;86         RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM7, DISABLE);
;;;87       }
;;;88     }
00002e  bd10              POP      {r4,pc}
                  |L5.48|
000030  4921              LDR      r1,|L5.184|
000032  3180              ADDS     r1,r1,#0x80           ;58
000034  4288              CMP      r0,r1                 ;58
000036  d106              BNE      |L5.70|
000038  2101              MOVS     r1,#1                 ;60
00003a  2004              MOVS     r0,#4                 ;60
00003c  f7fffffe          BL       RCC_APB0PeriphResetCmd
000040  2100              MOVS     r1,#0                 ;61
000042  2004              MOVS     r0,#4                 ;61
000044  e7f1              B        |L5.42|
                  |L5.70|
000046  491c              LDR      r1,|L5.184|
000048  31c0              ADDS     r1,r1,#0xc0           ;63
00004a  4288              CMP      r0,r1                 ;63
00004c  d106              BNE      |L5.92|
00004e  2101              MOVS     r1,#1                 ;65
000050  2008              MOVS     r0,#8                 ;65
000052  f7fffffe          BL       RCC_APB0PeriphResetCmd
000056  2100              MOVS     r1,#0                 ;66
000058  2008              MOVS     r0,#8                 ;66
00005a  e7e6              B        |L5.42|
                  |L5.92|
00005c  4917              LDR      r1,|L5.188|
00005e  4288              CMP      r0,r1                 ;68
000060  d106              BNE      |L5.112|
000062  2101              MOVS     r1,#1                 ;70
000064  4608              MOV      r0,r1                 ;70
000066  f7fffffe          BL       RCC_APB1PeriphResetCmd
00006a  2100              MOVS     r1,#0                 ;71
00006c  2001              MOVS     r0,#1                 ;71
00006e  e009              B        |L5.132|
                  |L5.112|
000070  4912              LDR      r1,|L5.188|
000072  3140              ADDS     r1,r1,#0x40           ;73
000074  4288              CMP      r0,r1                 ;73
000076  d108              BNE      |L5.138|
000078  2101              MOVS     r1,#1                 ;75
00007a  2002              MOVS     r0,#2                 ;75
00007c  f7fffffe          BL       RCC_APB1PeriphResetCmd
000080  2100              MOVS     r1,#0                 ;76
000082  2002              MOVS     r0,#2                 ;76
                  |L5.132|
000084  f7fffffe          BL       RCC_APB1PeriphResetCmd
                  |L5.136|
000088  bd10              POP      {r4,pc}
                  |L5.138|
00008a  490c              LDR      r1,|L5.188|
00008c  3180              ADDS     r1,r1,#0x80           ;78
00008e  4288              CMP      r0,r1                 ;78
000090  d106              BNE      |L5.160|
000092  2101              MOVS     r1,#1                 ;80
000094  2004              MOVS     r0,#4                 ;80
000096  f7fffffe          BL       RCC_APB1PeriphResetCmd
00009a  2100              MOVS     r1,#0                 ;81
00009c  2004              MOVS     r0,#4                 ;81
00009e  e7f1              B        |L5.132|
                  |L5.160|
0000a0  4906              LDR      r1,|L5.188|
0000a2  31c0              ADDS     r1,r1,#0xc0           ;83
0000a4  4288              CMP      r0,r1                 ;83
0000a6  d1ef              BNE      |L5.136|
0000a8  2101              MOVS     r1,#1                 ;85
0000aa  2008              MOVS     r0,#8                 ;85
0000ac  f7fffffe          BL       RCC_APB1PeriphResetCmd
0000b0  2100              MOVS     r1,#0                 ;86
0000b2  2008              MOVS     r0,#8                 ;86
0000b4  e7e6              B        |L5.132|
;;;89     
                          ENDP

0000b6  0000              DCW      0x0000
                  |L5.184|
                          DCD      0x40020100
                  |L5.188|
                          DCD      0x40021100

                          AREA ||i.TIM_GetAutoreload||, CODE, READONLY, ALIGN=1

                  TIM_GetAutoreload PROC
;;;216     */
;;;217    uint16_t TIM_GetAutoreload(TIM_TypeDef* TIMx)
000000  6880              LDR      r0,[r0,#8]
;;;218    {
;;;219      /* Check the parameters */
;;;220      assert_param(IS_TIM_ALL_PERIPH(TIMx));
;;;221    
;;;222      /* Get the ReloadData Register value */
;;;223      return TIMx->TIM_RLD;
000002  b280              UXTH     r0,r0
;;;224    }
000004  4770              BX       lr
;;;225    
                          ENDP


                          AREA ||i.TIM_GetCounter||, CODE, READONLY, ALIGN=1

                  TIM_GetCounter PROC
;;;187     */
;;;188    uint32_t TIM_GetCounter(TIM_TypeDef* TIMx)
000000  6840              LDR      r0,[r0,#4]
;;;189    {
;;;190      /* Check the parameters */
;;;191      assert_param(IS_TIM_ALL_PERIPH(TIMx));
;;;192    
;;;193      /* Get the Counter Register value */
;;;194      return TIMx->TIM_CNT;
;;;195    }
000002  4770              BX       lr
;;;196    
                          ENDP


                          AREA ||i.TIM_GetFailingCapture||, CODE, READONLY, ALIGN=1

                  TIM_GetFailingCapture PROC
;;;372      */
;;;373    uint32_t TIM_GetFailingCapture(TIM_TypeDef* TIMx)
000000  6940              LDR      r0,[r0,#0x14]
;;;374    {
;;;375      /* Check the parameters */
;;;376      assert_param(IS_TIM_ALL_PERIPH(TIMx));
;;;377    
;;;378      /* Get the Failing Capture Register value */
;;;379      return TIMx->TIM_PDTB_FCAP;
;;;380    }
000002  4770              BX       lr
;;;381    
                          ENDP


                          AREA ||i.TIM_GetFlagStatus||, CODE, READONLY, ALIGN=1

                  TIM_GetFlagStatus PROC
;;;633     */
;;;634    FlagStatus TIM_GetFlagStatus(TIM_TypeDef* TIMx, TIM_Flag_TypeDef TIM_FLAG)
000000  4602              MOV      r2,r0
;;;635    {
;;;636      FlagStatus bitstatus = RESET;
;;;637      /* Check the parameters */
;;;638      assert_param(IS_TIM_ALL_PERIPH(TIMx));
;;;639      assert_param(IS_GET_TIM_FLAG(TIM_FLAG));
;;;640    
;;;641      if((TIMx->TIM_STS & TIM_FLAG) != (uint16_t)RESET)
000002  68d2              LDR      r2,[r2,#0xc]
000004  2000              MOVS     r0,#0                 ;636
000006  420a              TST      r2,r1
000008  d000              BEQ      |L9.12|
;;;642      {
;;;643        bitstatus = SET;
00000a  2001              MOVS     r0,#1
                  |L9.12|
;;;644      }
;;;645      else
;;;646      {
;;;647        bitstatus = RESET;
;;;648      }
;;;649      return bitstatus;
;;;650    }
00000c  4770              BX       lr
;;;651    
                          ENDP


                          AREA ||i.TIM_GetPrescaler||, CODE, READONLY, ALIGN=1

                  TIM_GetPrescaler PROC
;;;250     */
;;;251    TIM_Prescaler_TypeDef TIM_GetPrescaler(TIM_TypeDef* TIMx)
000000  6800              LDR      r0,[r0,#0]
;;;252    {
;;;253      /* Check the parameters */
;;;254      assert_param(IS_TIM_ALL_PERIPH(TIMx));
;;;255    
;;;256      /* Get the CKD value */
;;;257      return (TIM_Prescaler_TypeDef)(TIMx->TIM_CON & TIM_CON_TIMCLK);
000002  2107              MOVS     r1,#7
000004  0209              LSLS     r1,r1,#8
000006  4008              ANDS     r0,r0,r1
;;;258    }
000008  4770              BX       lr
;;;259    
                          ENDP


                          AREA ||i.TIM_GetRisingCapture||, CODE, READONLY, ALIGN=1

                  TIM_GetRisingCapture PROC
;;;358      */
;;;359    uint32_t TIM_GetRisingCapture(TIM_TypeDef* TIMx)
000000  6900              LDR      r0,[r0,#0x10]
;;;360    {
;;;361      /* Check the parameters */
;;;362      assert_param(IS_TIM_ALL_PERIPH(TIMx));
;;;363    
;;;364      /* Get the Rising Capture Register value */
;;;365      return TIMx->TIM_PDTA_RCAP;
;;;366    }
000002  4770              BX       lr
;;;367    
                          ENDP


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

                  TIM_ICCmd PROC
;;;335     */
;;;336    void TIM_ICCmd(TIM_TypeDef* TIMx, FunctionalState NewState)
000000  2900              CMP      r1,#0
;;;337    {
;;;338      /* Check the parameters */
;;;339      assert_param(IS_TIM_ALL_PERIPH(TIMx));
;;;340      assert_param(IS_FUNCTIONAL_STATE(NewState));
;;;341    
;;;342      if(NewState != DISABLE)
;;;343      {
;;;344        /* Enable the capture function of TIMx */
;;;345        TIMx->TIM_CON |= TIM_CON_CPRL;
;;;346      }
;;;347      else
;;;348      {
;;;349        /* Disable the capture function of TIMx */
;;;350        TIMx->TIM_CON &= (uint16_t)~TIM_CON_CPRL;
000002  6801              LDR      r1,[r0,#0]
000004  d002              BEQ      |L12.12|
000006  2201              MOVS     r2,#1                 ;345
000008  4311              ORRS     r1,r1,r2              ;345
00000a  e001              B        |L12.16|
                  |L12.12|
00000c  4a01              LDR      r2,|L12.20|
00000e  4011              ANDS     r1,r1,r2
                  |L12.16|
000010  6001              STR      r1,[r0,#0]            ;345
;;;351      }
;;;352    }
000012  4770              BX       lr
;;;353    
                          ENDP

                  |L12.20|
                          DCD      0x0000fffe

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

                  TIM_ICInit PROC
;;;281     */
;;;282    void TIM_ICInit(TIM_TypeDef* TIMx, TIM_IC_InitTypeDef* TIM_IC_InitStruct)
000000  b510              PUSH     {r4,lr}
;;;283    {
;;;284      uint16_t tmpreg;
;;;285      /* Check the parameters */
;;;286      if(TIM_IC_InitStruct->TIM_FICPIN == TIM_FICPin_TnEx)
000002  884b              LDRH     r3,[r1,#2]
;;;287        assert_param(IS_TIM_TNEX_PERIPH(TIMx));
;;;288      if((TIM_IC_InitStruct->TIM_FICPIN == TIM_FICPin_Tn) ||
;;;289          (TIM_IC_InitStruct->TIM_RICPIN == TIM_RICPin_Tn))
;;;290        assert_param(IS_TIM_TN_PERIPH(TIMx));
;;;291    
;;;292      /* Get the TIMx TIM_CON register value */
;;;293      tmpreg = (uint16_t)TIMx->TIM_CON;
000004  6802              LDR      r2,[r0,#0]
;;;294    
;;;295      /* Clear EXENR, EXENF and EXENX SPR bits */
;;;296      tmpreg &= ~(TIM_CON_EXENR | TIM_CON_EXENF | TIM_CON_FSEL | TIM_CON_EXENX);
000006  243c              MOVS     r4,#0x3c
000008  b292              UXTH     r2,r2                 ;293
00000a  43a2              BICS     r2,r2,r4
;;;297    
;;;298      if(TIMx == TIM0)
00000c  4c06              LDR      r4,|L13.40|
00000e  42a0              CMP      r0,r4
000010  d103              BNE      |L13.26|
;;;299      {
;;;300        if(TIM_IC_InitStruct->TIM_FICPIN != TIM_FICPin_Tn)
000012  2b08              CMP      r3,#8
000014  d006              BEQ      |L13.36|
                  |L13.22|
;;;301        {
;;;302          tmpreg |= TIM_IC_InitStruct->TIM_FICPIN;
000016  431a              ORRS     r2,r2,r3
000018  e004              B        |L13.36|
                  |L13.26|
;;;303        }
;;;304      }
;;;305      else
;;;306      {
;;;307        if(TIM_IC_InitStruct->TIM_FICPIN != TIM_FICPin_TnEx)
00001a  2b30              CMP      r3,#0x30
00001c  d002              BEQ      |L13.36|
;;;308        {
;;;309          tmpreg |= (TIM_IC_InitStruct->TIM_FICPIN | TIM_IC_InitStruct->TIM_RICPIN);
00001e  8809              LDRH     r1,[r1,#0]
000020  430b              ORRS     r3,r3,r1
000022  e7f8              B        |L13.22|
                  |L13.36|
;;;310        }
;;;311      }
;;;312    
;;;313      TIMx->TIM_CON = (uint32_t)tmpreg;
000024  6002              STR      r2,[r0,#0]
;;;314    }
000026  bd10              POP      {r4,pc}
;;;315    
                          ENDP

                  |L13.40|
                          DCD      0x40020100

                          AREA ||i.TIM_ICStructInit||, CODE, READONLY, ALIGN=1

                  TIM_ICStructInit PROC
;;;321      */
;;;322    void TIM_ICStructInit(TIM_IC_InitTypeDef* TIM_IC_InitStruct)
000000  2100              MOVS     r1,#0
;;;323    {
;;;324      /* Set the default configuration */
;;;325      TIM_IC_InitStruct->TIM_FICPIN = TIM_FICPin_Disable;
000002  8041              STRH     r1,[r0,#2]
;;;326      TIM_IC_InitStruct->TIM_RICPIN = TIM_RICPin_Disable;
000004  8001              STRH     r1,[r0,#0]
;;;327    }
000006  4770              BX       lr
;;;328    
                          ENDP


                          AREA ||i.TIM_ITConfig||, CODE, READONLY, ALIGN=1

                  TIM_ITConfig PROC
;;;607     */
;;;608    void TIM_ITConfig(TIM_TypeDef* TIMx, uint16_t TIM_IT, FunctionalState NewState)
000000  2a00              CMP      r2,#0
;;;609    {
;;;610      /* Check the parameters */
;;;611      assert_param(IS_TIM_ALL_PERIPH(TIMx));
;;;612      assert_param(IS_TIM_IT(TIM_IT));
;;;613      assert_param(IS_FUNCTIONAL_STATE(NewState));
;;;614    
;;;615      if(NewState != DISABLE)
;;;616      {
;;;617        /* Enable the Interrupt sources */
;;;618        TIMx->TIM_IDE |= TIM_IT;
;;;619      }
;;;620      else
;;;621      {
;;;622        /* Disable the Interrupt sources */
;;;623        TIMx->TIM_IDE &= (uint16_t)~TIM_IT;
000002  6982              LDR      r2,[r0,#0x18]
000004  d001              BEQ      |L15.10|
000006  430a              ORRS     r2,r2,r1              ;618
000008  e002              B        |L15.16|
                  |L15.10|
00000a  43c9              MVNS     r1,r1
00000c  b289              UXTH     r1,r1
00000e  400a              ANDS     r2,r2,r1
                  |L15.16|
000010  6182              STR      r2,[r0,#0x18]         ;618
;;;624      }
;;;625    }
000012  4770              BX       lr
;;;626    
                          ENDP


                          AREA ||i.TIM_PWMGetDuty||, CODE, READONLY, ALIGN=1

                  TIM_PWMGetDuty PROC
;;;482     */
;;;483    uint16_t TIM_PWMGetDuty(TIM_TypeDef* TIMx, TIM_PWMChannel_Typedef TIM_PWMChannel)
000000  2902              CMP      r1,#2
;;;484    {
000002  d002              BEQ      |L16.10|
;;;485      uint16_t tmpduty = 0;
;;;486    
;;;487      /* Check the parameters */
;;;488      assert_param(IS_TIM_ALL_PERIPH(TIMx));
;;;489    
;;;490      if(TIM_PWMChannel == TIM_PWMChannel_PWMA)
;;;491      {
;;;492        tmpduty = (uint16_t)TIMx->TIM_PDTA_RCAP;
;;;493      }
;;;494      else
;;;495      {
;;;496        tmpduty = (uint16_t)TIMx->TIM_PDTB_FCAP;
000004  6940              LDR      r0,[r0,#0x14]
                  |L16.6|
000006  b280              UXTH     r0,r0                 ;492
;;;497      }
;;;498    
;;;499      return tmpduty;
;;;500    }
000008  4770              BX       lr
                  |L16.10|
00000a  6900              LDR      r0,[r0,#0x10]         ;492
00000c  e7fb              B        |L16.6|
;;;501    
                          ENDP


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

                  TIM_PWMInit PROC
;;;403     */
;;;404    void TIM_PWMInit(TIM_TypeDef* TIMx, TIM_PWM_InitTypeDef* TIM_PWM_InitStruct)
000000  b510              PUSH     {r4,lr}
;;;405    {
;;;406      uint32_t tmpreg;
;;;407      /* Check the parameters */
;;;408      if((TIM_PWM_InitStruct->TIM_PWMLowPolarityChannl == TIM_PWMChannel_PWMA) ||
000002  884a              LDRH     r2,[r1,#2]
;;;409          (TIM_PWM_InitStruct->TIM_PWMOutputChannl == TIM_PWMChannel_PWMA))
000004  880b              LDRH     r3,[r1,#0]
;;;410        assert_param(IS_TIM_TN_PERIPH(TIMx));
;;;411      if((TIM_PWM_InitStruct->TIM_PWMLowPolarityChannl == TIM_PWMChannel_PWMB) ||
;;;412          (TIM_PWM_InitStruct->TIM_PWMOutputChannl == TIM_PWMChannel_PWMB))
;;;413        assert_param(IS_TIM_TNEX_PERIPH(TIMx));
;;;414    
;;;415      /* Get the TIMx TIM_CON value */
;;;416      tmpreg = TIMx->TIM_CON;
000006  6801              LDR      r1,[r0,#0]
;;;417    
;;;418      /* Clear EPWMNA,EPWMNB,INVNA and INVNB bit */
;;;419      tmpreg &= (uint32_t)~(TIM_CON_EPWMNA | TIM_CON_EPWMNB | TIM_CON_INVNA | TIM_CON_INVNB);
000008  240f              MOVS     r4,#0xf
00000a  02e4              LSLS     r4,r4,#11
00000c  43a1              BICS     r1,r1,r4
;;;420    
;;;421      /* TIM0 has no TnPWMA and TIM1,2,3,4,5,6,7 has no TnPWMB */
;;;422      if(((TIMx == TIM0) && (TIM_PWM_InitStruct->TIM_PWMOutputChannl != TIM_PWMChannel_PWMA) &&
00000e  4c09              LDR      r4,|L17.52|
000010  42a0              CMP      r0,r4
000012  d103              BNE      |L17.28|
000014  2b02              CMP      r3,#2
000016  d001              BEQ      |L17.28|
;;;423          (TIM_PWM_InitStruct->TIM_PWMLowPolarityChannl != TIM_PWMChannel_PWMA)) ||
000018  2a02              CMP      r2,#2
00001a  d105              BNE      |L17.40|
                  |L17.28|
;;;424          ((TIMx != TIM0) && (TIM_PWM_InitStruct->TIM_PWMOutputChannl != TIM_PWMChannel_PWMB) &&
00001c  42a0              CMP      r0,r4
00001e  d007              BEQ      |L17.48|
000020  2b01              CMP      r3,#1
000022  d005              BEQ      |L17.48|
;;;425           (TIM_PWM_InitStruct->TIM_PWMLowPolarityChannl != TIM_PWMChannel_PWMB)))
000024  2a01              CMP      r2,#1
000026  d003              BEQ      |L17.48|
                  |L17.40|
;;;426      {
;;;427        /* Set EPWMNA and EPWMNB bit to PWM Output Channl value */
;;;428        /* Set INVNA and INVNB bit to PWM Low Polarity Channl value */
;;;429        tmpreg |= (uint32_t)((TIM_PWM_InitStruct->TIM_PWMOutputChannl << (13U))
000028  035b              LSLS     r3,r3,#13
00002a  02d2              LSLS     r2,r2,#11
00002c  4313              ORRS     r3,r3,r2
00002e  4319              ORRS     r1,r1,r3
                  |L17.48|
;;;430                             | (TIM_PWM_InitStruct->TIM_PWMLowPolarityChannl) << (11U));
;;;431      }
;;;432    
;;;433      /* Write to TIMx TIM_CON */
;;;434      TIMx->TIM_CON = tmpreg;
000030  6001              STR      r1,[r0,#0]
;;;435    }
000032  bd10              POP      {r4,pc}
;;;436    
                          ENDP

                  |L17.52|
                          DCD      0x40020100

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

                  TIM_PWMSetDuty PROC
;;;456     */
;;;457    void TIM_PWMSetDuty(TIM_TypeDef* TIMx, TIM_PWMChannel_Typedef TIM_PWMChannel, uint16_t PWM_DutyValue)
000000  4b06              LDR      r3,|L18.28|
;;;458    {
;;;459      /* Check the parameters */
;;;460      if(TIM_PWMChannel == TIM_PWMChannel_PWMA)
;;;461        assert_param(IS_TIM_TN_PERIPH(TIMx));
;;;462      if(TIM_PWMChannel == TIM_PWMChannel_PWMB)
;;;463        assert_param(IS_TIM_TNEX_PERIPH(TIMx));
;;;464    
;;;465      /* TIM0 has no TnPWMA */
;;;466      if((TIMx != TIM0) && (TIM_PWMChannel == TIM_PWMChannel_PWMA))
000002  4298              CMP      r0,r3
000004  d001              BEQ      |L18.10|
000006  2902              CMP      r1,#2
000008  d005              BEQ      |L18.22|
                  |L18.10|
;;;467      {
;;;468        TIMx->TIM_PDTA_RCAP = PWM_DutyValue;
;;;469      }
;;;470      /* TIM1,2,3,4,5,6,7 has no TnPWMB */
;;;471      else if((TIMx == TIM0) && (TIM_PWMChannel == TIM_PWMChannel_PWMB))
00000a  4298              CMP      r0,r3
00000c  d102              BNE      |L18.20|
00000e  2901              CMP      r1,#1
000010  d100              BNE      |L18.20|
;;;472      {
;;;473        TIMx->TIM_PDTB_FCAP = PWM_DutyValue;
000012  6142              STR      r2,[r0,#0x14]
                  |L18.20|
;;;474      }
;;;475    }
000014  4770              BX       lr
                  |L18.22|
000016  6102              STR      r2,[r0,#0x10]         ;468
000018  4770              BX       lr
;;;476    
                          ENDP

00001a  0000              DCW      0x0000
                  |L18.28|
                          DCD      0x40020100

                          AREA ||i.TIM_PWMStructInit||, CODE, READONLY, ALIGN=1

                  TIM_PWMStructInit PROC
;;;441      */
;;;442    void TIM_PWMStructInit(TIM_PWM_InitTypeDef* TIM_PWM_InitStruct)
000000  2100              MOVS     r1,#0
;;;443    {
;;;444      /* Set the default configuration */
;;;445      TIM_PWM_InitStruct->TIM_PWMLowPolarityChannl = TIM_PWMChannel_Less;
000002  8041              STRH     r1,[r0,#2]
;;;446      TIM_PWM_InitStruct->TIM_PWMOutputChannl = TIM_PWMChannel_Less;
000004  8001              STRH     r1,[r0,#0]
;;;447    }
000006  4770              BX       lr
;;;448    
                          ENDP


                          AREA ||i.TIM_PinRemapConfig||, CODE, READONLY, ALIGN=1

                  TIM_PinRemapConfig PROC
;;;566     */
;;;567    void TIM_PinRemapConfig(TIM_TypeDef* TIMx, TIM_PinRemap_TypeDef TIM_Remap)
000000  6802              LDR      r2,[r0,#0]
;;;568    {
;;;569      uint32_t tmpreg ;
;;;570      /* Check the parameters */
;;;571      assert_param(IS_TIM_REMAP_PERIPH(TIMx));
;;;572      assert_param(IS_TIM_PINREMAP(TIM_Remap));
;;;573    
;;;574      tmpreg = TIMx->TIM_CON;
;;;575    
;;;576      tmpreg &= (uint32_t)(~TIM_CON_SPOS);
000002  2301              MOVS     r3,#1
000004  04db              LSLS     r3,r3,#19
000006  439a              BICS     r2,r2,r3
;;;577    
;;;578      tmpreg |= TIM_Remap;
000008  430a              ORRS     r2,r2,r1
;;;579    
;;;580      TIMx->TIM_CON = tmpreg;
00000a  6002              STR      r2,[r0,#0]
;;;581    }
00000c  4770              BX       lr
;;;582    
                          ENDP


                          AREA ||i.TIM_SetAutoreload||, CODE, READONLY, ALIGN=1

                  TIM_SetAutoreload PROC
;;;202     */
;;;203    void TIM_SetAutoreload(TIM_TypeDef* TIMx, uint16_t Autoreload)
000000  6081              STR      r1,[r0,#8]
;;;204    {
;;;205      /* Check the parameters */
;;;206      assert_param(IS_TIM_ALL_PERIPH(TIMx));
;;;207    
;;;208      /* Set the ReloadData Register value */
;;;209      TIMx->TIM_RLD = Autoreload;
;;;210    }
000002  4770              BX       lr
;;;211    
                          ENDP


                          AREA ||i.TIM_SetCounter||, CODE, READONLY, ALIGN=1

                  TIM_SetCounter PROC
;;;173     */
;;;174    void TIM_SetCounter(TIM_TypeDef* TIMx, uint32_t Counter)
000000  6041              STR      r1,[r0,#4]
;;;175    {
;;;176      /* Check the parameters */
;;;177      assert_param(IS_TIM_ALL_PERIPH(TIMx));
;;;178    
;;;179      /* Set the Counter Register value */
;;;180      TIMx->TIM_CNT = (uint32_t)Counter;
;;;181    }
000002  4770              BX       lr
;;;182    
                          ENDP


                          AREA ||i.TIM_SetPerscaler||, CODE, READONLY, ALIGN=1

                  TIM_SetPerscaler PROC
;;;231     */
;;;232    void TIM_SetPerscaler(TIM_TypeDef* TIMx, TIM_Prescaler_TypeDef TIM_Perscaler)
000000  6802              LDR      r2,[r0,#0]
;;;233    {
;;;234    
;;;235      /* Check the parameters */
;;;236      assert_param(IS_TIM_ALL_PERIPH(TIMx));
;;;237      assert_param(IS_TIM_PRESCALER(TIM_Perscaler));
;;;238    
;;;239      /* Reset the CKD Bits */
;;;240      TIMx->TIM_CON &= (uint32_t)(~TIM_CON_TIMCLK);
000002  2307              MOVS     r3,#7
000004  021b              LSLS     r3,r3,#8
000006  439a              BICS     r2,r2,r3
000008  6002              STR      r2,[r0,#0]
;;;241    
;;;242      /* Set the CKD value */
;;;243      TIMx->TIM_CON |= TIM_Perscaler;
00000a  6802              LDR      r2,[r0,#0]
00000c  430a              ORRS     r2,r2,r1
00000e  6002              STR      r2,[r0,#0]
;;;244    }
000010  4770              BX       lr
;;;245    
                          ENDP


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

                  TIM_TIMBaseInit PROC
;;;97      */
;;;98     void TIM_TIMBaseInit(TIM_TypeDef* TIMx, TIM_TimeBaseInitTypeDef* TIM_TimeBaseInitStruct)
000000  b530              PUSH     {r4,r5,lr}
;;;99     {
;;;100      /* Check the parameters */
;;;101      uint32_t tmpreg;
;;;102      assert_param(IS_TIM_ALL_PERIPH(TIMx));
;;;103      assert_param(IS_TIM_PRESCALER(TIM_TimeBaseInitStruct->TIM_EXENX));
;;;104      assert_param(IS_TIM_WORKMODE(TIM_TimeBaseInitStruct->TIM_WorkMode));
;;;105      assert_param(IS_TIM_COUNTERMODE(TIM_TimeBaseInitStruct->TIM_CounterMode));
;;;106      assert_param(IS_TIM_RICPin(TIM_TimeBaseInitStruct->TIM_Prescaler));
;;;107    
;;;108      /*---------------------------- TIMx TIM_CON Configuration ------------------------*/
;;;109      /* Get the TIMx TIM_CON value */
;;;110      tmpreg = TIMx->TIM_CON;
000002  6803              LDR      r3,[r0,#0]
;;;111      /* Clear TIMCK, DEC, CTSEL and EXENX SPR bits */
;;;112      tmpreg &= (uint32_t)~(TIM_CON_TIMCLK | TIM_CON_CTSEL | TIM_CON_DEC | TIM_CON_EXENX);
000004  4a07              LDR      r2,|L24.36|
;;;113      /* Configure TIMx: Prescaler, AlignedMode and WorkMode */
;;;114      /* Set TIMCK bits according to Prescaler value */
;;;115      /* Set DEC bit according to CounterMode value */
;;;116      /* Set CTSEL bit according to WorkMode value */
;;;117      /* Set EXENX bit according to EXENX value */
;;;118      tmpreg |= (uint32_t)(TIM_TimeBaseInitStruct->TIM_Prescaler | TIM_TimeBaseInitStruct->TIM_CounterMode |
000006  888c              LDRH     r4,[r1,#4]
000008  4013              ANDS     r3,r3,r2              ;112
00000a  880a              LDRH     r2,[r1,#0]
00000c  88cd              LDRH     r5,[r1,#6]
00000e  4322              ORRS     r2,r2,r4
000010  884c              LDRH     r4,[r1,#2]
000012  016d              LSLS     r5,r5,#5
000014  432c              ORRS     r4,r4,r5
000016  4322              ORRS     r2,r2,r4
000018  431a              ORRS     r2,r2,r3
;;;119                           TIM_TimeBaseInitStruct->TIM_WorkMode | (TIM_TimeBaseInitStruct->TIM_EXENX << TIM_CON_EXENX_Pos));
;;;120      /* Write to TIMx TIM_CON */
;;;121      TIMx->TIM_CON = tmpreg;
00001a  6002              STR      r2,[r0,#0]
;;;122      /* Write to TIMx TIM_CYCLE */
;;;123      TIMx->TIM_CNT = TIMx->TIM_RLD = TIM_TimeBaseInitStruct->TIM_Preload;
00001c  8909              LDRH     r1,[r1,#8]
00001e  6081              STR      r1,[r0,#8]
000020  6041              STR      r1,[r0,#4]
;;;124    
;;;125    }
000022  bd30              POP      {r4,r5,pc}
;;;126    
                          ENDP

                  |L24.36|
                          DCD      0xfffff89d

                          AREA ||i.TIM_TimeBaseStructInit||, CODE, READONLY, ALIGN=1

                  TIM_TimeBaseStructInit PROC
;;;132      */
;;;133    void TIM_TimeBaseStructInit(TIM_TimeBaseInitTypeDef* TIM_TimeBaseInitStruct)
000000  2100              MOVS     r1,#0
;;;134    {
;;;135      /* Set the default configuration */
;;;136      TIM_TimeBaseInitStruct->TIM_Prescaler = TIM_PRESCALER_1;
000002  8001              STRH     r1,[r0,#0]
;;;137      TIM_TimeBaseInitStruct->TIM_WorkMode = TIM_WorkMode_Timer;
000004  8041              STRH     r1,[r0,#2]
;;;138      TIM_TimeBaseInitStruct->TIM_CounterMode = TIM_CounterMode_Up;
000006  8081              STRH     r1,[r0,#4]
;;;139      TIM_TimeBaseInitStruct->TIM_Preload = 0x0000;
000008  8101              STRH     r1,[r0,#8]
;;;140      TIM_TimeBaseInitStruct->TIM_EXENX = TIM_EXENX_Disable;
00000a  80c1              STRH     r1,[r0,#6]
;;;141    }
00000c  4770              BX       lr
;;;142    
                          ENDP


;*** Start embedded assembler ***

#line 1 "..\\FWLib\\SC32F1XXX_Lib\\src\\sc32f1xxx_tim.c"
	AREA ||.rev16_text||, CODE
	THUMB
	EXPORT |__asm___15_sc32f1xxx_tim_c_c458916b____REV16|
#line 463 "..\\CMSIS\\cmsis_armcc.h"
|__asm___15_sc32f1xxx_tim_c_c458916b____REV16| PROC
#line 464

 rev16 r0, r0
 bx lr
	ENDP
	AREA ||.revsh_text||, CODE
	THUMB
	EXPORT |__asm___15_sc32f1xxx_tim_c_c458916b____REVSH|
#line 478
|__asm___15_sc32f1xxx_tim_c_c458916b____REVSH| PROC
#line 479

 revsh r0, r0
 bx lr
	ENDP

;*** End   embedded assembler ***
