﻿/*!
 * @file        readme.txt
 *
 * @brief       This file is routine instruction
 *
 * @version     V1.0.0
 *
 * @date        2023-03-25
 *
 * @attention
 *
 *  Copyright (C) 2023 Geehy Semiconductor
 *
 *  You may not use this file except in compliance with the
 *  GEEHY COPYRIGHT NOTICE (GEEHY SOFTWARE PACKAGE LICENSE).
 *
 *  The program is only for reference, which is distributed in the hope
 *  that it will be useful and instructional for customers to develop
 *  their software. Unless required by applicable law or agreed to in
 *  writing, the program is distributed on an "AS IS" BASIS, WITHOUT
 *  ANY WARRANTY OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the GEEHY SOFTWARE PACKAGE LICENSE for the governing permissions
 *  and limitations under the License.
 */

&par Example Description

This example describes how to use one DAC channel mode with DMA to generate an
escalator signal on DAC channel1 output.

DAC channel1 conversion is configured to be triggered by TIM6 TRGO triggers and
without noise/triangle wave generation. 8bit right data alignment is selected
since we choose to access DAC_DHR8R1 register.
DMA2 channel3 is configured to transfer continuously, byte by byte, a 6-byte
buffer to the DAC1 register DAC_DHR8R1.

The transferred 6bytes buffer is made to have an escalator signal on DAC channel1
output. DAC channel1 is then enabled. Once TIM6 is enabled, each TIM6 TRGO update
event generate a DMA request which transfer data  to the DAC1 register and DAC
conversion is started. The escalator signal can be visualized by connecting PA.04
pin to an oscilloscope.

&par Hardware Description

using USART1(TX:PA9, RX:PA10).
  - USART2 configured as follow:
  - BaudRate    =  115200
  - Word Length =  USART_WordLength_8b
  - Stop Bit    =  USART_StopBits_1
  - Parity      =  USART_Parity_No
  - Hardware flow control disabled (RTS and CTS signals)
  - Receive and transmit enabled

&par Directory contents

  - DAC/DAC_OneChannelDMA_Escalator/src/apm32a10x_int.c            Interrupt handlers
  - DAC/DAC_OneChannelDMA_Escalator/src/main.c                     Main program

&par IDE environment

  - MDK-ARM V5.36
  - EWARM V8.50.5.26295
  - ECLIPSE V4.27

&par Hardware and Software environment

  - This example runs on APM32A103_MINI Devices.
