Texas Instruments CC2650DK 사용자 설명서

다운로드
페이지 1570
Modules
The source and start polarity is configured in the [AUX_ANAIF:ADCCTL] register. For software triggered
sampling, set the start source to an unused value and write to [AUX_ANAIF:ADCTRIG].
17.4.9.5 FIFO
The ADC FIFO is a 4-element large FIFO, storing the result of ADC conversions.
ADC samples can be read from the FIFO register [AUX_ANAIF:ADCFIFO]. When a sample is read, it is
popped from the FIFO and can be stored by the user.
Statuses and errors in the FIFO are found in the [AUX_ANAIF:ADCFIFOSTAT] register.
To recover from an FIFO overflow or underflow condition, the FIFO must be flushed by writing the flush
command to [AUX_ANAIF:ADCCTL:CMD] and then enabling the ADC interface again.
NOTE:
When debugging the software, showing the ADCFIFO register will cause JTAG to read the
FIFO. This will pop the sample from the FIFO, and consequently the software cannot read it.
17.4.9.6 Interrupts and Events
The ADC events found in event control are output, to allow other modules to trigger on ADC events or to
interrupt the system CPU. These are edge-triggered, and must be cleared by software.
17.4.9.7 DMA Usage
The ADC can also be used together with DMA, to allow data transfer from the ADC FIFO to any other
memory-mapped location without CPU involvement.
To configure the ADC to trigger a DMA transfer, the corresponding DMA channel #7 must be set up in the
µDMA module.
After configuring the µDMA, configuration of a DMA trigger for the ADC is done in
[AUX_EVCTL:DMACTL].
The trigger of a DMA transfer can be done by two different FIFO events, ADC_ FIFO_NOT_EMPTY (1 or
more samples available) or ADC_FIFO_ALMOST_FULL (3/4 full).
In addition, the type of DMA request must be configured (burst or single transfer). If using single transfers,
the µDMA should be set up to copy 1 sample, while a burst transfer should copy no more than 3 samples,
to avoid underflow.
When using µDMA, the AUX_ADC_IRQ event will be set when the DMA transfer is done to allow the
system CPU to be interrupted. This occurs for ADC DMA transfer done, ADC FIFO underflow, and ADC
FIFO overflow.
17.4.9.8 Usage Example – Single Shot ADC Measurement
17.4.9.8.1 Enable Interface Clocks and ADC Clocks
1. Enable the clock for the AUX analog interface [AUX_WUC:MODCLKEN0:SOC] and the ADI interface
[AUX_WUC:MODCLKEN0:ADI].
2. Request clock for the ADC core, wait until request is acknowledged [AUX_WUC:ADCCLKCTL].
17.4.9.8.2 Configure the ADC Registers
1. Connect the correct MUX to the ADC and set I/O in analog mode (disable input and output buffer).
2. Set ADC sampling mode: [AUX_ADI:ADC0:SMPL_MODE].
3. Configure sampling time for continuous mode: [AUX_ADI:ADC0:SMPL_CYCLE_EXP].
The minimum should be 0x3 (2.7 us) for complete internal signal settling.
4. Chose internal reference source : [AUX_ADI:ADCREF0:SRC].
5. Configure power-saving mode of internal reference [AUX_ADI:ADCREF0:REF_ON_IDLE].
1207
SWCU117A – February 2015 – Revised March 2015
AUX – Sensor Controller with Digital and Analog Peripherals
Copyright © 2015, Texas Instruments Incorporated