Sony CXD5602 User Manual page 867

Table of Contents

Advertisement

readOldestTimeStamp(){
PreLsb = readLsb();
PreMsb = readMsb();
PostLsb = readLsb();
PostMsb = readMsb();
if(PreMsb == PostMsb){
msb = PostMsb;
lsb = PostLsb;
}else{
msb = PreMsb;
lsb = PreLsb;
Also, the following is an example pseudo code of reading out the LATEST_TIMESTAMP. Using the
remaining number of FIFOs (PreAvail/PostAvail), the carry of the MSB during the two readouts is detected. (In
the readout of the LATEST_TIMESTAMP, the remaining number of FIFOs must be read out for the
LATEST_TIMESTAMP to the OLDEST_TIMESTAMP conversion, and because of this, detection is performed
by the readout of the remaining number of FIFOs.)
readLatestTimeStamp(){
PreAvail = readAvail();
PreLsb = readLsb();
PreMsb = readMsb();
PostAvail = readAvail();
PostLsb = readLsb();
PostMsb = readMsb();
if(PreAvail == PostAvail){
msb = PreMsb;
lsb = PreLsb;
}else{
msb = PostMsb;
lsb = PostLsb;
timestamp = msb<<15+lsb-INTERVAL;
}
3.9.15.14
LPADC Sample Decimation Parameter Dynamic Change
When converting the sampling rate using the LPADC sample decimation function within the ADCIF, a
maximum delay equal to the [original sampling period of the LPADC analog region] x 32768 will occur when the
sampling rate is dynamically changed (with the sampling input of the FIFO inside the ADCIF kept ON) to a
higher rate than the one currently in use.
The sample decimation circuit of the LPADC is controlled by the counter (the output value is cnt_out) which
increments each time data is output from the LPADC.
The counter operates at a clock of 32 kHz, and countup is performed at the timing that data is output from the
LPADC (the LPADC_DATAEN in Figure SCU (Sensor Control Unit)-93).
When cnt_out == 2^SAMP_RATIO-1, the value of the cnt_out is reset to "0" (comparison is always
performed in 16 bit).
Data is input to the FIFO when cnt_out is reset.
E.g.: When SAMP_RATIO = 2, reset is performed at cnt_out == 3, which results in 0-1-2-3-0-1-2-3-, ..., and
sampling is performed to the FIFO at a rate of 1/4 (Figure SCU (Sensor Control Unit)-93).
-867/1010-
CXD5602 User Manual

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents