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
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/
|