DAC_SignalsGeneration_Sine

所属分类:嵌入式/单片机/硬件编程
开发工具:C/C++
文件大小:9613KB
下载次数:6
上传日期:2017-11-20 14:45:17
上 传 者Bojan
说明:  Generate sine signal using STM32L4

文件列表:
DAC_SignalsGeneration_Sine (0, 2017-10-19)
DAC_SignalsGeneration_Sine\EWARM (0, 2017-10-19)
DAC_SignalsGeneration_Sine\EWARM\Project.ewd (41446, 2017-04-21)
DAC_SignalsGeneration_Sine\EWARM\Project.ewp (29964, 2017-04-21)
DAC_SignalsGeneration_Sine\EWARM\Project.eww (161, 2017-04-21)
DAC_SignalsGeneration_Sine\EWARM\startup_stm32l432xx.s (19830, 2017-04-21)
DAC_SignalsGeneration_Sine\EWARM\stm32l432xx_flash.icf (1646, 2017-04-21)
DAC_SignalsGeneration_Sine\Inc (0, 2017-10-19)
DAC_SignalsGeneration_Sine\Inc\main.h (6240, 2017-08-07)
DAC_SignalsGeneration_Sine\Inc\stm32l4xx_hal_conf.h (13212, 2017-08-07)
DAC_SignalsGeneration_Sine\Inc\stm32l4xx_it.h (3197, 2017-08-07)
DAC_SignalsGeneration_Sine\MDK-ARM (0, 2017-10-19)
DAC_SignalsGeneration_Sine\MDK-ARM\Project.uvguix.QIMTronics-1 (89460, 2017-10-10)
DAC_SignalsGeneration_Sine\MDK-ARM\Project.uvguix.Totos (89134, 2017-08-07)
DAC_SignalsGeneration_Sine\MDK-ARM\Project.uvoptx (16482, 2017-08-07)
DAC_SignalsGeneration_Sine\MDK-ARM\Project.uvprojx (20250, 2017-08-07)
DAC_SignalsGeneration_Sine\MDK-ARM\RTE (0, 2017-10-19)
DAC_SignalsGeneration_Sine\MDK-ARM\RTE\_STM32L432KC_NUCLEO (0, 2017-10-19)
DAC_SignalsGeneration_Sine\MDK-ARM\RTE\_STM32L432KC_NUCLEO\RTE_Components.h (357, 2017-08-07)
DAC_SignalsGeneration_Sine\MDK-ARM\startup_stm32l432xx.lst (52638, 2017-08-07)
DAC_SignalsGeneration_Sine\MDK-ARM\startup_stm32l432xx.s (18170, 2017-04-21)
DAC_SignalsGeneration_Sine\MDK-ARM\STM32L432KC_NUCLEO (0, 2017-10-19)
DAC_SignalsGeneration_Sine\MDK-ARM\STM32L432KC_NUCLEO\main.crf (839530, 2017-10-03)
DAC_SignalsGeneration_Sine\MDK-ARM\STM32L432KC_NUCLEO\main.d (3490, 2017-10-03)
DAC_SignalsGeneration_Sine\MDK-ARM\STM32L432KC_NUCLEO\main.o (956340, 2017-10-03)
DAC_SignalsGeneration_Sine\MDK-ARM\STM32L432KC_NUCLEO\Project_STM32L432KC_NUCLEO.dep (78640, 2017-10-03)
DAC_SignalsGeneration_Sine\MDK-ARM\STM32L432KC_NUCLEO\startup_stm32l432xx.d (65, 2017-08-07)
DAC_SignalsGeneration_Sine\MDK-ARM\STM32L432KC_NUCLEO\startup_stm32l432xx.o (6920, 2017-08-07)
DAC_SignalsGeneration_Sine\MDK-ARM\STM32L432KC_NUCLEO\STM32L432KC_NUCLEO.axf (1504072, 2017-10-03)
DAC_SignalsGeneration_Sine\MDK-ARM\STM32L432KC_NUCLEO\STM32L432KC_NUCLEO.build_log.htm (2173, 2017-10-03)
DAC_SignalsGeneration_Sine\MDK-ARM\STM32L432KC_NUCLEO\STM32L432KC_NUCLEO.htm (66186, 2017-10-03)
DAC_SignalsGeneration_Sine\MDK-ARM\STM32L432KC_NUCLEO\STM32L432KC_NUCLEO.lnp (1362, 2017-10-03)
DAC_SignalsGeneration_Sine\MDK-ARM\STM32L432KC_NUCLEO\STM32L432KC_NUCLEO.map (187386, 2017-10-03)
DAC_SignalsGeneration_Sine\MDK-ARM\STM32L432KC_NUCLEO\STM32L432KC_NUCLEO.sct (479, 2017-08-04)
DAC_SignalsGeneration_Sine\MDK-ARM\STM32L432KC_NUCLEO\stm32l4xx_hal.crf (834154, 2017-08-07)
DAC_SignalsGeneration_Sine\MDK-ARM\STM32L432KC_NUCLEO\stm32l4xx_hal.d (3661, 2017-08-07)
DAC_SignalsGeneration_Sine\MDK-ARM\STM32L432KC_NUCLEO\stm32l4xx_hal.o (977952, 2017-08-07)
DAC_SignalsGeneration_Sine\MDK-ARM\STM32L432KC_NUCLEO\stm32l4xx_hal_adc.crf (857496, 2017-08-07)
DAC_SignalsGeneration_Sine\MDK-ARM\STM32L432KC_NUCLEO\stm32l4xx_hal_adc.d (3813, 2017-08-07)
DAC_SignalsGeneration_Sine\MDK-ARM\STM32L432KC_NUCLEO\stm32l4xx_hal_adc.o (992260, 2017-08-07)
... ...

/** @page DAC_SignalsGeneration DAC Signals generation example @verbatim ********************* COPYRIGHT(c) 2017 STMicroelectronics ******************* * @file DAC/DAC_SignalsGeneration/readme.txt * @author MCD Application Team * @version V1.8.0 * @date 21-April-2017 * @brief Description of the DAC Signals generation 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 description of how to use the DAC peripheral to generate several signals using DMA controller. For each transition using PA.12 (Arduino D2) and jumper, A signal has been selected and can be monitored on the DAC channel one: - Triangle waveform (Channel 1), amplitute: ~1V, frequency: order of tens Hz. - Escalator waveform (Channel 1) using DMA transfer, amplitute: ~3V, frequency: order of KHz. STM32L432KC-Nucleo RevC board's LED can be used to monitor the process status: - LED3 is slowly blinking (1 sec. period) and example is stopped (using infinite loop) when there is an error during process. @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 application need to ensure that the SysTick time base is always set to 1 millisecond to have correct HAL operation. @par Directory contents - DAC/DAC_SignalsGeneration/Inc/stm32l4xx_hal_conf.h HAL configuration file - DAC/DAC_SignalsGeneration/Inc/stm32l4xx_it.h DAC interrupt handlers header file - DAC/DAC_SignalsGeneration/Inc/main.h Header for main.c module - DAC/DAC_SignalsGeneration/Src/stm32l4xx_it.c DAC interrupt handlers - DAC/DAC_SignalsGeneration/Src/main.c Main program - DAC/DAC_SignalsGeneration/Src/stm32l4xx_hal_msp.c HAL MSP file - DAC/DAC_SignalsGeneration/Src/system_stm32l4xx.c STM32L4xx system source file @par Hardware and Software environment - This example runs on STM32L432xx devices. - This example has been tested with STM32L432KC-Nucleo RevC board and can be easily tailored to any other supported device and development board. - STM32L432KC-Nucleo RevC Set-up : - Connect PA4 (DAC Channel1) (pin 9 - A3 in CN4) to an oscilloscope. - Use a jumper between PA.12 (Arduino D2) and GND to changing from one waveform to another. @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

*/

近期下载者

相关文件


收藏者