C
Chris Carlen
Guest
Hi:
The TMS320F2812 Analog to Digital Converter (ADC) Peripheral Reference
Guide (SPRU060) states on page 2-12 that: "After each conversion ... in
a conversion sequence, the pointer increases by 1."
This is referring to the SEQnPTR bit fields in the AUTO_SEQ_SR register,
which maintain the current states of the two 8-state ADC conversion
sequencers.
However, my program experiments seem to indicate that this register
instead maintains the value of the last conversion state, rather than
incrementing to point to the next as the documentation says. That would
imply that it increments instead upon start-of-conversion, rather than
after.
I have discovered this by configuring the SEQ1 to operate in start-stop
mode. That is, I set MAXCONV1 to have a value of 0 so that only one
conversion would be performed. I also configured the ADC, PIE, and CPU
to generate an interrupt at the end of a conversion sequence. I set the
ADCTRL1:CONTRUN bit to zero.
Sure enough, when I get to my interrupt service routine, I find that the
SEQ1PTR value is zero after the first conversion (whose result is in
RESULT0, the SEQ1PTR value is 1 after the second conversion (whose
result is in RESULT1), etc.
If I set MAXCONV1 to perform a multiple conversion sequence before
interrupting, then the same behavior is observed. So if I set
MAXCONV1=7 to generate a full 8 conversions, I get SEQ1PTR=7 when the
ISR is reached.
This is definitely inconsistent with the documentation.
Has anyone else noticed this?
Thanks for input.
Good day!
--
_______________________________________________________________________
Christopher R. Carlen
Principal Laser/Optical Technologist
Sandia National Laboratories CA USA
crcarle@sandia.gov -- NOTE: Remove "BOGUS" from email address to reply.
The TMS320F2812 Analog to Digital Converter (ADC) Peripheral Reference
Guide (SPRU060) states on page 2-12 that: "After each conversion ... in
a conversion sequence, the pointer increases by 1."
This is referring to the SEQnPTR bit fields in the AUTO_SEQ_SR register,
which maintain the current states of the two 8-state ADC conversion
sequencers.
However, my program experiments seem to indicate that this register
instead maintains the value of the last conversion state, rather than
incrementing to point to the next as the documentation says. That would
imply that it increments instead upon start-of-conversion, rather than
after.
I have discovered this by configuring the SEQ1 to operate in start-stop
mode. That is, I set MAXCONV1 to have a value of 0 so that only one
conversion would be performed. I also configured the ADC, PIE, and CPU
to generate an interrupt at the end of a conversion sequence. I set the
ADCTRL1:CONTRUN bit to zero.
Sure enough, when I get to my interrupt service routine, I find that the
SEQ1PTR value is zero after the first conversion (whose result is in
RESULT0, the SEQ1PTR value is 1 after the second conversion (whose
result is in RESULT1), etc.
If I set MAXCONV1 to perform a multiple conversion sequence before
interrupting, then the same behavior is observed. So if I set
MAXCONV1=7 to generate a full 8 conversions, I get SEQ1PTR=7 when the
ISR is reached.
This is definitely inconsistent with the documentation.
Has anyone else noticed this?
Thanks for input.
Good day!
--
_______________________________________________________________________
Christopher R. Carlen
Principal Laser/Optical Technologist
Sandia National Laboratories CA USA
crcarle@sandia.gov -- NOTE: Remove "BOGUS" from email address to reply.