DAC
所属分类:单片机开发
开发工具:WINDOWS
文件大小:7205KB
下载次数:4
上传日期:2017-08-25 11:42:00
上 传 者:
啦哈拉卅
说明: 基于STM32L452RET6的DAC例程函数
(DAC routine function based on STM32L452RET6)
文件列表:
DAC (0, 2017-07-03)
DAC\DAC_SignalsGeneration (0, 2017-07-03)
DAC\DAC_SignalsGeneration\EWARM (0, 2017-07-03)
DAC\DAC_SignalsGeneration\EWARM\Project.ewd (43407, 2017-04-21)
DAC\DAC_SignalsGeneration\EWARM\Project.ewp (29516, 2017-04-21)
DAC\DAC_SignalsGeneration\EWARM\Project.eww (161, 2017-04-21)
DAC\DAC_SignalsGeneration\EWARM\startup_stm32l452xx.s (21181, 2017-04-21)
DAC\DAC_SignalsGeneration\EWARM\stm32l452xx_flash.icf (1646, 2017-04-21)
DAC\DAC_SignalsGeneration\Inc (0, 2017-07-03)
DAC\DAC_SignalsGeneration\Inc\main.h (3831, 2017-04-21)
DAC\DAC_SignalsGeneration\Inc\stm32l4xx_hal_conf.h (13412, 2017-04-21)
DAC\DAC_SignalsGeneration\Inc\stm32l4xx_it.h (3206, 2017-04-21)
DAC\DAC_SignalsGeneration\MDK-ARM (0, 2017-07-28)
DAC\DAC_SignalsGeneration\MDK-ARM\Project.uvguix.min (167091, 2017-07-28)
DAC\DAC_SignalsGeneration\MDK-ARM\Project.uvoptx (17016, 2017-07-28)
DAC\DAC_SignalsGeneration\MDK-ARM\Project.uvprojx (19073, 2017-07-28)
DAC\DAC_SignalsGeneration\MDK-ARM\RTE (0, 2017-07-26)
DAC\DAC_SignalsGeneration\MDK-ARM\RTE\RTE_Components.h (357, 2017-07-26)
DAC\DAC_SignalsGeneration\MDK-ARM\STM32L452RE_NUCLEO (0, 2017-07-28)
DAC\DAC_SignalsGeneration\MDK-ARM\STM32L452RE_NUCLEO\ExtDll.iex (19, 2017-07-28)
DAC\DAC_SignalsGeneration\MDK-ARM\STM32L452RE_NUCLEO\Project_STM32L452RE_NUCLEO.dep (58684, 2017-07-28)
DAC\DAC_SignalsGeneration\MDK-ARM\STM32L452RE_NUCLEO\STM32L452RE_NUCLEO.axf (814972, 2017-07-28)
DAC\DAC_SignalsGeneration\MDK-ARM\STM32L452RE_NUCLEO\STM32L452RE_NUCLEO.build_log.htm (2062, 2017-07-28)
DAC\DAC_SignalsGeneration\MDK-ARM\STM32L452RE_NUCLEO\STM32L452RE_NUCLEO.htm (56480, 2017-07-28)
DAC\DAC_SignalsGeneration\MDK-ARM\STM32L452RE_NUCLEO\STM32L452RE_NUCLEO.lnp (1098, 2017-07-28)
DAC\DAC_SignalsGeneration\MDK-ARM\STM32L452RE_NUCLEO\STM32L452RE_NUCLEO.map (116472, 2017-07-28)
DAC\DAC_SignalsGeneration\MDK-ARM\STM32L452RE_NUCLEO\STM32L452RE_NUCLEO.sct (479, 2017-07-26)
DAC\DAC_SignalsGeneration\MDK-ARM\STM32L452RE_NUCLEO\main.crf (828679, 2017-07-28)
DAC\DAC_SignalsGeneration\MDK-ARM\STM32L452RE_NUCLEO\main.d (3090, 2017-07-28)
DAC\DAC_SignalsGeneration\MDK-ARM\STM32L452RE_NUCLEO\main.o (938008, 2017-07-28)
DAC\DAC_SignalsGeneration\MDK-ARM\STM32L452RE_NUCLEO\startup_stm32l452xx.d (65, 2017-07-26)
DAC\DAC_SignalsGeneration\MDK-ARM\STM32L452RE_NUCLEO\startup_stm32l452xx.o (7336, 2017-07-26)
DAC\DAC_SignalsGeneration\MDK-ARM\STM32L452RE_NUCLEO\stm32l4xx_hal.crf (825774, 2017-07-26)
DAC\DAC_SignalsGeneration\MDK-ARM\STM32L452RE_NUCLEO\stm32l4xx_hal.d (3286, 2017-07-26)
DAC\DAC_SignalsGeneration\MDK-ARM\STM32L452RE_NUCLEO\stm32l4xx_hal.o (973692, 2017-07-26)
DAC\DAC_SignalsGeneration\MDK-ARM\STM32L452RE_NUCLEO\stm32l4xx_hal_cortex.crf (824134, 2017-07-26)
DAC\DAC_SignalsGeneration\MDK-ARM\STM32L452RE_NUCLEO\stm32l4xx_hal_cortex.d (3510, 2017-07-26)
DAC\DAC_SignalsGeneration\MDK-ARM\STM32L452RE_NUCLEO\stm32l4xx_hal_cortex.o (952824, 2017-07-26)
DAC\DAC_SignalsGeneration\MDK-ARM\STM32L452RE_NUCLEO\stm32l4xx_hal_dac.crf (827237, 2017-07-26)
DAC\DAC_SignalsGeneration\MDK-ARM\STM32L452RE_NUCLEO\stm32l4xx_hal_dac.d (3414, 2017-07-26)
... ...
/**
@page DAC_SimpleConversion DAC Simple Conversion example
@verbatim
******************** (C) COPYRIGHT 2016 STMicroelectronics *******************
* @file DAC/DAC_SimpleConversion/readme.txt
* @author MCD Application Team
* @version V1.8.0
* @date 21-April-2017
* @brief Description of the DAC Simple Conversion example.
******************************************************************************
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of STMicroelectronics nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************
@endverbatim
@par Example Description
This example provides a short description of how to use the DAC peripheral to
do a simple conversion.
- The example uses the DAC for a simple conversion in 8 bits right
alignment of 0xFF value, the result of conversion can be seen by
connecting PA4(DAC channel1) to an oscilloscope.
The observed value is 3.3V.
- The low power mode of DAC (sample and hold mode) can also be used while Cortex
is in sleep mode.
- The tests steps are:
- Step 0:
DAC: normal power mode
Cortex: run mode
- Step 1:
DAC: Low power mode
Cortex: Sleep mode
- The switch from step 0 to step 1 is done by pressing the user button.
- The Cortex wake up from Sleep mode once the user button is pressed again
STM32L452RE-Nucleo Rev C board's LED can be used to monitor the process status:
- LED2 is slowly blinking (1 sec. period) and example is stopped (using infinite loop)
when there is an error during process.
@par Directory contents
- DAC/DAC_Simple_Conversion/Inc/stm32l4xx_hal_conf.h HAL configuration file
- DAC/DAC_Simple_Conversion/Inc/stm32l4xx_it.h DMA interrupt handlers header file
- DAC/DAC_Simple_Conversion/Inc/main.h Header for main.c module
- DAC/DAC_Simple_Conversion/Src/stm32l4xx_it.c DMA interrupt handlers
- DAC/DAC_Simple_Conversion/Src/main.c Main program
- DAC/DAC_Simple_Conversion/Src/stm32l4xx_hal_msp.c HAL MSP file
- DAC/DAC_Simple_Conversion/Src/system_stm32l4xx.c STM32L4xx system source file
@par Hardware and Software environment
- This example runs on STM32L452xx devices.
- This example has been tested with STM32L452RE-Nucleo Rev C board and can be
easily tailored to any other supported device and development board.
- STM32L452RE-Nucleo Rev C Set-up
- Connect PA4 (DAC Channel1) (pin 32 in CN7) to an oscilloscope.
- You may redo the tests by changing the sample and hold parameters
of the DAC.
@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
*/
近期下载者:
相关文件:
收藏者: