ts-7000
[Top] [All Lists]

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

To:
Subject: [ts-7000] Re: Help pls: TS-ADC24 is freezing during data acquisition
From: "Alex" <>
Date: Thu, 09 Sep 2010 18:47:45 -0000
Marvin,

It sounds like a great idea (assuming that I can get response from TS-ADC24 
when it's "frozen").

I would like to try this approach.  Couple questions:

1) Which register would give some debugging info?  Is it status register of 
would you look for something else?

2) Since application is "frozen"  would I need to have separate script to read 
the register value or is it possible to do this via command line?

- Alex



--- In  walter marvin <> wrote:
>
> 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);
>




------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
    
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

<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