ts-7000
[Top] [All Lists]

Re: [ts-7000] Help pls: TS-ADC24 is freezing during data acquisition

To:
Subject: Re: [ts-7000] Help pls: TS-ADC24 is freezing during data acquisition
From: walter marvin <>
Date: Tue, 7 Sep 2010 19:27:20 -0700 (PDT)


Without looking at the code, this is typical of a timing "hole" in the aquisition code.  If your read carefully through the code and then check the hardware register state at the time of the "freeze" you should be able to narrow the problem down


From: Alex <>
To:
Sent: Tue, September 7, 2010 7:29:21 PM
Subject: [ts-7000] Help pls: TS-ADC24 is freezing during data acquisition

 

Hi guys,

I am wondering if anybody had any luck with making TS-ADC24 work with high sampling rates?

I use TS-ADC24 to sample 4 channels at 200kHz, it runs for few minutes and then the application is freezing. The application (and board) runs fine at 50 kHz. If I increase sampling rate to 250kHz, the board is freezing in few seconds. (According to TS-ADC24 specs, the card should be able to collect 4 channels @ 500 kHz)

I can understand occasional FIFO buffer overflow, but the fact that the board is simply freezing and does not return anything seems to me like a major flaw is TS design.

Did anybody experience same problem or has any suggestions how I can deal with TS-ADC24 freezing?

For a reference, below is code that is responsible for data acquisition.

#define ADC_START_MSK 0x0001
...

ADC_CFG = ADC_BASEIO + 0x02; // Configuration register
ADC_STAT = ADC_BASEIO + 0x08; // Status register

...

int n_Success = 1;
unsigned long i = 0;
unsigned short val = 0;
int n_Priority = -21;
int which = PRIO_PROCESS;
id_t pid;
int n_Result = 0;

// Change priority to -20
pid = getpid();
n_Priority = -20;
n_Result = setpriority(which, pid, n_Priority);

// Start ADC acquisition
POKE16((unsigned long)(ADC_CFG), (PEEK16((unsigned long) (ADC_CFG)) | ADC_START_MSK));

while(i < n_Length)
{
// Read the status register
val = PEEK16((unsigned long) (ADC_STAT));
if ((val & 0xFFC0)) // leave the most recent sample in FIFO
{
// Test for overflow
if ((val & 0x8000))
{
// if there is overflow, exit loop
n_Success = -1;
i = n_Length;
}
else
{
n_Samples[i++] = PEEK16((unsigned long) (ADC_FIFO));
}
}
}

// stop ADC system
// = set bit 0 to 0
POKE16((unsigned long)(ADC_CFG), (PEEK16((unsigned long) (ADC_CFG)) & ~ADC_START_MSK));

// Empty FIFO
while(((PEEK16((unsigned long) (ADC_STAT)) & 0xFFC0) >> 6) > 0)
{
val = PEEK16((unsigned long) (ADC_FIFO));
}

//Restore priority to 0
n_Priority = 0;
n_Result = setpriority(which, pid, n_Priority);




__._,_.___


Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: =Email Delivery: Digest | m("yahoogroups.com?subject","ts-7000-fullfeatured");=Change Delivery Format: Fully Featured">Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | =Unsubscribe

__,_._,___
<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU