ts-7000
[Top] [All Lists]

Re: [ts-7000] new shell functions for TS-7400

To:
Subject: Re: [ts-7000] new shell functions for TS-7400
From: "Don W. Carr" <>
Date: Thu, 9 Nov 2006 11:48:58 -0600
This is a great set of command line tools! It would still be nice to have a library of functions to do the same from a C/C++ program. That should not be a very big leap since we could use the code from the command line tools. You also need to copy the .so file to the appropriate dev tools directory so you can cross compile with the library. Don.

On 11/9/06, Michael Schmidt <> wrote:

Greetings all,

Just wanted to bring you up to date on what we've been working on for the
TS-7400. We thought it would be useful/neat to be able to control some of
the hardware functions without having to write/compile C code. The result
of this effort is a set of shell functions which allow you to access various
functions such as DIO, ADCs and so forth from the command line or in your
own shell scripts.

There are two new commands added to busybox to support these shell
functions, so as a result you can start talking to the hardware directly
from the fastboot prompt! These commands are "peekpoke" which is used to
provide direct access to memory, and ADCread, which will provide a
continuous stream of analog to digital readings (either on one channel or
all channels) to stdout in text format. (Please note that it is much faster
to read only a single channel due to the need to add wait time when
switching channels...) Both of these commands provide more info on what
options are available if you type them without any arguments.

Here are the shell functions that have been implemented. On the initrd they
are stored in /ts7xxx.subr.

dio_dir_get <n>
get the current direction (0=input,1=output) of DIO #n (n in 0..15)

dio_dir_set <n> <dir>
set the direction of DIO #n to the specified direction (0=input,1=output)

dio_data_get <n>
get the current value (0=Low,1=High) of DIO #n

dio_data_set <n> <val>
set the current value (0=Low,1=High) of DIO #n
(specified pin should be set to be an output already)

usb_init
call this function to turn the USB ports on and initialize them

usb_off
call this function to turn off the USB ports

usb_numports
prints the number of USB ports on the board. this may be greater then
the actual number of physical ports. the first port is port 0.

usb_port_devexists <port>
prints '1' if something is plugged into the specified port, or '0'
otherwise.

eth_off
turns off the ethernet port and phy

eth_on
turns on the ethernet port and phy

led0 <state>
sets the state of the green LED (0=OFF,1=ON)

led1 <state>
sets the state of the red LED (0=OFF,1=ON)

cpu_speed_max
set the CPU and bus speed to their maximum (normal) values,
e.g. 200Mhz/100Mhz.

cpu_speed_166
set the CPU speed to 166Mhz and the bus speed to 66Mhz.

cpu_speed_42
set the CPU speed and bus speed to 41.5Mhz. This is the slowest speed
that Ethernet will work at.

cpu_speed_min
set the CPU and bus speed to their minimum values (14.7456Mhz)

temp_read
returns the current Celsius temperature reading from the TMP124 chip.

Any TS-7400s built starting today will have these new changes. If you
already have a TS-7400 that does not have these new shell functions, you can
download the new initrd file at ftp://ftp.embeddedarm.com/ts7400-initrd.dd

Enjoy!

Michael




--
Dr. Don W. Carr
J. G. Montenegro 2258
Guadalajara, Mexico
+52-333-630-0704
+52-333-836-4500 ext 2930 __._,_.___


SPONSORED LINKS
Single board computer Hardware Computer running slow
Linux os Single board

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