UG-498
ADuCM320 Hardware Reference Manual
Rev. C | Page 30 of 196
ADCx Data and Flags Register
Address: 0x40086000 to 0x4008606C (Increments of 0x4), Reset: 0x00000000, Name: ADCDAT0 to ADCDAT27
At the end of each conversion, the ADC writes the data to the appropriate ADCDATx MMR, where x is 0 to 27. This process takes 2 ADC
clock cycles, which at 20 MHz means 100 ns. During this time, the value in ADCDATx cannot be read reliably by the CPU. For this reason
during this time ADCDATx is forced to zero and specifically Bit ADCDATx[3] is zero. Therefore, if ADCDATx is read at random times,
ADCDATx[3] should be checked, and if it is zero ADCDATx should be read again. This second read must be at least 100 ns later, which is
basically guaranteed by the time used to check the bit plus the time required to read the value via the D2D interface. Make sure that the
second read does not coincide with any further conversion on that channel. Alternately, perform repeated reads until the read is successful.
At 1 MSPS conversion speed, the read is valid 90% of the time, while at 100 kSPS, it is valid 99% of the time. When using interrupts, this
problem does not occur unless the read happens exactly when a subsequent ADC conversion completes on that channel. This behavior is
valid for all conversion modes (single conversions, repeated conversions, and sequencer conversions).
Table 14. Bit Descriptions for ADCDAT0 to ADCDAT27
Bits
Bit Name
Description
Reset Access
[31:4]
DAT
ADCx data. The numeric value of the conversion is stored in bits 12 to 27. Bit 28 to Bit 31 are
the extended sign bits. Bit 4 to Bit 11 are always zero. The format is twos complement (signed int).
0x0
RW
3
VALID
Flag indicating if data is valid.
0x0
R
0: data is invalid
1: data is valid
2
OLD
Flag data has already been read.
0x0
RW
0: last data has not been read
1: last data already read
[1:0]
RESERVED
Reserved.
0x0
RW
ADC Channel Select Register
Address: 0x40086080, Reset: 0x111F, Name: ADCCHA
ADC channel select register for non-sequence operation.
Table 15. Bit Descriptions for ADCCHA
Bits
Bit Name
Description
Reset Access
[15:13]
RESERVED
Reserved.
0x0
R
[12:8]
ADCCN
Selects channel for ADC negative input.
0x11
RW
0x00: AIN0.
0x01: AIN1.
0x02: AIN2.
0x03: AIN3.
0x04: AIN4.
0x05: AIN5.
0x06: AIN6.
0x07: AIN7.
0x08: AIN8.
0x09: AIN9.
0x0A: AIN10.
0x0B: AIN11.
0x0C: AIN12.
0x0D: AIN13.
0x0E: AIN14.
0x0F: AIN15.
0x10: VREFP_NADC: connect ADC_REFP to negative input.
0x11: VREFN_NADC: connect ADC_REFN to negative input. Use this setting for single-ended
measurements.
0x12: AGND.
0x13: PGND.
0x14 to 0x1F: reserved