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