Electronic Components Datasheet Search
  English  ▼
ALLDATASHEET.NET

X  

AN4173 Datasheet(PDF) 12 Page - STMicroelectronics

Part # AN4173
Description  The aim of this document is to clarify the usage
PDF  22 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN4173 Datasheet(HTML) 12 Page - STMicroelectronics

Back Button AN4173 Datasheet HTML 8Page - STMicroelectronics AN4173 Datasheet HTML 9Page - STMicroelectronics AN4173 Datasheet HTML 10Page - STMicroelectronics AN4173 Datasheet HTML 11Page - STMicroelectronics AN4173 Datasheet HTML 12Page - STMicroelectronics AN4173 Datasheet HTML 13Page - STMicroelectronics AN4173 Datasheet HTML 14Page - STMicroelectronics AN4173 Datasheet HTML 15Page - STMicroelectronics AN4173 Datasheet HTML 16Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 12 / 22 page
background image
Application code structure
AN4173
12/22
Doc ID 023727 Rev 3
3
Application code structure
This section gives an overview about the application code implemented to test the best
configuration, in terms of conversion time and conversion precision, for the input signal
used.
3.1
Peripherals used
●
Device: SPC564xB/C.
●
System clock: 120 MHz by PLL initialization.
●
ADC frequency: 20 MHz.
●
PIT configuration: a trigger is arisen every 10 µs. This means a sample time of
100 kHz.
●
DMA and DMAMUX configuration: two channels used.
●
STM configuration: to allow calculation of the tCONV of the ADC on the device.
●
Sinusoidal signal at 10 kHz with an amplitude of 4.6 V and offset of 2.3 V.
3.2
Code implementation
The application configures the device to:
●
Disable the Software Watchdog
●
Configure modes and activate all clocks for all peripherals
●
Enable the Cache
●
Enable all exceptions and the ADC_EOC, PIT and STM interrupts
●
Set the GPIO in order to turn on some LEDs
●
Configure the STM peripheral to calculate the ADC tCONV performances.
●
Configure the PLL to work at 120 MHz.
●
Configure the ADC sample parameters setting, the sampling duration, the comparison
duration and the latching phase time. The ADC is set to One Shot Mode with DMA
feature enabled.
●
Configure the PIT to create a periodic interrupt every 10 µs for a sampling time of
100 kHz.
●
Initialize the DMA and DMAMUX :
–
Channel0: to move the ADC sampled values from the ADC ch0 to a buffer of 1024
elements, triggered by the EOC from DMAMUX channel 29
–
Channel1: to start the ADC acquisition from the ADC ch0, triggered by the PIT
with DMAMUX channel 60 (always enabled).
3.3
Performance comparisons
A brief performance comparison has been made using a constant value in order to measure
the conversion time of the ADC 10-bit on board.



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com