ts-7000
[Top] [All Lists]

[ts-7000] Re: Scheduled activity on a TS-7800

To:
Subject: [ts-7000] Re: Scheduled activity on a TS-7800
From: "Anouk Ahamitet" <>
Date: Mon, 23 Jun 2008 12:29:34 -0000

--- In Eddie Dawydiuk <> wrote:
>
> Hello,
>
> > We looked at the Marvell PDF documents from the TS-7800 page, and
> > compared them to the source in ts7800ctl.c. We obviously are missing at
> > least one key component to understanding because we weren't able to find
> > anything in the sample source that seemed to match the documentation,
> > except the string "TWSI" that appears in a few places. But, even it the
> > source is accessing the Marvell, and we could figure out how to use set
> > the timers to generate an interrupt that we could catch, it looks like
> > the example functions for start/stop/read/write are WAY to 'sloppy' (in
> > time) for use in setting a sub-millisecond timer, since they ignorantly
> > use usleep(1) and usleep(100) all over the place when we all know that
> > those may take as long as usleep(10000) (and any after the first almost
> > certainly will take that long).
>
> The ts7800ctl code only touches the TWSI(aka I2C) registers in the
> Marvell. Timing is not critical for the code that uses the usleeps as
> the ADC samples are buffered in RAM(in the FPGA). I've recently reworked
> the ADC code and written more verbose documentation on the ADCs. If your
> interested you can find my work in progress here
> ftp://ftp.embeddedarm.com/tmp/7800_adc_update/. I'm not sure this
> updated code will help you access the timers in the Marvell chip, but I
> believe the document will help you to understand what the ts7800ctl code
> does with regard to interfacing with the Marvell chip(e.g. it only uses
> the TWSI bus to send and receive commands to a microcontroller).

Thanks, I'll grab your new ADC stuff and we'll take a look.

And, FWIW, when I said "they ignorantly use usleep" I was referring to the lack of any comments indicating awareness that usleep() could take as long as 10,000 microseconds to return.  As a long time maintenance programmer, that's the kind of code that makes one wonder how the hardware really works, and if the author understood the functions being used.  In other words, a prime example of the source code providing very little trustworthy information, since it looks like it generally works by luck.  And generally is a very deliberate choice of words, because, at least on our board, ts7800ctl doesn't work 100% of the time.  Sometimes it gets (and doesn't handle, but that's expected in a demo, I guess) errors selecting, reading or writing.  And a couple times it just kinda hung until we killedi it.  Hopefully that helps explain why we're reluctant to attempt to learn anything from that particular source...
__._,_.___

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