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

📄 stm32f10x_dma.lst

📁 完成数据的采集
💻 LST
📖 第 1 页 / 共 4 页
字号:
    101              case DMA_Channel7_BASE:
    102                /* Reset interrupt pending bits for Channel7 */
    103                DMA->IFCR |= DMA_Channel7_IT_Mask;
   \                     ??DMA_DeInit_7:
   \   00000092   ....               LDR.N    R0,??DataTable17  ;; 0x40020004
   \   00000094   0068               LDR      R0,[R0, #+0]
   \   00000096   50F07060           ORRS     R0,R0,#0xF000000
   \   0000009A   ....               LDR.N    R1,??DataTable17  ;; 0x40020004
   \   0000009C   0860               STR      R0,[R1, #+0]
    104                break;
    105          
    106              default:
    107                break;
    108            }
    109          }
   \                     ??DMA_DeInit_8:
   \   0000009E   10BD               POP      {R4,PC}          ;; return
   \                     ??DMA_DeInit_0:
   \   000000A0   08000240           DC32     0x40020008
    110          
    111          /*******************************************************************************
    112          * Function Name  : DMA_Init
    113          * Description    : Initializes the DMA Channelx according to the specified
    114          *                  parameters in the DMA_InitStruct.
    115          * Input          : - DMA_Channelx: where x can be 1, 2 to 7 to select the DMA
    116          *                    Channel.
    117          *                  - DMA_InitStruct: pointer to a DMA_InitTypeDef structure that
    118          *                    contains the configuration information for the specified
    119          *                    DMA Channel.
    120          * Output         : None
    121          * Return         : None
    122          ******************************************************************************/

   \                                 In section .XML, align 4, keep-with-next
    123          void DMA_Init(DMA_Channel_TypeDef* DMA_Channelx, DMA_InitTypeDef* DMA_InitStruct)
    124          {
   \                     DMA_Init:
   \   00000000   30B4               PUSH     {R4,R5}
    125            u32 tmpreg = 0;
   \   00000002   0022               MOVS     R2,#+0
   \   00000004   1300               MOVS     R3,R2
    126          
    127            /* Check the parameters */
    128            assert_param(IS_DMA_DIR(DMA_InitStruct->DMA_DIR));
    129            assert_param(IS_DMA_BUFFER_SIZE(DMA_InitStruct->DMA_BufferSize));	   
    130            assert_param(IS_DMA_PERIPHERAL_INC_STATE(DMA_InitStruct->DMA_PeripheralInc));  
    131            assert_param(IS_DMA_MEMORY_INC_STATE(DMA_InitStruct->DMA_MemoryInc));   
    132            assert_param(IS_DMA_PERIPHERAL_DATA_SIZE(DMA_InitStruct->DMA_PeripheralDataSize));
    133            assert_param(IS_DMA_MEMORY_DATA_SIZE(DMA_InitStruct->DMA_MemoryDataSize));
    134            assert_param(IS_DMA_MODE(DMA_InitStruct->DMA_Mode));
    135            assert_param(IS_DMA_PRIORITY(DMA_InitStruct->DMA_Priority));
    136            assert_param(IS_DMA_M2M_STATE(DMA_InitStruct->DMA_M2M));
    137          
    138          /*--------------------------- DMA Channelx CCR Configuration -----------------*/
    139            /* Get the DMA_Channelx CCR value */
    140            tmpreg = DMA_Channelx->CCR;
   \   00000006   0268               LDR      R2,[R0, #+0]
   \   00000008   1300               MOVS     R3,R2
    141            /* Clear MEM2MEM, PL, MSIZE, PSIZE, MINC, PINC, CIRCULAR and DIR bits */
    142            tmpreg &= CCR_CLEAR_Mask;
   \   0000000A   1A00               MOVS     R2,R3
   \   0000000C   0D4B               LDR.N    R3,??DMA_Init_0  ;; 0xffff800f
   \   0000000E   1340               ANDS     R3,R3,R2
    143            /* Configure DMA Channelx: data transfer, data size, priority level and mode */
    144            /* Set DIR bit according to DMA_DIR value */
    145            /* Set CIRCULAR bit according to DMA_Mode value */
    146            /* Set PINC bit according to DMA_PeripheralInc value */
    147            /* Set MINC bit according to DMA_MemoryInc value */
    148            /* Set PSIZE bits according to DMA_PeripheralDataSize value */
    149            /* Set MSIZE bits according to DMA_MemoryDataSize value */
    150            /* Set PL bits according to DMA_Priority value */
    151            /* Set the MEM2MEM bit according to DMA_M2M value */
    152            tmpreg |= DMA_InitStruct->DMA_DIR | DMA_InitStruct->DMA_Mode |
    153                      DMA_InitStruct->DMA_PeripheralInc | DMA_InitStruct->DMA_MemoryInc |
    154                      DMA_InitStruct->DMA_PeripheralDataSize | DMA_InitStruct->DMA_MemoryDataSize |
    155                      DMA_InitStruct->DMA_Priority | DMA_InitStruct->DMA_M2M;
   \   00000010   1A00               MOVS     R2,R3
   \   00000012   8B68               LDR      R3,[R1, #+8]
   \   00000014   0C6A               LDR      R4,[R1, #+32]
   \   00000016   1C43               ORRS     R4,R4,R3
   \   00000018   0B69               LDR      R3,[R1, #+16]
   \   0000001A   2343               ORRS     R3,R3,R4
   \   0000001C   4C69               LDR      R4,[R1, #+20]
   \   0000001E   1C43               ORRS     R4,R4,R3
   \   00000020   8B69               LDR      R3,[R1, #+24]
   \   00000022   2343               ORRS     R3,R3,R4
   \   00000024   CC69               LDR      R4,[R1, #+28]
   \   00000026   1C43               ORRS     R4,R4,R3
   \   00000028   4D6A               LDR      R5,[R1, #+36]
   \   0000002A   2543               ORRS     R5,R5,R4
   \   0000002C   8B6A               LDR      R3,[R1, #+40]
   \   0000002E   2B43               ORRS     R3,R3,R5
   \   00000030   1343               ORRS     R3,R3,R2
    156            /* Write to DMA Channelx CCR */
    157            DMA_Channelx->CCR = tmpreg;
   \   00000032   0360               STR      R3,[R0, #+0]
    158          
    159          /*--------------------------- DMA Channelx CNBTR Configuration ---------------*/
    160            /* Write to DMA Channelx CNBTR */
    161            DMA_Channelx->CNDTR = DMA_InitStruct->DMA_BufferSize;
   \   00000034   CA68               LDR      R2,[R1, #+12]
   \   00000036   4260               STR      R2,[R0, #+4]
    162          
    163          /*--------------------------- DMA Channelx CPAR Configuration ----------------*/
    164            /* Write to DMA Channelx CPAR */
    165            DMA_Channelx->CPAR = DMA_InitStruct->DMA_PeripheralBaseAddr;
   \   00000038   0A68               LDR      R2,[R1, #+0]
   \   0000003A   8260               STR      R2,[R0, #+8]
    166          
    167          /*--------------------------- DMA Channelx CMAR Configuration ----------------*/
    168            /* Write to DMA Channelx CMAR */
    169            DMA_Channelx->CMAR = DMA_InitStruct->DMA_MemoryBaseAddr;
   \   0000003C   4A68               LDR      R2,[R1, #+4]
   \   0000003E   C260               STR      R2,[R0, #+12]
    170          }
   \   00000040   30BC               POP      {R4,R5}
   \   00000042   7047               BX       LR               ;; return
   \                     ??DMA_Init_0:
   \   00000044   0F80FFFF           DC32     0xffff800f
    171          
    172          /*******************************************************************************
    173          * Function Name  : DMA_StructInit
    174          * Description    : Fills each DMA_InitStruct member with its default value.
    175          * Input          : - DMA_InitStruct : pointer to a DMA_InitTypeDef structure
    176          *                    which will be initialized.
    177          * Output         : None
    178          * Return         : None
    179          *******************************************************************************/

   \                                 In section .XML, align 4, keep-with-next
    180          void DMA_StructInit(DMA_InitTypeDef* DMA_InitStruct)
    181          {
    182          /*-------------- Reset DMA init structure parameters values ------------------*/
    183            /* Initialize the DMA_PeripheralBaseAddr member */
    184            DMA_InitStruct->DMA_PeripheralBaseAddr = 0;
   \                     DMA_StructInit:
   \   00000000   0021               MOVS     R1,#+0
   \   00000002   0160               STR      R1,[R0, #+0]
    185          
    186            /* Initialize the DMA_MemoryBaseAddr member */
    187            DMA_InitStruct->DMA_MemoryBaseAddr = 0;
   \   00000004   0021               MOVS     R1,#+0
   \   00000006   4160               STR      R1,[R0, #+4]
    188          
    189            /* Initialize the DMA_DIR member */
    190            DMA_InitStruct->DMA_DIR = DMA_DIR_PeripheralSRC;
   \   00000008   0021               MOVS     R1,#+0
   \   0000000A   8160               STR      R1,[R0, #+8]
    191          
    192            /* Initialize the DMA_BufferSize member */
    193            DMA_InitStruct->DMA_BufferSize = 0;
   \   0000000C   0021               MOVS     R1,#+0
   \   0000000E   C160               STR      R1,[R0, #+12]
    194          
    195            /* Initialize the DMA_PeripheralInc member */
    196            DMA_InitStruct->DMA_PeripheralInc = DMA_PeripheralInc_Disable;
   \   00000010   0021               MOVS     R1,#+0
   \   00000012   0161               STR      R1,[R0, #+16]
    197          
    198            /* Initialize the DMA_MemoryInc member */
    199            DMA_InitStruct->DMA_MemoryInc = DMA_MemoryInc_Disable;
   \   00000014   0021               MOVS     R1,#+0
   \   00000016   4161               STR      R1,[R0, #+20]
    200          
    201            /* Initialize the DMA_PeripheralDataSize member */
    202            DMA_InitStruct->DMA_PeripheralDataSize = DMA_PeripheralDataSize_Byte;
   \   00000018   0021               MOVS     R1,#+0
   \   0000001A   8161               STR      R1,[R0, #+24]
    203          
    204            /* Initialize the DMA_MemoryDataSize member */
    205            DMA_InitStruct->DMA_MemoryDataSize = DMA_MemoryDataSize_Byte;
   \   0000001C   0021               MOVS     R1,#+0
   \   0000001E   C161               STR      R1,[R0, #+28]
    206          
    207            /* Initialize the DMA_Mode member */
    208            DMA_InitStruct->DMA_Mode = DMA_Mode_Normal;
   \   00000020   0021               MOVS     R1,#+0
   \   00000022   0162               STR      R1,[R0, #+32]
    209          
    210            /* Initialize the DMA_Priority member */
    211            DMA_InitStruct->DMA_Priority = DMA_Priority_Low;
   \   00000024   0021               MOVS     R1,#+0
   \   00000026   4162               STR      R1,[R0, #+36]
    212          
    213            /* Initialize the DMA_M2M member */
    214            DMA_InitStruct->DMA_M2M = DMA_M2M_Disable;
   \   00000028   0021               MOVS     R1,#+0
   \   0000002A   8162               STR      R1,[R0, #+40]
    215          }
   \   0000002C   7047               BX       LR               ;; return
    216          
    217          /*******************************************************************************
    218          * Function Name  : DMA_Cmd
    219          * Description    : Enables or disables the specified DMA Channelx.
    220          * Input          : - DMA_Channelx: where x can be 1, 2 to 7 to select the DMA
    221          *                    Channel.
    222          *                  - NewState: new state of the DMA Channelx. 
    223          *                    This parameter can be: ENABLE or DISABLE.
    224          * Output         : None
    225          * Return         : None
    226          *******************************************************************************/

   \                                 In section .XML, align 4, keep-with-next

⌨️ 快捷键说明

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