Mbed Baseboard Diagnostic Commands

At the moment this is a work in progress, so only the basic data is here, and the code can be found here.

Any of htese commands can be added to a text file that is placed on either the local file system of the MBED board, or the SD car's file system, and executed from that text file by the exec command. Please note that the exec command can be called from within a script file, but watch out for a stack crash.

exec filename debugExec a script file from the currently selected storage media, if debug is set, the interpriter will output each ilie its exicuting, script files take the format of a lists of commands
cat filenamelist a text file to the current console output device
cp filename1 filename2Copy file1 to file2, full paths needed
dirShow the directory listing of the currently selected file system
cd pathnameChange directory to pathnameCurrent options are /local and /sd/td>
pwdwhich directory we are currently in
wait numberwait for number tenths of a second
baud numberSet the serial line baud rate
print elementsWill print anythig after the command to the current console it will also understand the variables in the scripting language the diag code has.
helpWill display the current help file to the current console
state optioshow's the state of the system, can have an option passed, where it will only show the state of the option, or the user can pass no option where the command will return data on every detail it can Current options are var, i2c, board, jmp
dateReturns the current data, acording to the RTC :-)
dateset numberWill set the RTC to the new date and time, according to the 32 bit number supplied
station numberSets the board's station ID to a given value, this is used by the CAN bus software, with the broardcast address been 0
netinitCauses the board to start-up the network interface, BEWARE will crash the board if no live network is found
set variable numberSet a given variable to a number
sum variable function numberperform some maths on a vaiable (+,- * / %)
point jXSet a loop point in the code
tst variable function number pointtest a given variable against a standard maths function (<, >, =, !),
clrClear all variables to 0
listLook for devices on the I2C busUses p9 and p10 on the mbed board
i2cw address dataWrite a value to an address on the I2C bus
i2cr addressRead a value from an address on the I2C bus
led numberWill sequence round the MBED boards LED's one at a time for a given number of times
sseg numberWill turn on all the segments one after another on the four, seven segment displays,for a given number of times
rs232 stringSends a givern string to the RS232 channel for the user to view
a2dDisplay the current interger values off the analog to digital convertors
sndPlays a simple music file to the analog output channelCauses the board to lock up at the mo ??
digital numberSends an incrementing value to the digital output for a given number of times
lcd number1) Sends a test string to the Robot Electronics LCD display
2) Sends a test string to the Batron LCD display
lcdprt stringWill send the string to the batron LCDThis only works for the Barton LCD, as this is the type we are using on the production boards
lcdclrClear a Batron Display screenThis only works for the Barton LCD, as this is the type we are using on the production boards
kbd number1) Gets 4 key presses from a Robot Electronics LCD display based keyboard
2) Gets four keypresses from a PCF8574 based keyboard
This is the test for the production board, ad that is the type of keyboard controler we have
canrxLocks the board into a loop, only receiving can bus messages, and displaying the data
cantxsend a can maeeage out on the bus, remote-station can be any value from 0 to 15 with 0 been the broardcast address, the value used for the time message is a 32 bit interger, sync should caus a device re-set and the who message should cause remote stations to report back cantx prt remote-station message
cantx raw remote-station message
cantx int remote-station value
cantx time remote-station value
cantx sync
cantx who
cancmdSend a command to a remote station, as if it was typed in at the local console
tickerStarts the 1 second ticker running, this runs as a back ground routine displaying the current loop count on the Seven Segment display
PCC, Jan 2010