📄 stm32f10x_usart.lst
字号:
409 {
410 usartxbase += 0x0C;
\ 00000030 0C36 ADDS R6,R6,#+12
\ 00000032 04E0 B.N ??USART_ITConfig_2
411 }
412 else if (usartreg == 0x02) /* The IT is in CR2 register */
\ ??USART_ITConfig_1:
\ 00000034 022B CMP R3,#+2
\ 00000036 01D1 BNE.N ??USART_ITConfig_3
413 {
414 usartxbase += 0x10;
\ 00000038 1036 ADDS R6,R6,#+16
\ 0000003A 00E0 B.N ??USART_ITConfig_2
415 }
416 else /* The IT is in CR3 register */
417 {
418 usartxbase += 0x14;
\ ??USART_ITConfig_3:
\ 0000003C 1436 ADDS R6,R6,#+20
419 }
420 if (NewState != DISABLE)
\ ??USART_ITConfig_2:
\ 0000003E D2B2 UXTB R2,R2 ;; ZeroExt R2,R2,#+24,#+24
\ 00000040 002A CMP R2,#+0
\ 00000042 03D0 BEQ.N ??USART_ITConfig_4
421 {
422 *(__IO uint32_t*)usartxbase |= itmask;
\ 00000044 3768 LDR R7,[R6, #+0]
\ 00000046 2F43 ORRS R7,R5,R7
\ 00000048 3760 STR R7,[R6, #+0]
\ 0000004A 02E0 B.N ??USART_ITConfig_5
423 }
424 else
425 {
426 *(__IO uint32_t*)usartxbase &= ~itmask;
\ ??USART_ITConfig_4:
\ 0000004C 3768 LDR R7,[R6, #+0]
\ 0000004E AF43 BICS R7,R7,R5
\ 00000050 3760 STR R7,[R6, #+0]
427 }
428 }
\ ??USART_ITConfig_5:
\ 00000052 F0BC POP {R4-R7}
\ 00000054 7047 BX LR ;; return
429
430 /**
431 * @brief Enables or disables the USART抯 DMA interface.
432 * @param USARTx: Select the USART or the UART peripheral.
433 * This parameter can be one of the following values:
434 * USART1, USART2, USART3, UART4 or UART5.
435 * @param USART_DMAReq: specifies the DMA request.
436 * This parameter can be any combination of the following values:
437 * @arg USART_DMAReq_Tx: USART DMA transmit request
438 * @arg USART_DMAReq_Rx: USART DMA receive request
439 * @param NewState: new state of the DMA Request sources.
440 * This parameter can be: ENABLE or DISABLE.
441 * @note The DMA mode is not available for UART5 except in the STM32
442 * High density value line devices(STM32F10X_HD_VL).
443 * @retval None
444 */
\ In section .text, align 2, keep-with-next
445 void USART_DMACmd(USART_TypeDef* USARTx, uint16_t USART_DMAReq, FunctionalState NewState)
446 {
447 /* Check the parameters */
448 assert_param(IS_USART_ALL_PERIPH(USARTx));
449 assert_param(IS_USART_DMAREQ(USART_DMAReq));
450 assert_param(IS_FUNCTIONAL_STATE(NewState));
451 if (NewState != DISABLE)
\ USART_DMACmd:
\ 00000000 D2B2 UXTB R2,R2 ;; ZeroExt R2,R2,#+24,#+24
\ 00000002 002A CMP R2,#+0
\ 00000004 03D0 BEQ.N ??USART_DMACmd_0
452 {
453 /* Enable the DMA transfer for selected requests by setting the DMAT and/or
454 DMAR bits in the USART CR3 register */
455 USARTx->CR3 |= USART_DMAReq;
\ 00000006 838A LDRH R3,[R0, #+20]
\ 00000008 0B43 ORRS R3,R1,R3
\ 0000000A 8382 STRH R3,[R0, #+20]
\ 0000000C 02E0 B.N ??USART_DMACmd_1
456 }
457 else
458 {
459 /* Disable the DMA transfer for selected requests by clearing the DMAT and/or
460 DMAR bits in the USART CR3 register */
461 USARTx->CR3 &= (uint16_t)~USART_DMAReq;
\ ??USART_DMACmd_0:
\ 0000000E 838A LDRH R3,[R0, #+20]
\ 00000010 8B43 BICS R3,R3,R1
\ 00000012 8382 STRH R3,[R0, #+20]
462 }
463 }
\ ??USART_DMACmd_1:
\ 00000014 7047 BX LR ;; return
464
465 /**
466 * @brief Sets the address of the USART node.
467 * @param USARTx: Select the USART or the UART peripheral.
468 * This parameter can be one of the following values:
469 * USART1, USART2, USART3, UART4 or UART5.
470 * @param USART_Address: Indicates the address of the USART node.
471 * @retval None
472 */
\ In section .text, align 2, keep-with-next
473 void USART_SetAddress(USART_TypeDef* USARTx, uint8_t USART_Address)
474 {
475 /* Check the parameters */
476 assert_param(IS_USART_ALL_PERIPH(USARTx));
477 assert_param(IS_USART_ADDRESS(USART_Address));
478
479 /* Clear the USART address */
480 USARTx->CR2 &= CR2_Address_Mask;
\ USART_SetAddress:
\ 00000000 028A LDRH R2,[R0, #+16]
\ 00000002 4FF6F073 MOVW R3,#+65520
\ 00000006 1A40 ANDS R2,R3,R2
\ 00000008 0282 STRH R2,[R0, #+16]
481 /* Set the USART address node */
482 USARTx->CR2 |= USART_Address;
\ 0000000A 028A LDRH R2,[R0, #+16]
\ 0000000C C9B2 UXTB R1,R1 ;; ZeroExt R1,R1,#+24,#+24
\ 0000000E 0A43 ORRS R2,R1,R2
\ 00000010 0282 STRH R2,[R0, #+16]
483 }
\ 00000012 7047 BX LR ;; return
484
485 /**
486 * @brief Selects the USART WakeUp method.
487 * @param USARTx: Select the USART or the UART peripheral.
488 * This parameter can be one of the following values:
489 * USART1, USART2, USART3, UART4 or UART5.
490 * @param USART_WakeUp: specifies the USART wakeup method.
491 * This parameter can be one of the following values:
492 * @arg USART_WakeUp_IdleLine: WakeUp by an idle line detection
493 * @arg USART_WakeUp_AddressMark: WakeUp by an address mark
494 * @retval None
495 */
\ In section .text, align 2, keep-with-next
496 void USART_WakeUpConfig(USART_TypeDef* USARTx, uint16_t USART_WakeUp)
497 {
498 /* Check the parameters */
499 assert_param(IS_USART_ALL_PERIPH(USARTx));
500 assert_param(IS_USART_WAKEUP(USART_WakeUp));
501
502 USARTx->CR1 &= CR1_WAKE_Mask;
\ USART_WakeUpConfig:
\ 00000000 8289 LDRH R2,[R0, #+12]
\ 00000002 4FF2FF73 MOVW R3,#+63487
\ 00000006 1A40 ANDS R2,R3,R2
\ 00000008 8281 STRH R2,[R0, #+12]
503 USARTx->CR1 |= USART_WakeUp;
\ 0000000A 8289 LDRH R2,[R0, #+12]
\ 0000000C 0A43 ORRS R2,R1,R2
\ 0000000E 8281 STRH R2,[R0, #+12]
504 }
\ 00000010 7047 BX LR ;; return
505
506 /**
507 * @brief Determines if the USART is in mute mode or not.
508 * @param USARTx: Select the USART or the UART peripheral.
509 * This parameter can be one of the following values:
510 * USART1, USART2, USART3, UART4 or UART5.
511 * @param NewState: new state of the USART mute mode.
512 * This parameter can be: ENABLE or DISABLE.
513 * @retval None
514 */
\ In section .text, align 2, keep-with-next
515 void USART_ReceiverWakeUpCmd(USART_TypeDef* USARTx, FunctionalState NewState)
516 {
517 /* Check the parameters */
518 assert_param(IS_USART_ALL_PERIPH(USARTx));
519 assert_param(IS_FUNCTIONAL_STATE(NewState));
520
521 if (NewState != DISABLE)
\ USART_ReceiverWakeUpCmd:
\ 00000000 C9B2 UXTB R1,R1 ;; ZeroExt R1,R1,#+24,#+24
\ 00000002 0029 CMP R1,#+0
\ 00000004 04D0 BEQ.N ??USART_ReceiverWakeUpCmd_0
522 {
523 /* Enable the USART mute mode by setting the RWU bit in the CR1 register */
524 USARTx->CR1 |= CR1_RWU_Set;
\ 00000006 8289 LDRH R2,[R0, #+12]
\ 00000008 52F00202 ORRS R2,R2,#0x2
\ 0000000C 8281 STRH R2,[R0, #+12]
\ 0000000E 04E0 B.N ??USART_ReceiverWakeUpCmd_1
525 }
526 else
527 {
528 /* Disable the USART mute mode by clearing the RWU bit in the CR1 register */
529 USARTx->CR1 &= CR1_RWU_Reset;
\ ??USART_ReceiverWakeUpCmd_0:
\ 00000010 8289 LDRH R2,[R0, #+12]
\ 00000012 4FF6FD73 MOVW R3,#+65533
\ 00000016 1A40 ANDS R2,R3,R2
\ 00000018 8281 STRH R2,[R0, #+12]
530 }
531 }
\ ??USART_ReceiverWakeUpCmd_1:
\ 0000001A 7047 BX LR ;; return
532
533 /**
534 * @brief Sets the USART LIN Break detection length.
535 * @param USARTx: Select the USART or the UART peripheral.
536 * This parameter can be one of the following values:
537 * USART1, USART2, USART3, UART4 or UART5.
538 * @param USART_LINBreakDetectLength: specifies the LIN break detection length.
539 * This parameter can be one of the following values:
540 * @arg USART_LINBreakDetectLength_10b: 10-bit break detection
541 * @arg USART_LINBreakDetectLength_11b: 11-bit break detection
542 * @retval None
543 */
\ In section .text, align 2, keep-with-next
544 void USART_LINBreakDetectLengthConfig(USART_TypeDef* USARTx, uint16_t USART_LINBreakDetectLength)
545 {
546 /* Check the parameters */
547 assert_param(IS_USART_ALL_PERIPH(USARTx));
548 assert_param(IS_USART_LIN_BREAK_DETECT_LENGTH(USART_LINBreakDetectLength));
549
550 USARTx->CR2 &= CR2_LBDL_Mask;
\ USART_LINBreakDetectLengthConfig:
\ 00000000 028A LDRH R2,[R0, #+16]
\ 00000002 4FF6DF73 MOVW R3,#+65503
\ 00000006 1A40 ANDS R2,R3,R2
\ 00000008 0282 STRH R2,[R0, #+16]
551 USARTx->CR2 |= USART_LINBreakDetectLength;
\ 0000000A 028A LDRH R2,[R0, #+16]
\ 0000000C 0A43 ORRS R2,R1,R2
\ 0000000E 0282 STRH R2,[R0, #+16]
552 }
\ 00000010 7047 BX LR ;; return
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -