manufacturer of I/O-rich SBCs, operator interfaces, handheld instruments, and development tools for embedded control low cost single board computers, embedded controllers, and operator interfaces for scientific instruments & industrial control development tools for embedded control order our low cost I/O-rich embedded control products embedded controller manufacturer profile single board computers & embedded controllers development tools & starter kits for your embedded design operator interfaces with touchscreens and graphical user interface plug-in expansion modules for digital & analog I/O C language & Forth language integrated development tools, IDE single board and embedded computer accessories embedded controller enclosures, bezels, environmental gaskets
Table of Contents

Introduction

Specifications

Hardware

Flash Card

Connecting To the Wildcard Bus

Selecting the Wildcard Address

Installing the CF Card

CF Card Software Package User Guide and Glossary

How To Install the CF Software

Using the Driver Code with C

Using the Driver Code with Forth

CF Card Software

Categorized List of Functions and Constants

ATA Failure Codes

ATA Primitives

CF Card Information

Directory

File Access and Position Modes

File I/O

File Processing

File System Error Handling

Initialization

Overview of Glossary Notation

Using the File System Functions

Commonly Used Terms

String Parameters and the Use of THIS_PAGE

Access Privileges

Root Directory Only and File Name Restrictions

File Position Indicator

Error Handling

Real-Time Clock on the Host Computer Enables Time/Date Marking of Files 12

Initialization

Automatic Initialization and File Processing

Upgrade note for former Memory Interface Board (MIB) Users

How To Create and Use an AUTOEXEC.QED File

Compile a Program into Flash Memory

Create a Set of Image Files

Transfer the Image File Contents into Memory

Restrictions on Software Upgrades

Recovering from Buggy AUTOSTART.QED Files

Compact Flash Card Software Package Main Glossary

Upgrade Notice for Prior Users of the Memory Interface Board

Sample FILEDEMO.C File (pdf)

Sample FILEDEMO.4th File (pdf)

CF Wildcard Hardware Schematic

The Compact-Flash Wildcard and
CF Card Software Package User Guide

<< Previous | Next>>

C: FAIL_ADDR
4th: FAIL_ADDR ( -- n )
A constant (equal to 0x0004) that is returned as a failure code when the requested sector number is out of range. All failure codes returned by the low level ATA access routines (such as ATA_Read and ATA_Write) have names starting with "FAIL", have a single-bit set, and may be OR'd together to represent multiple errors. This constant may be used as a bitmask to decode the value returned by an ATA function.

C: FAIL_ARGS
4th: FAIL_ARGS ( -- n )
A constant (equal to 0x0001) that is returned as a failure code when one of the arguments that is passed to the low level ATA function is invalid. All failure codes returned by the low level ATA access routines (such as ATA_Read and ATA_Write) have names starting with "FAIL", have a single-bit set, and may be OR'd together to represent multiple errors. This constant may be used as a bitmask to decode the value returned by an ATA function.

C: FAIL_BUSY
4th: FAIL_BUSY ( -- n )
A constant (equal to 0x0080) that is returned as a failure code when a timeout error is encountered during an access to the ATA flash card. All failure codes returned by the low level ATA access routines (such as ATA_Read and ATA_Write) have names starting with "FAIL", have a single-bit set, and may be OR'd together to represent multiple errors. This constant may be used as a bitmask to decode the value returned by an ATA function.

C: FAIL_CMD
4th: FAIL_CMD ( -- n )
A constant (equal to 0x0008) that is returned as a failure code when an ATA command fails to complete. All failure codes returned by the low level ATA access routines (such as ATA_Read and ATA_Write) have names starting with "FAIL", have a single-bit set, and may be OR'd together to represent multiple errors. This constant may be used as a bitmask to decode the value returned by an ATA function.

C: FAIL_DATAREQ
4th: FAIL_DATAREQ ( -- n )
A constant (equal to 0x0020) that is returned as a failure code when the "DRQ" bit in the ATA hardware status register indicates that the drive is not synchronized with the data requests to/from the host as it should be during a data transfer. All failure codes returned by the low level ATA access routines (such as ATA_Read and ATA_Write) have names starting with "FAIL", have a single-bit set, and may be OR'd together to represent multiple errors. This constant may be used as a bitmask to decode the value returned by an ATA function.

C: FAIL_EXTERR
4th: FAIL_EXTERR ( -- n )
A constant (equal to 0x0010) that is returned as a failure code when an attempt to get an "extended error" description fails after a failure occurs while accessing the ATA device; this extended error feature is supported only by Sandisk ATA flash cards. All failure codes returned by the low level ATA access routines (such as ATA_Read and ATA_Write) have names starting with "FAIL", have a single-bit set, and may be OR'd together to represent multiple errors. This constant may be used as a bitmask to decode the value returned by an ATA function.

C: FAIL_ID_DRIVE
4th: FAIL_ID_DRIVE ( -- n )
A constant (equal to 0x0100) that is returned as a failure code when an error is encountered by the ATA_ID_Drive command. All failure codes returned by the low level ATA access routines (such as ATA_Read and ATA_Write) have names starting with "FAIL", have a single-bit set, and may be OR'd together to represent multiple errors. This constant may be used as a bitmask to decode the value returned by an ATA function. See also ERR_FAIL_ID_DRIVE.

C: FAIL_NO_CARD
4th: FAIL_NO_CARD ( -- n )
A constant (equal to 0x0002) that is returned as a failure code when there is no card present. All failure codes returned by the low level ATA access routines (such as ATA_Read and ATA_Write) have names starting with "FAIL", have a single-bit set, and may be OR'd together to represent multiple errors. This constant may be used as a bitmask to decode the value returned by an ATA function.

C: FAIL_READY
4th: FAIL_READY ( -- n )
A constant (equal to 0x0040) that is returned as a failure code when the "Drive Ready" bit in the ATA hardware status register indicates that the drive is not ready when it should be. All failure codes returned by the low level ATA access routines (such as ATA_Read and ATA_Write) have names starting with "FAIL", have a single-bit set, and may be OR'd together to represent multiple errors. This constant may be used as a bitmask to decode the value returned by an ATA function.

C: xaddr FI( void)
4th: FI ( -- fat_info_xaddr )
This function returns the 32-bit extended base address (xaddr) of the fat_info structure that holds all of the key variables and array parameter fields used by the file system software. This address is set by Init_File_IO or Init_File_System. The returned fat_info_xaddr parameter is the base address of a block of 300 bytes of RAM in either common or paged memory. The first entry at offset 0 in this structure is the resource variable that mediates access to the CF Card access functions so that this software package is re-entrant with respect to multitasking. (Note that the functions that access the CF Card cannot be called from inside interrupt service routines; see the glossary entries for ATA_Read and ATA_Write). The fat_info structure stores low level parameters, buffers, and array parameter fields that manage ATA access, FAT file manipulation, and file access. The arrays associated with the array parameter fields are maintained in the heap that is initialized by Init_File_Heap. With the possible exception of getting or releasing the resource variable at the base of this structure, the programmer does not need to directly access the contents of the structure.

<< Previous | Next>>


Home|Site Map|Products|Manuals|Resources|Order|About Us
Copyright (c) 2009 Mosaic Industries, Inc.
Your source for single board computers, embedded controllers, and operator interfaces for instruments and automation