📄 stm32f10x_tim.lst
字号:
378 TIM_TimeBaseInitStruct->TIM_Period = TIM_Period_Reset_Mask;
\ TIM_TimeBaseStructInit:
\ 00000000 0021 MOVS R1,#+0
\ 00000002 0180 STRH R1,[R0, #+0]
379 TIM_TimeBaseInitStruct->TIM_Prescaler = TIM_Prescaler_Reset_Mask;
\ 00000004 0021 MOVS R1,#+0
\ 00000006 4180 STRH R1,[R0, #+2]
380 TIM_TimeBaseInitStruct->TIM_ClockDivision = TIM_CKD_DIV1;
\ 00000008 0021 MOVS R1,#+0
\ 0000000A 8180 STRH R1,[R0, #+4]
381 TIM_TimeBaseInitStruct->TIM_CounterMode = TIM_CounterMode_Up;
\ 0000000C 0021 MOVS R1,#+0
\ 0000000E C180 STRH R1,[R0, #+6]
382 }
\ 00000010 7047 BX LR ;; return
383
384 /*******************************************************************************
385 * Function Name : TIM_OCStructInit
386 * Description : Fills each TIM_OCInitStruct member with its default value.
387 * Input : - TIM_OCInitStruct: pointer to a TIM_OCInitTypeDef structure
388 * which will be initialized.
389 * Output : None
390 * Return : None
391 *******************************************************************************/
\ In section .XML, align 4, keep-with-next
392 void TIM_OCStructInit(TIM_OCInitTypeDef* TIM_OCInitStruct)
393 {
394 /* Set the default configuration */
395 TIM_OCInitStruct->TIM_OCMode = TIM_OCMode_Timing;
\ TIM_OCStructInit:
\ 00000000 0021 MOVS R1,#+0
\ 00000002 0180 STRH R1,[R0, #+0]
396 TIM_OCInitStruct->TIM_Channel = TIM_Channel_1;
\ 00000004 0021 MOVS R1,#+0
\ 00000006 4180 STRH R1,[R0, #+2]
397 TIM_OCInitStruct->TIM_Pulse = TIM_Pulse_Reset_Mask;
\ 00000008 0021 MOVS R1,#+0
\ 0000000A 8180 STRH R1,[R0, #+4]
398 TIM_OCInitStruct->TIM_OCPolarity = TIM_OCPolarity_High;
\ 0000000C 0021 MOVS R1,#+0
\ 0000000E C180 STRH R1,[R0, #+6]
399 }
\ 00000010 7047 BX LR ;; return
400
401 /*******************************************************************************
402 * Function Name : TIM_ICStructInit
403 * Description : Fills each TIM_InitStruct member with its default value.
404 * Input : - TIM_ICInitStruct: pointer to a TIM_ICInitTypeDef structure
405 * which will be initialized.
406 * Output : None
407 * Return : None
408 *******************************************************************************/
\ In section .XML, align 4, keep-with-next
409 void TIM_ICStructInit(TIM_ICInitTypeDef* TIM_ICInitStruct)
410 {
411 /* Set the default configuration */
412 TIM_ICInitStruct->TIM_ICMode = TIM_ICMode_ICAP;
\ TIM_ICStructInit:
\ 00000000 0721 MOVS R1,#+7
\ 00000002 0180 STRH R1,[R0, #+0]
413 TIM_ICInitStruct->TIM_Channel = TIM_Channel_1;
\ 00000004 0021 MOVS R1,#+0
\ 00000006 4180 STRH R1,[R0, #+2]
414 TIM_ICInitStruct->TIM_ICPolarity = TIM_ICPolarity_Rising;
\ 00000008 0021 MOVS R1,#+0
\ 0000000A 8180 STRH R1,[R0, #+4]
415 TIM_ICInitStruct->TIM_ICSelection = TIM_ICSelection_DirectTI;
\ 0000000C 0121 MOVS R1,#+1
\ 0000000E C180 STRH R1,[R0, #+6]
416 TIM_ICInitStruct->TIM_ICPrescaler = TIM_ICPSC_DIV1;
\ 00000010 0021 MOVS R1,#+0
\ 00000012 0181 STRH R1,[R0, #+8]
417 TIM_ICInitStruct->TIM_ICFilter = TIM_ICFilter_Mask;
\ 00000014 0021 MOVS R1,#+0
\ 00000016 8172 STRB R1,[R0, #+10]
418 }
\ 00000018 7047 BX LR ;; return
419
420 /*******************************************************************************
421 * Function Name : TIM_Cmd
422 * Description : Enables or disables the specified TIM peripheral.
423 * Input : - TIMx: where x can be 2, 3 or 4 to select the TIMx peripheral.
424 * - Newstate: new state of the TIMx peripheral.
425 * This parameter can be: ENABLE or DISABLE.
426 * Output : None
427 * Return : None
428 *******************************************************************************/
\ In section .XML, align 4, keep-with-next
429 void TIM_Cmd(TIM_TypeDef* TIMx, FunctionalState NewState)
430 {
431 /* Check the parameters */
432 assert_param(IS_FUNCTIONAL_STATE(NewState));
433
434 if (NewState != DISABLE)
\ TIM_Cmd:
\ 00000000 C9B2 UXTB R1,R1 ;; ZeroExtS R1,R1,#+24,#+24
\ 00000002 0029 CMP R1,#+0
\ 00000004 04D0 BEQ.N ??TIM_Cmd_0
435 {
436 /* Enable the TIM Counter */
437 TIMx->CR1 |= CR1_CEN_Set;
\ 00000006 0288 LDRH R2,[R0, #+0]
\ 00000008 52F00102 ORRS R2,R2,#0x1
\ 0000000C 0280 STRH R2,[R0, #+0]
\ 0000000E 03E0 B.N ??TIM_Cmd_1
438 }
439 else
440 {
441 /* Disable the TIM Counter */
442 TIMx->CR1 &= CR1_CEN_Reset;
\ ??TIM_Cmd_0:
\ 00000010 0288 LDRH R2,[R0, #+0]
\ 00000012 024B LDR.N R3,??TIM_Cmd_2 ;; 0x3fe
\ 00000014 1340 ANDS R3,R3,R2
\ 00000016 0380 STRH R3,[R0, #+0]
443 }
444 }
\ ??TIM_Cmd_1:
\ 00000018 7047 BX LR ;; return
\ 0000001A 00BF Nop
\ ??TIM_Cmd_2:
\ 0000001C FE030000 DC32 0x3fe
445
446 /*******************************************************************************
447 * Function Name : TIM_ITConfig
448 * Description : Enables or disables the TIMx interrupts.
449 * Input : - TIMx: where x can be 2, 3 or 4 to select the TIM peripheral.
450 * - TIM_IT: specifies the TIM interrupts sources to be enabled
451 * or disabled.
452 * This parameter can be any combination of the following values:
453 * - TIM_IT_Update: Timer update Interrupt
454 * - TIM_IT_CC1: Capture Compare 1 Interrupt
455 * - TIM_IT_CC2: Capture Compare 2 Interrupt
456 * - TIM_IT_CC3: Capture Compare 3 Interrupt
457 * - TIM_IT_CC4: Capture Compare 4 Interrupt
458 * - TIM_IT_Trigger: Trigger Interrupt
459 * - Newstate: new state of the specified TIMx interrupts.
460 * This parameter can be: ENABLE or DISABLE.
461 * Output : None
462 * Return : None
463 *******************************************************************************/
\ In section .XML, align 4, keep-with-next
464 void TIM_ITConfig(TIM_TypeDef* TIMx, u16 TIM_IT, FunctionalState NewState)
465 {
466 /* Check the parameters */
467 assert_param(IS_TIM_IT(TIM_IT));
468 assert_param(IS_FUNCTIONAL_STATE(NewState));
469
470 if (NewState != DISABLE)
\ TIM_ITConfig:
\ 00000000 D2B2 UXTB R2,R2 ;; ZeroExtS R2,R2,#+24,#+24
\ 00000002 002A CMP R2,#+0
\ 00000004 03D0 BEQ.N ??TIM_ITConfig_0
471 {
472 /* Enable the Interrupt sources */
473 TIMx->DIER |= TIM_IT;
\ 00000006 8389 LDRH R3,[R0, #+12]
\ 00000008 0B43 ORRS R3,R3,R1
\ 0000000A 8381 STRH R3,[R0, #+12]
\ 0000000C 02E0 B.N ??TIM_ITConfig_1
474 }
475 else
476 {
477 /* Disable the Interrupt sources */
478 TIMx->DIER &= (u16)(~TIM_IT);
\ ??TIM_ITConfig_0:
\ 0000000E 8389 LDRH R3,[R0, #+12]
\ 00000010 8B43 BICS R3,R3,R1
\ 00000012 8381 STRH R3,[R0, #+12]
479 }
480 }
\ ??TIM_ITConfig_1:
\ 00000014 7047 BX LR ;; return
481
482 /*******************************************************************************
483 * Function Name : TIM_DMAConfig
484 * Description : Configures the TIMx抯 DMA interface.
485 * Input : - TIMx: where x can be 2, 3 or 4 to select the TIM peripheral.
486 * - TIM_DMABase: DMA Base address.
487 * This parameter can be one of the following values:
488 * - TIM_DMABase_CR1, TIM_DMABase_CR2, TIM_DMABase_SMCR,
489 * TIM_DMABase_DIER, TIM_DMABase_SR, TIM_DMABase_EGR,
490 * TIM_DMABase_CCMR1, TIM_DMABase_CCMR2, TIM_DMABase_CCER,
491 * TIM_DMABase_CNT, TIM_DMABase_PSC, TIM_DMABase_ARR,
492 * TIM_DMABase_CCR1, TIM_DMABase_CCR2, TIM_DMABase_CCR3,
493 * TIM_DMABase_CCR4, TIM_DMABase_DCR.
494 * - TIM_DMABurstLength: DMA Burst length.
495 * This parameter can be one value between:
496 * TIM_DMABurstLength_1Byte and TIM_DMABurstLength_18Bytes.
497 * Output : None
498 * Return : None
499 *******************************************************************************/
\ In section .XML, align 4, keep-with-next
500 void TIM_DMAConfig(TIM_TypeDef* TIMx, u16 TIM_DMABase, u16 TIM_DMABurstLength)
501 {
\ TIM_DMAConfig:
\ 00000000 11B4 PUSH {R0,R4}
502 u32 tmpdcr = 0;
\ 00000002 0024 MOVS R4,#+0
\ 00000004 2300 MOVS R3,R4
503
504 /* Check the parameters */
505 assert_param(IS_TIM_DMA_BASE(TIM_DMABase));
506 assert_param(IS_TIM_DMA_LENGTH(TIM_DMABurstLength));
507
508 tmpdcr = TIMx->DCR;
\ 00000006 B0F84840 LDRH R4,[R0, #+72]
\ 0000000A 2300 MOVS R3,R4
509
510 /* Reset the DBA and the DBL Bits */
511 tmpdcr &= DCR_DMA_Mask;
\ 0000000C 0024 MOVS R4,#+0
\ 0000000E 2300 MOVS R3,R4
512
513 /* Set the DMA Base and the DMA Burst Length */
514 tmpdcr |= TIM_DMABase | TIM_DMABurstLength;
\ 00000010 1C00 MOVS R4,R3
\ 00000012 89B2 UXTH R1,R1 ;; ZeroExtS R1,R1,#+16,#+16
\ 00000014 92B2 UXTH R2,R2 ;; ZeroExtS R2,R2,#+16,#+16
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -