ADC_DMA_Transfer

所属分类:处理器开发
开发工具:C/C++
文件大小:7582KB
下载次数:9
上传日期:2019-12-23 14:57:32
上 传 者f11f
说明:  stm32h743 adc+dma传输方式实例
(stm32h743 adc+dma example)

文件列表:
ADC_DMA_Transfer\EWARM\Project.ewd (45356, 2019-06-27)
ADC_DMA_Transfer\EWARM\Project.ewp (29591, 2019-06-27)
ADC_DMA_Transfer\EWARM\Project.eww (161, 2019-06-27)
ADC_DMA_Transfer\EWARM\startup_stm32h743xx.s (39112, 2019-06-27)
ADC_DMA_Transfer\EWARM\stm32h743xx_flash.icf (1598, 2019-06-27)
ADC_DMA_Transfer\Inc\main.h (2336, 2019-06-27)
ADC_DMA_Transfer\Inc\stm32h7xx_hal_conf.h (14365, 2019-06-27)
ADC_DMA_Transfer\Inc\stm32h7xx_it.h (1863, 2019-06-27)
ADC_DMA_Transfer\MDK-ARM\DebugConfig\STM32H743ZI-Nucleo_STM32H743ZITx_1.1.0.dbgconf (4196, 2019-06-07)
ADC_DMA_Transfer\MDK-ARM\Project.uvguix.idea (93892, 2019-12-11)
ADC_DMA_Transfer\MDK-ARM\Project.uvoptx (14902, 2019-12-04)
ADC_DMA_Transfer\MDK-ARM\Project.uvprojx (18962, 2019-12-04)
ADC_DMA_Transfer\MDK-ARM\RTE\_STM32H743ZI-Nucleo\RTE_Components.h (357, 2019-12-04)
ADC_DMA_Transfer\MDK-ARM\startup_stm32h743xx.lst (111291, 2019-12-04)
ADC_DMA_Transfer\MDK-ARM\startup_stm32h743xx.s (44755, 2019-06-27)
ADC_DMA_Transfer\MDK-ARM\STM32H743ZI-Nucleo\main.crf (1374075, 2019-12-04)
ADC_DMA_Transfer\MDK-ARM\STM32H743ZI-Nucleo\main.d (2984, 2019-12-04)
ADC_DMA_Transfer\MDK-ARM\STM32H743ZI-Nucleo\main.o (1573080, 2019-12-04)
ADC_DMA_Transfer\MDK-ARM\STM32H743ZI-Nucleo\Project_STM32H743ZI-Nucleo.dep (51232, 2019-12-04)
ADC_DMA_Transfer\MDK-ARM\STM32H743ZI-Nucleo\startup_stm32h743xx.d (65, 2019-12-04)
ADC_DMA_Transfer\MDK-ARM\STM32H743ZI-Nucleo\startup_stm32h743xx.o (10596, 2019-12-04)
ADC_DMA_Transfer\MDK-ARM\STM32H743ZI-Nucleo\STM32H743ZI-Nucleo.axf (1562768, 2019-12-04)
ADC_DMA_Transfer\MDK-ARM\STM32H743ZI-Nucleo\STM32H743ZI-Nucleo.build_log.htm (2683, 2019-12-04)
ADC_DMA_Transfer\MDK-ARM\STM32H743ZI-Nucleo\STM32H743ZI-Nucleo.htm (82796, 2019-12-04)
ADC_DMA_Transfer\MDK-ARM\STM32H743ZI-Nucleo\STM32H743ZI-Nucleo.lnp (1005, 2019-12-04)
ADC_DMA_Transfer\MDK-ARM\STM32H743ZI-Nucleo\STM32H743ZI-Nucleo.map (119430, 2019-12-04)
ADC_DMA_Transfer\MDK-ARM\STM32H743ZI-Nucleo\STM32H743ZI-Nucleo.sct (494, 2019-12-04)
ADC_DMA_Transfer\MDK-ARM\STM32H743ZI-Nucleo\stm32h7xx_hal.crf (1373017, 2019-12-04)
ADC_DMA_Transfer\MDK-ARM\STM32H743ZI-Nucleo\stm32h7xx_hal.d (3172, 2019-12-04)
ADC_DMA_Transfer\MDK-ARM\STM32H743ZI-Nucleo\stm32h7xx_hal.o (1638272, 2019-12-04)
ADC_DMA_Transfer\MDK-ARM\STM32H743ZI-Nucleo\stm32h7xx_hal_adc.crf (1396986, 2019-12-04)
ADC_DMA_Transfer\MDK-ARM\STM32H743ZI-Nucleo\stm32h7xx_hal_adc.d (3300, 2019-12-04)
ADC_DMA_Transfer\MDK-ARM\STM32H743ZI-Nucleo\stm32h7xx_hal_adc.o (1633204, 2019-12-04)
ADC_DMA_Transfer\MDK-ARM\STM32H743ZI-Nucleo\stm32h7xx_hal_adc_ex.crf (1387071, 2019-12-04)
ADC_DMA_Transfer\MDK-ARM\STM32H743ZI-Nucleo\stm32h7xx_hal_adc_ex.d (3396, 2019-12-04)
ADC_DMA_Transfer\MDK-ARM\STM32H743ZI-Nucleo\stm32h7xx_hal_adc_ex.o (1633712, 2019-12-04)
ADC_DMA_Transfer\MDK-ARM\STM32H743ZI-Nucleo\stm32h7xx_hal_cortex.crf (1368753, 2019-12-04)
ADC_DMA_Transfer\MDK-ARM\STM32H743ZI-Nucleo\stm32h7xx_hal_cortex.d (3396, 2019-12-04)
ADC_DMA_Transfer\MDK-ARM\STM32H743ZI-Nucleo\stm32h7xx_hal_cortex.o (1590960, 2019-12-04)
ADC_DMA_Transfer\MDK-ARM\STM32H743ZI-Nucleo\stm32h7xx_hal_dma.crf (1411411, 2019-12-04)
... ...

/** @page ADC_DMA_Transfer ADC DMA Transfer example @verbatim ******************** (C) COPYRIGHT 2017 STMicroelectronics ******************* * @file ADC/ADC_DMA_Transfer/readme.txt * @author MCD Application Team * @brief Description of the ADC DMA Transfer example. ****************************************************************************** * @attention * *

© Copyright (c) 2017 STMicroelectronics. * All rights reserved.

* * This software component is licensed by ST under BSD 3-Clause license, * the "License"; You may not use this file except in compliance with the * License. You may obtain a copy of the License at: * opensource.org/licenses/BSD-3-Clause * ****************************************************************************** @endverbatim @par Example Description This example describes how to configure and use the ADC to convert an external analog input and get the result using a DMA transfer through the HAL API. At the beginning of the main program the HAL_Init() function is called to reset all the peripherals, initialize the Flash interface and the systick. The SystemClock_Config() function is used to configure the system clock for STM32H743xx Devices : The CPU at 400MHz The HCLK for D1 Domain AXI and AHB3 peripherals , D2 Domain AHB1/AHB2 peripherals and D3 Domain AHB4 peripherals at 200MHz. The APB clock dividers for D1 Domain APB3 peripherals, D2 Domain APB1 and APB2 peripherals and D3 Domain APB4 peripherals to run at 100MHz The ADC is configured to convert continuously ADC_CHANNEL_3, resolution is set to 16 bits right aligned, conversion is software-triggered. DMA1_Stream1 is configured in Circular mode to transfer continuously the content of ADC_DR (Data Register) to "aADCxConvertedData" variable which stores the conversion result. User may watch variable array "aADCxConvertedData" and check that its values are modified according to the voltage applied to pin PA.06 (connector CN12 pin 13). STM32 board LED can be used to monitor the conversion: - LED3 is ON when there is an error in initialization. @note Care must be taken when using HAL_Delay(), this function provides accurate delay (in milliseconds) based on variable incremented in SysTick ISR. This implies that if HAL_Delay() is called from a peripheral ISR process, then the SysTick interrupt must have higher priority (numerically lower) than the peripheral interrupt. Otherwise the caller ISR process will be blocked. To change the SysTick interrupt priority you have to use HAL_NVIC_SetPriority() function. @note The example need to ensure that the SysTick time base is always set to 1 millisecond to have correct HAL operation. @Note If the application is using the DTCM/ITCM memories (@0x20000000/ 0x0000000: not cacheable and only accessible by the Cortex M7 and the MDMA), no need for cache maintenance when the Cortex M7 and the MDMA access these RAMs. If the application needs to use DMA(or other masters) based access or requires more RAM, then the user has to: - Use a non TCM SRAM. (example : D1 AXI-SRAM @ 0x24000000) - Add a cache maintenance mechanism to ensure the cache coherence between CPU and other masters(DMAs,DMA2D,LTDC,MDMA). - The addresses and the size of cacheable buffers (shared between CPU and other masters) must be properlydefined to be aligned to L1-CACHE line size (32 bytes). @Note It is recommended to enable the cache and maintain its coherence. Depending on the use case it is also possible to configure the cache attributes using the MPU. Please refer to the AN4838 "Managing memory protection unit (MPU) in STM32 MCUs" Please refer to the AN4839 "Level 1 cache on STM32F7 Series" @par Directory contents - ADC/ADC_DMA_Transfer/Inc/stm32h7xx_hal_conf.h HAL configuration file - ADC/ADC_DMA_Transfer/Inc/stm32h7xx_it.h HAL interrupt handlers header file - ADC/ADC_DMA_Transfer/Inc/main.h Header for main.c module - ADC/ADC_DMA_Transfer/Src/stm32h7xx_it.c HAL interrupt handlers - ADC/ADC_DMA_Transfer/Src/main.c Main program - ADC/ADC_DMA_Transfer/Src/stm32h7xx_hal_msp.c HAL MSP file - ADC/ADC_DMA_Transfer/Src/system_stm32h7xx.c STM32H7xx system source file @par Hardware and Software environment - This example runs on STM32H743xx devices. - This example has been tested with NUCLEO-H743ZI board and can be easily tailored to any other supported device and development board. - NUCLEO-H743ZI Set-up Use an external power supply, adjust supply voltage and connect it to pin PA.06 (connector CN12 pin 13). - To monitor the conversion result, put the "aADCxConvertedData" variable in the debugger live watch. @par How to use it ? In order to make the program work, you must do the following : - Open your preferred toolchain - Rebuild all files and load your image into target memory - Run the example *

© COPYRIGHT STMicroelectronics

*/

近期下载者

相关文件


收藏者