/**
  @page OPAMP_PGA OPAMP example
  
  @verbatim
  ******************** (C) COPYRIGHT 2016 STMicroelectronics *******************
  * @file    Examples_LL/OPAMP/OPAMP_PGA/readme.txt
  * @author  MCD Application Team
  * @brief   Description of the OPAMP_PGA example.
  ******************************************************************************
  * @attention
  *
  * <h2><center>&copy; Copyright (c) 2016 STMicroelectronics.
  * All rights reserved.</center></h2>
  *
  * 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

How to use the OPAMP peripheral in PGA mode (programmable gain amplifier). To test 
OPAMP, a voltage waveform is generated by the DAC and feeds the OPAMP input. This 
example is based on the STM32F3xx OPAMP LL API. The peripheral
is initialized with LL unitary service functions to optimize for 
performance and size.

Example configuration:
Operational amplifier instance OPAMP2 is configured in PGA mode.
OPAMP non-inverting input and output are set to be connected to GPIO pins.
OPAMP inverting input is not connected externally (internal connection in PGA mode).

Other peripherals configured in this example:
One DAC channel, one DMA channel and one timer are configured to generate a voltage
waveform to test the OPAMP:
sinus waveform, frequency 1kHz, amplitude Vdda/10 (amplitude is chosen to have 
OPAMP output not saturated with OPAMP PGA gains 2, 4, 8 and saturated
with OPAMP PGA gain 16).

Example execution:
From the main program execution, LED is toggling quickly while waiting for
user button press.
Then, the OPAMP is enabled and the waveform to test OPAMP is generated.
At each press on push button, the OPAMP PGA gain is modified: 2, 4, 8, 16
and LED is toggled.
After the last gain, OPAMP PGA gain is set to 2 and LED is turned-on.

Connection needed:
To check OPAMP functionality, you can:
 - Either use the waveform generated in this example by DAC1 channel1:
   connect DAC channel output to OPAMP non-inverting input (see pins below, with list of GPIO used).
   This waveform generation can be disabled by commenting literal definition "WAVEFORM_VOLTAGE_GENERATION".
 - Either connect a voltage to OPAMP non-inverting input (see pins below, with list of GPIO used)
   between ground (0V) and Vdda (3.3V).
 - Either use an external power supply
Voltage amplified by the OPAMP can be observed on OPAMP output (see pins below, with list of GPIO used).

Other peripheral used:
  1 GPIO for push button
  1 GPIO for DAC channel output PA.04 (Arduino connector CN8 pin A2, Morpho connector CN7 pin 32)
  1 GPIO for OPAMP non-inverting input: PA.07 (Arduino connector CN5 pin D11, Morpho connector CN10 pin 15)
  1 GPIO for OPAMP output: PA.06 (Arduino connector CN5 pin D12, Morpho connector CN10 pin 13)
  For waveform voltage generation: 1 DAC channel, 1 DMA channel, 1 timer.


@par Directory contents 

  - OPAMP/OPAMP_PGA/Inc/stm32f3xx_it.h          Interrupt handlers header file
  - OPAMP/OPAMP_PGA/Inc/main.h                  Header for main.c module
  - OPAMP/OPAMP_PGA/Inc/stm32_assert.h          Template file to include assert_failed function
  - OPAMP/OPAMP_PGA/Src/stm32f3xx_it.c          Interrupt handlers
  - OPAMP/OPAMP_PGA/Src/main.c                  Main program
  - OPAMP/OPAMP_PGA/Src/system_stm32f3xx.c      STM32F3xx system source file


@par Hardware and Software environment

  - This example runs on STM32F334R8 devices.
    
  - This example has been tested with STM32F334R8-Nucleo Rev C board and can be
    easily tailored to any other supported device and development board.


@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

 * <h3><center>&copy; COPYRIGHT STMicroelectronics</center></h3>
 */
