MBARI OASIS3 Mooring Guide
Changes to OASIS3 Interface from Original 80C196 OASIS Controller
Goals
The primary design goal for OASIS3 was to make it as software-compatible as
possible with the original OASIS controller. That includes being able to port
OASIS drivers with as little change as possible, as well as making little or
no changes to the shore-side software and data collection procedure. (For a
full list of design requirements, see Requirements).
In fact, there is no change at all to the shore-side data processing or the
format of the data that is transmitted from OASIS to shore.
As far as software compatibility for the OASIS controller software and drivers,
some changes were necessary in order to accomodate an expansion to 32 serial
and power ports, to account for byte ordering, and to accomodate the new system
architecture. Following is a list of changes to the original OASIS software.
Changes
- All parameters are 32 bits. drv_parms in driver headers are unsigned 32
bits and global parameters ("parm") are signed 32 bits.
- Consequently INTERVAL drv_parm can be as big as needed (up to 2**32 - 1,
or 136 years)
- SER_PORT drv_parm indicates multiplexed (virtual) serial port number (0-31).
This has a fixed translation to physical serial port as follows:
|
Muxed Serial Port
|
Physical UART
|
|
0
|
0 (SCI)
|
|
1
|
1 (first TPU port)
|
|
2
|
2
|
|
3
|
3
|
|
4 - 10
|
4
|
|
11 - 17
|
5
|
|
18 - 24
|
6
|
|
25 - 31
|
7 (last TPU port)
|
- Consequently SER_RELAY0 and SER_RELAY1 drv_parms are deleted.
- Added SER_BAUD drv_parm.
- SER_SETUP drv_parm no longer contains baud rate information.
- SER_PORT and SER_SETUP are 32 bits, as the rest. But only the LSB 16 bits
of each are saved by the task dispatcher.
- TOD_MASK drv_parm is now a 24 bit mask, with each bit representing one hour
of the day. (It used to be a 12 bit mask, with each bit representing 2 hours).
- Added BIG_TX_BUF flag to drv_parm[SER_SETUP]. This allows you to set up
(e.g.) the radio port with a 1K Tx buffer. This takes the place of setting
up a bigger buffer in the "connect" routine.
- Put function prototypes into all include files, to conform to industry standard
practice. This will necessitate removing function prototypes from driver modules.
- Consequently file drvr.h is no longer contains the static driver table that
gets modified for each deployment. This got moved to drvTbl.h
- Similarly file usrcmds.h no longer contains the user function table. This
got moved to usrCmdTbl.h
- XON/XOFF is not possible on the console port (port 0). Persistor's support
of XON/XOFF on SCI hangs the system.
- Downloadable drivers and user functions are not supported. "LOAD"
command is not supported.
- Added files debug.c and debug.h. Edit debug.h to turn on/off various debugging
options
- Added "CheckStack" command to check for stack usage of all running tasks.
Note that only those currently running are checked (those waiting for the
next sample time have had their memory reclaimed)
- Added "MemCheck" command to report status of allocated & free memory from
tmpMalloc(), and free memory from permMalloc()
- Both "shutcal" and "shutcom" are conditionally compiled into the deployed
code. You can run either one independently.
- RESET command has 4 options:
- "RESET" (no parms) flushes log files (saves them), restarts OASIS
- "RESET ALL" erases log files, then restarts OASIS
- "RESET LOG" erases log files and re-inits logging (doesn't reset OASIS)
- "RESET PICO" flushes log files (saves them), reboots to PicoDOS
- Changed most of the "getnum()" and "getFixedPt()" calls to sscanf(). Should
change the rest, and get rid of those funky functions, since we now have a
real stdio.
- Disabled 68332 Watchdog; it created problems at startup/shutdown. We have
the 36 minute hardware watchdog to keep us sane.
Note on Watchdog
The 68332 watchdog timer is disabled, so the following is moot. Still, it's
documented here in case anyone wants to try to re-enable the 68332 watchdog
under PicoDOS. It's very tricky to do so.
- Read "$(Persistor)\MotoCross Support\CFX\Docs\html\PersistorCF1UsersManual\sections\examples\CF1Watchdog.htm"
- The magic is in "oasis Settings" - Language - C/C++ Language - Prefix file
- To enable the 68332 watchdog, set prefix file to mxcfxwdt.h.
- To disable it, set prefix file to mxcfxstd.h.
- Also, to enable, you must #define WATCHDOG in custom.h.
- To disable, don't define WATCHDOG. The WATCHDOG definition (#define or #undef)
must match the prefix file.
- Finally, it all only works if you boot from Flash. If you boot PicoDOS,
68332 watchdog is disabled until the next boot.