TWR-K60N512-KEIL Freescale Semiconductor, TWR-K60N512-KEIL Datasheet - Page 172

no-image

TWR-K60N512-KEIL

Manufacturer Part Number
TWR-K60N512-KEIL
Description
K60N512 Keil Tower Kit
Manufacturer
Freescale Semiconductor
Series
Kinetisr
Type
MCUr

Specifications of TWR-K60N512-KEIL

Rohs Compliant
YES
Contents
4 Boards, Documentation, DVD
Peak Reflow Compatible (260 C)
Yes
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
For Use With/related Products
Freescale Tower System, K60N512
Configuration example
18.2.1.5 Using ADC driver
Configure ADC as it will be used, but because ADC_SC1_ADCH is 31,the ADC will be
inactive. Channel 31 is just disable function.
There really is no channel 31.
18.2.1.6 Calibrate ADCs
Calibrate the ADCs in the configuration in which they will be used and then restore the
desired configuration:
The structure still has the desired configuration. So restore it. Why restore it? The
calibration makes some adjustments to the configuration of the ADC. These are now
undone:
// config the ADC again to desired conditions
Repeat this for both ADC's. However we will only 'use' the results from the ADC1, wired
to the Potentiometer on the Kinetis Tower Card.
// Repeating for ADC1:
Configure the ADC again to default conditions
18.2.1.7 Enable ADC and PDB interrupts
Enable the ADC and PDB interrupts in NVIC.
enable_irq(ADC0_irq_no) ;
enable_irq(ADC1_irq_no) ;
enable_irq(PDB_irq_no) ;
In case previous demo did not end with interrupts enabled, enable used ones.
EnableInterrupts ;
172
ADC_Config_Alt(ADC0_BASE_PTR, &Master_Adc_Config);
ADC_Cal(ADC0_BASE_PTR);
ADC_Config_Alt(ADC0_BASE_PTR, &Master_Adc_Config);
ADC_Config_Alt(ADC1_BASE_PTR, &Master_Adc_Config);
ADC_Config_Alt(ADC1_BASE_PTR, &Master_Adc_Config);
ADC_Cal(ADC1_BASE_PTR);
Kinetis Quick Reference User Guide, Rev. 0, 11/2010
// ready for this interrupt.
// ready for this interrupt.
// ready for this interrupt.
// do the calibration
// do the calibration
// config ADC
// config ADC
Freescale Semiconductor

Related parts for TWR-K60N512-KEIL