here
Concept2
PRELIMINARY
Performance Monitor Generation III (PM3)
Communications Interface Definition
Filename: Concept2 PM3 Communication Interface Definition 007.doc
Revision: 0.07
9/9/04 2:23 PM
Concept2
105 Industrial Park Drive
Morrisville, VT 05661
802-888-5226 (Voice)
802-888-6331 (Fax)
rowing@concept2.com
Concept2 PM3 Communication Interface Definition
Table of Contents
LIST OF FIGURES ......................................................................................................................................................3
LIST OF TABLES .........................................................................................................................................................3
PURPOSE AND SCOPE .............................................................................................................................................4
DOCUMENT HISTORY................................................................................................................................................... 4
RELATED DOCUMENTS................................................................................................................................................ 4
OVERVIEW ...................................................................................................................................................................5
DATA FLOW .................................................................................................................................................................5
PROTOCOL FRAMEWORK .................................................................................................................................11
FRAME STRUCTURE ................................................................................................................................................... 11
FRAME CONTENTS...................................................................................................................................................... 12
Command Format................................................................................................................................................ 12
Response Format ................................................................................................................................................. 13
PM3 M ANUFACTURER INFORMATION .................................................................................................................... 13
PM3 EXTENSIONS...................................................................................................................................................... 14
PROTOCOL LAYER DEFINITION.....................................................................................................................14
UNIVERSAL SERIAL BUS ........................................................................................................................................... 14
Physical Layer ..................................................................................................................................................... 14
Data Link Layer................................................................................................................................................... 15
Network and Transport Layers ......................................................................................................................... 17
PROTOCOL FEATURES ........................................................................................................................................18
DEFAULT CONFIGURATION....................................................................................................................................... 18
UNSUPPORTED FEATURES......................................................................................................................................... 18
COMMAND AND RESPONS E DEFINITIONS ................................................................................................19
W ORKOUTS................................................................................................................................................................. 19
Configuring a Programmed Workout .............................................................................................................. 19
PC-HOST DYNAMIC LINK LIBRARY (DLL) AND APPLICATION PROGRAMMING
INTERFACE (API).....................................................................................................................................................19
OVERVIEW................................................................................................................................................................... 19
A RCHITECTURE ........................................................................................................................................................... 20
PM3 Device Discovery & Interface................................................................................................................. 20
Media Interfaces .................................................................................................................................................. 20
USB Interface ................................................................................................................................. 20
802.xx Interface (wireless or wired network)........................................................................... 20
Asynchronous Interface (RS232/485) ........................................................................................ 20
CSAFE+ Command Interface ........................................................................................................................... 20
U SER APPLICATION API............................................................................................................................................ 22
PM3 Device Discovery & Interface API......................................................................................................... 22
Data Type Definitions................................................................................................................... 22
Function Reference........................................................................................................................ 22
CSAFE Interface API ......................................................................................................................................... 26
PM3 USB Interface API .................................................................................................................................... 30
Example Application Logic – CSAFE DLLs................................................................................................. 33
Example Application Logic – USB DLL (“direct interface”). .................................................................... 34
APPENDIX A ...............................................................................................................................................................35
Preliminary
2
Concept2 PM3 Communication Interface Definition
CSAFE COMMANDS IMPLEMENTED....................................................................................................................... 35
Short Commands................................................................................................................................................. 35
Long Commands................................................................................................................................................. 37
CSAFE PM3-SPECIFIC COMMANDS IMPLEMENTED ............................................................................................ 39
Short Commands ................................................................................................................................................. 39
Long Commands................................................................................................................................................. 39
APPENDIX B ................................................................................................................................................................40
PM3 DATA CONVERSIONS........................................................................................................................................ 40
Watts <-> Pace..................................................................................................................................................... 40
Calories/Hr <-> Pace .......................................................................................................................................... 40
Pace <-> /500m Pace .......................................................................................................................................... 40
APPENDIX C ...............................................................................................................................................................40
STANDARD LIST WORKOUTS.................................................................................................................................... 40
CUSTOM LIST W ORKOUTS........................................................................................................................................ 41
APPENDIX D ...............................................................................................................................................................42
PM3 ERROR CODES ................................................................................................................................................... 42
List of Figures
FIGURE 1 - STANDARD FRAME FORMAT ..................................................................................................................... 11
FIGURE 2 - EXTENDED FRAME FORMAT ..................................................................................................................... 11
FIGURE 3 - LONG COMMAND FORMAT ....................................................................................................................... 12
FIGURE 4 - SHORT COMMAND FORMAT ...................................................................................................................... 12
FIGURE 5 - RESPONSE FRAME CONTENTS FORMAT .................................................................................................. 13
FIGURE 6 - INDIVIDUAL COMMAND RESPONSE FORMAT ......................................................................................... 13
List of Tables
TABLE 1 - DOCUMENT M ODIFICATION HISTORY ........................................................................................................ 4
TABLE 2 - RELATED DOCUMENTS................................................................................................................................. 4
TABLE 3 - PM3 CONFIGURATION /DATA TO PC........................................................................................................... 6
TABLE 4 - PC CONFIGURATION/DATA TO PM3........................................................................................................... 9
TABLE 5 - EXTENDED FRAME A DDRESSING............................................................................................................... 11
TABLE 6 - UNIQUE FRAME FLAGS ............................................................................................................................... 12
TABLE 7 - BYTE STUFFING VALUES............................................................................................................................ 12
TABLE 8 - COMMAND FIELD TYPES............................................................................................................................. 13
TABLE 9 - RESPONSE FIELD TYPES.............................................................................................................................. 13
TABLE 10 - CSAFE CONCEPT 2 PM3 INFORMATION................................................................................................ 13
TABLE 11 - PM3-SPECIFIC CSAFE COMMAND W RAPPERS.................................................................................... 14
TABLE 12 - PM3 PROPRIETARY CSAFE COMMAND W RAPPERS........................................................................... 14
TABLE 13 - USB SERIES B RECEPTACLE M ECHANICAL.......................................................................................... 14
TABLE 14 - USB SERIES B RECEPTACLE CONNECTOR PIN-OUT ............................................................................ 15
TABLE 15 - PM3 USB DEFINITIONS ........................................................................................................................... 17
TABLE 16 - PM3 CSAFE PROTOCOL DEFAULTS...................................................................................................... 18
TABLE 17 - PM3 UNSUPPORTED CSAFE PROTOCOL FEATURES ........................................................................... 18
TABLE 18 - PM3 ERROR CODE DESCRIPTIONS.......................................................................................................... 42
Preliminary
3
Concept2 PM3 Communication Interface Definition
Purpose and Scope
This document contains the communications interface definition for the Concept2 PM3. The PM3 is the
performance monitor for the indoor rower providing the ability to communicate with a host PC utilizing
Universal Serial Bus (USB) media.
Feedback on this document and the SDK itself should be provided via the protected forum
(http://concept2.ipbhost.com) for software developers. Your protected forum password should have
already been provided to you. If not, please contact Scott Hamilton (rowing@concept2.com) at
Concept2.
Document History
Table 1 - Document Modification History
Edit Date
5/25/04
6/09/04
6/10/04
6/11/0
6/14/04
6/29/04
9/9/04
Engineer
Mark Lyons
Mark Lyons
Mark Lyons
Mark Lyons
Mark Lyons
Mark Lyons
Mark Lyons
Description of Modification
Created from Engineering Notes, rev 0.01
Updated, rev 0.02
Released for review
Minor updates , rev 0.03
Updated, rev 0.04
Minor updates, rev 0.05
Minor updates and added PM3 error codes, rev 0.06
Related Documents
Table 2 - Related Documents
Document Title
CSAFE Protocol Technical Specification, V1.x
Concept2 PM3 Firmware Revision History
Concept2 PM3 Software Development Kit Revision History
Preliminary
Document Number - Date
http://www.fitlinxx.com/csafe/
(TBD)
(TBD)
4
Concept2 PM3 Communication Interface Definition
Overview
The PM3 communication protocol is intended for use over the following physical interfaces: Universal
Serial Bus (USB). The PM3 protocol is based on the CSAFE protocol that is targeted at supporting
communications between physical fitness equipment and a host PC. Extensions to the CSAFE protocol are
employed to provide the PM3-specific functionality not supported by the generic protocol while
maintaining compatibility.
The communication protocol possesses the following basic features:
•
•
•
•
•
•
•
Self-starting frame structure with data transparency over numerous physical interfaces
Simple state machine model for master/slave interactions
“Speak-when-spoken-to” configuration with the option for well-defined unsolicited response
communication
Point-to-point and point-to-multi-point network configurations
Error detection
Standardized data formats for time, distance, etc.
Extensibility by virtue of equipment vendor identification and vendor custom command definitions
The following sections provide the communication protocol definition including the physical, data link,
network, and transport layer aspects for each interface.
Data Flow
The following sections summarize the data used by a host PC for controlling, configuring, and monitoring a
single PM3. The data flow is separated into data originating from the PM3 or from the host PC. The
various data along with the size and update rate requirement serve to establish the commands/responses that
exist within the communication protocol. Certain data may be included in more than one
command/response if dictated by the data flow requirements.
Preliminary
5
Table 3 - PM3 Configuration/Data to PC
Parameter
Description
Slave Status
Workout Duration
Slave status
Work time duration of
workout
Work distance of workout
Horizontal
Distance
Pace
Power
Accumulated
Calories
Cadence
Current Heart
Rate
Product Version
HW Serial
Number
User ID Nu mber
Capabilities
Time elapsed per unit distance
for a given stroke
Power generated based on the
pace per stroke
Accumulated calories burned
Update Rate
(max)
Per Request
10 Hz
Units
(Resolution)
N/A
N/A
Precision
Bytes
CSAFE Command
N/A
HMS4
0
3
CSAFE_GETSTATUS_CMD
CSAFE_GETTWORK_CMD
10 Hz1
Meters
(1 m)
Sec/Km
Integer
2
CSAFE_GETHORIZONTAL_CMD
Integer
2
CSAFE_GETPACE_CMD
Integer
2
CSAFE_GETPOWER_CMD
Integer
2
CSAFE_GETCALORIES_CMD
Integer
1
CSAFE_GETCADENCE_CMD
Integer
1
CSAFE_GETHRCUR_CMD
2 Hz2
(per stroke)
2 Hz
(per stroke)
2 Hz
(per stroke)
2 Hz
(per stroke)
1 Hz
Manufacturer ID, CID, Model,
HW Version, Application FW
Version
Hardware serial number
Per Request
Watts
(1 w)
Calories
(1 cal)
Strokes/Min
(1 stroke)
Beats/Min
(1 beat)
Numeric
Per Request
ASCII
Integer
9
CSAFE_GETSERIAL_CMD
User identifier number
Device capabilities
Protocol:
1. Max Rx Frame bytes
2. Max Tx Frame bytes
3. Min Interframe gap
(msec.)
Power:
Not Applicable (all zeroes
returned)
Per Request
Per Request
Numeric
Numeric
Integer
Integer
3 – 53
3 – 115
CSAFE_GETID_CMD
CSAFE_GETCAPS_CMD
Strokes per minute for per
stroke
Current heart beats per minute
CSAFE_GETVERSION_CMD
Integer
Concept2 PM3 Communication Interface Definition
Text:
Not Applicable (all zeroes
returned)
Error Code
Last error code (see User
Programmer’s Guide) latched
and cleared after reading
PM3 Specific Commands
Work Time
Work time duration of
workout (high resolution)
Work Distance
Note: this is the time seen on
the display, not necessarily
the elapsed time
Work distance of workout
Drag Factor
Note: this is the distance
seen on the display, not
necessarily the accumulated
distance
Drag factor
Stroke State
State of stroke logic:
0. Waiting for wheel to
reach min. speed
1. Waiting for wheel to
accelerate
2. Driving
3. Dwelling after drive
4. Recovery
Note: Catch would be the
transition from recovery to
driving. End-of-stroke would
be the transition from driving
to dwelling after drive
Workout Type
Workout Type:
Per Request
Enumeration
Integer
3
CSAFE_GETERRORCODE_CMD
10 Hz
Seconds
(.01 sec)
Integer
4
CSAFE_SETUSERCFG1_CMD
+
CSAFE_PM_GET_WORKTIME
10 Hz
Meters
(1 m)
Integer
4
CSAFE_SETUSERCFG1_CMD
+
CSAFE_PM_GET_WORKDISTANCE
2 Hz
(per stroke)
N-M-Sec2
Integer
1
100 Hz
Enumeration
Integer
1
CSAFE_SETUSERCFG1_CMD
+
CSAFE_PM_GET_DRAGFACTOR
CSAFE_SETUSERCFG1_CMD
+
CSAFE_PM_GET_STROKESTATE
Per Workout
Enumeration
Integer
1
Preliminary
CSAFE_SETUSERCFG1_CMD
+
7
Concept2 PM3 Communication Interface Definition
0.
1.
2.
3.
4.
5.
6.
7.
8.
Notes:
1.
2.
3.
4.
5.
CSAFE_PM_GET_WORKOUTTYPE
Just Row/no splits
Just Row/splits
Fixed Distance/no
splits
Fixed Distance/splits
Fixed Time/no splits
Fixed Time/splits
Fixed Time Interval
Fixed Distance
Interval
Variable Interval
At 2000 rpm of flywheel (2000 rpm/60 seconds/m x 3 tics/revolution x 1/12.93 tics/meter = 7.7 meters/second)
At 100 strokes/min
Dependent on configuration
Hours/Minutes/Seconds in byte format
Dependent on capability code
Preliminary
8
Table 4 - PC Configuration/Data to PM3
Parameter/
Function
CSAFE Machine
State
CSAFE Machine
Reset
User ID Digits
Bad User ID
Time of Day
Date
State Timeout
Workout Time
Horizontal
Distance
Power Target
Program
Description
Sets PM3 to one of the
CSAFE machine states:
0. Error
1. Ready
2. Idle
3. Have ID
4. <unassigned>
5. In Use
6. Paused
7. Finished
8. Manual
9. Offline
Reset CSAFE state machine
and related parameters
Number of user ID digits to
accept ( 2 – 5)
Invalid User ID
Time of day
Date
Timeout period for exiting
certain states
Workout time goal
Horizontal distance goal
Update Rate
(max)
Per Command
Units
(Resolution)
N/A
Precision
Bytes
CSAFE Command
N/A
0
CSAFE_GOREADY_CMD,
CSAFE_GOIDLE_CMD,
CSAFE_GOHAVEID_CMD,
CSAFE_GOINUSE_CMD,
CSAFE_GOFINISHED_CMD
Per Command
N/A
N/A
0
CSAFE_RESET_CMD
Per Command
N/A
Integer
1
CSAFE_IDDIGITS_CMD
N/A
N/A
N/A
Seconds
(1 sec)
N/A
Units
Specifier
Watts
(1 w)
Enumeration
N/A
HMS1
YMD2
Integer
0
3
3
1
CSAFE_BADID_CMD
CSAFE_SETTIME_CMD
CSAFE_SETDATE_CMD
CSAFE_SETTIMEOUT_CMD
HMS
Integer
2
2
CSAFE_SETTWORK_CMD
CSAFE_SETHORIZONTAL_CMD
Integer
2
CSAFE_SETPOWER_CMD
Integer
2
CSAFE_SETPROGRAM_CMD
Per
Per
Per
Per
Command
Command
Command
Command
Per Workout
Per Workout
Power goal
Per Workout
Programmed/ pre-stored
workouts 3 :
0. Programmed
1. Standard List #1
2. Standard List #2
Per Workout
Concept2 PM3 Communication Interface Definition
User Information
3. Standard List #3
4. Standard List #4
5. Standard List #5
6. Custom List #1
7. Custom List #2
8. Custom List #3
9. Custom List #4
10. Custom List #5
11. Favorites List #1
12. Favorites List #2
13. Favorites List #3
14. Favorites List #4
15. Favorites List #5
User information including:
1. Weight (0 – 999 lbs/
0 – 454 kg)
2. Age (0 – 255)
3. Gender (0: None, 1:
Male, 2: Female)
PM3 Specific Commands
Split Duration
Time duration of a split
Time
Split Duration
Distance
Distance duration of a split
Per Command
Weight
(0.25
lb/0.125 kg)
Age
(1 year)
Gender
(Enum)
Integer
5
Per Workout
Seconds
(.01 sec)
Integer
4
Per Workout
Meters
(1 m)
Integer
4
CSAFE_SETUSERINFO_CMD
CSAFE_SETUSERCFG1_CMD
+
CSAFE_PM_SET_SPLITDURATION
CSAFE_SETUSERCFG1_CMD
+
CSAFE_PM_SET_SPLITDURATION
Notes:
1. Hours/Minutes/Seconds in byte format
2. Year/Month/Day in byte format
3. “Programmed” workout takes either workout time or horizontal distance goals to set-up a “fixed time” or “fixed distance” workout; “Favorites #1 – 5”
are only available if a logcard is present. “Standard List” workouts defined in
Preliminary
10
Protocol Framework
In the CSAFE protocol, communication between the master and the slave(s) device is accomplished using
two basic frame types: standard frame and extended frame. The standard frame provides no provisions for
slave-to-slave communication or multi-drop network configurations, as device addressing is implicit. The
PM3 application requires explicit device addressing for numerous scenarios (as provided by the extended
frame format) so that both frame types will be handled for our implementation. In general, the slave device
only speaks when responding to a master’s request. Certain exceptions may be made in very specific
circumstances.
The extended frame is defined as stream of bytes with the structure shown in Figure 2. Note that the
standard and extended frames are identical with the exception of the frame -unique start flag and the device
address information. The start flags and stop flag are unique values used to delineate the frame and,
therefore, cannot appear in the frame contents or the checksum. A byte-stuffing technique is employed to
ensure that these unique bytes do not occur elsewhere in the frame. A checksum is included in the frame to
allow both the master and slave devices to verify the integrity of the “Frame Contents”. Neither an
acknowledgement (ACK) nor negative acknowledgement (NAK) at the frame level is an integral part of the
protocol.
Figure 1 - Standard Frame Format
Standard Start
Flag
Frame
Contents
Checksum
Stop Flag
Figure 2 - Extended Frame Format
Extended Start
Flag
Destination
Address
Source
Address
Frame
Contents
Checksum
Stop Flag
Frame Structure
The frame structure is a stream of bytes with a unique start byte, optional addressing, frame contents (e.g.,
commands and responses), a checksum and a unique stop byte. The unique start and stop byte values are
shown in Table 6. In order to ensure that these start and stop values do not appear anywhere in the frame,
the master and slave devices perform “byte-stuffing” and “byte-unstuffing” on the byte stream (i.e., frame
contents including extended frame addresses and checksum). This technique can be performed “on the fly”
without impacting the data stream buffering requirements since the extra bytes only exist on the data link.
The extended frame addressing rules are summarized in Table 5.
Table 5 - Extended Frame Addressing
Address
0x00
0x01 – 0xFC
0xFD
0xFE
0xFF
Description
PC Host (master)
<unassigned>
Default slave address
Reserved for expansion
“Broadcast” accepted by all slaves
Concept2 PM3 Communication Interface Definition
The “byte-stuffing” algorithm simply substitutes two bytes for each of the unique bytes listed in Table 6.
The unique Byte Stuffing Flag is followed by a 0x00, 0x01, 0x02, or 0x03 as shown in Table 7 depending
on the byte being replaced. The impact of this technique on the data link is that the frame size could
increase in size by a factor of two in the worst case.
Table 6 - Unique Frame Flags
Description
Extended Frame Start Flag
Standard Frame Start Flag
Stop Frame Flag
Byte Stuffing Flag
Value
0xF0
0xF1
0xF2
0xF3
Table 7 - Byte Stuffing Values
Frame Byte Value
0xF0
0xF1
0xF2
0xF3
Byte-Stuffed Value
0xF3, 0x00
0xF3, 0x01
0xF3, 0x02
0xF3, 0x03
The frame beginning and end are designated by the unique Start and Stop bytes. If a Start or Stop byte is
missed, the frame is discarded and frame resynchronization occurs at the beginning of the next frame.
Once a full frame is received and all “byte-unstuffing” is performed, a one-byte checksum is computed
with byte-by-byte XORing of the frame contents to verify frame integrity. The frame definition does not
explicitly place any limits on the frame length. Because the entire frame contents must be buffered before
computing the checksum, memory resources on the slave devices typically establish the restrictions on
frame length. For CSAFE protocol compatibility, the following frame length restrictions are invoked for
the PM3 USB physical link:
•
•
A maximum frame size of 96 bytes including start/stop flags, checksum and byte stuffing
All flow control handled natively as part of USB
Frame Contents
The frame protocol transports frame content data consisting of both commands and responses. The only
restrictions on the frame contents relate to length of frame and the requirement that individual commands/
responses do not straddle a frame boundary (i.e., no partial commands/responses within a frame). The
following sections detail the command and response formats.
Command Format
All commands have one of two basic formats: long command or short command. Long commands are
those including command data while short commands are command only. The command is represented by
a single byte with the command address space partitioned equally (i.e., long commands have MS bit clear
and short commands have MS bit set). Figure 3 and Figure 4 illustrate the long and short command
formats, respectively.
Figure 3 - Long Command Format
Long Command
Data Byte Count
Data
Figure 4 - Short Command Format
Preliminary
12
Concept2 PM3 Communication Interface Definition
Short Command
In the long command format, the Long Command and Data Byte Count fields are single bytes. The Data
Byte Count field determines the Data field size. The short command format consists solely of the single
byte Short Command. Table 8 summarizes the command field types for both the long and short commands.
Note that the command formats allows a long command with a Data Byte Count of 0 and no bytes in the
Data field. The virtue of the Data Byte Count field in the long command is to allow slave devices to handle
unrecognized commands by merely disregarding the command and its data while continuing to process
succeeding commands within the same frame.
Table 8 - Command Field Types
Description
Long Command
Short Command
Data Byte Count
Data
Size (Bytes)
1
1
1
Variable
Value
0x00 – 0x7F
0x80 – 0xFF
0 - 255
0 - 255
Multiple complete commands can be included in a single frame, but no partial commands or responses are
allowed. Sending a frame consisting of multiple commands to a slave device results in a frame consisting
of multiple command responses.
Response Format
All responses have the same Frame Contents format as shown in Figure 5.
Figure 5 - Response Frame Contents For mat
Status
Command Response Data
Figure 6 - Individual Command Response Format
Identifier
Data Byte Count
Data
Table 9 - Response Field Types
Description
Status
Command Response Data
Identifier
Data Byte Count
Data
Size (Bytes)
1
Variable
1
1
Variable
Value
0x00 – 0x7F
0 - 255
0x00 – 0xFF
1 - 255
0 - 255
PM3 Manufacturer Information
Table 10 summarizes the Concept2 PM3 product-specific information.
Table 10 - CSAFE Concept2 PM3 Information
Product Information
Manufacturer ID
Description
22
Preliminary
13
Concept2 PM3 Communication Interface Definition
Class Identifier
Model
Maximum Frame Length
Minimum Inter-frame Gap
2
3
96 Bytes
50 msec.
PM3 Extensions
The PM3 extensions to the frame protocol involve utilizing one pre-defined custom command that serves as
a “wrapper” for additional PM3-specific commands. The one command is defined in Table 11. The one
custom command wrapper is used to expand the CSAFE command set for additional configuration and data
operations. See Appendix A for a detailed explanation of the command wrapper implementation.
Table 11 - PM3 -Specific CSAFE Command Wrappers
Command Name
CSAFE_SETUSERCFG1_CMD
Command
Identifier
0x1A
Additional PM3 proprietary extensions to the frame protocol involve utilizing four commands added to the
existing CSAFE protocol command set that serve as “wrappers” for the PM3 command set. The four
commands are defined in Table 12. The four command wrappers are used to partition the PM3 command
set space into “push” (i.e., set) and “pull” (i.e., get) operations for configuration and data. The use of these
command wrappers allow the PM3 to support existing CSAFE protocol commands while introducing PM3
proprietary commands only accessible via the command set extension. These commands are not accessible
via the “public” interface and require special “authentication” with the PM3 to function.
Table 12 - PM3 Proprietary CSAFE Command Wrappers
Command Name
CSAFE_SETPMCFG_CMD
CSAFE_SETPMDATA_CMD
CSAFE_GETPMCFG_CMD
CSAFE_GETPMDATA_CMD
Command
Identifier
0x76
0x77
0x7E
0x7F
Protocol Layer Definition
Universal Serial Bus
Physical Layer
USB Version 1.10 operating at full speed (12 Mb/s).
Table 13 - USB Series B Receptacle Mechanical
Preliminary
14
Concept2 PM3 Communication Interface Definition
Table 14 - USB Series B Receptacle Connector Pin-out
Pin #
1
2
3
4
Signal Name
VBUS (+5V)
DATADATA+
GND
Data Link Layer
In general, USB transactions consist of
•
Token Packet (Header defining what it expects to follow), an
•
Optional Data Packet, (Containing the payload) and a
•
Status Packet (Used to acknowledge transactions and to provide a means of error correction)
USB is a host centric bus. The host initiates all transactions. The first packet, also called a token is
generated by the host to describe what is to follow and whether the data transaction will be a read or write
and what the device’s address and designated endpoint is. The next packet is generally a data packet
carrying the payload and is followed by a handshaking packet, reporting if the data or token was received
successfully, or if the endpoint is stalled or not available to accept data.
Data on the bus is transmitted LS bit first. USB packets consist of the following fields,
Sync
All packets must start with a sync field. The sync field is 8 bits long at low and full speed or 32 bits long
for high speed and is used to synchronize the clock of the receiver with that of the transmitter. The last two
bits indicate where the PID fields starts.
PID
PID stands for Packet ID. This field is used to identify the type of packet that is being sent. The following
table shows the possible values.
Group
Token
Data
Handshake
Special
PID Value
0001
1001
0101
1101
0011
1011
0111
1111
0010
1010
1110
0110
1100
1100
1000
0100
Packet Identifier
OUT Token
IN Token
SOF Token
SETUP Token
DATA0
DATA1
DATA2
MDATA
ACK Handshake
NAK Handshake
STALL Handshake
NYET (No Response Yet)
PREamble
ERR
Split
Ping
There are 4 bits to the PID, however to insure it is received correctly, the 4 bits are complemented and
repeated, making an 8-bit PID in total. The resulting format is shown below.
Preliminary
15
Concept2 PM3 Communication Interface Definition
PID0
§
PID1
PID2
PID3
nPID0
nPID1
nPID2
nPID3
ADDR
The address field specifies which device the packet is designated for. Being 7 bits in length allows
for 127 devices to be supported. Address 0 is not valid, as any device which is not yet assigned an
address must respond to packets sent to address zero.
§
ENDP
The endpoint field is made up of 4 bits, allowing 16 possible endpoints. Low speed devices,
however can only have 2 additional endpoints on top of the default pipe. (4 endpoints max)
§
CRC
Cyclic Redundancy Checks are performed on the data within the packet payload. All token
packets have a 5 bit CRC while data packets have a 16 bit CRC.
§
EOP
End of packet. Signaled by a Single Ended Zero (SE0) for approximately 2 bit times followed by a
J for 1 bit time.
USB has four different packet types. Token packets indicate the type of transaction to follow, data packets
contain the payload, and handshake packets are used for acknowledging data or reporting errors and start of
frame packets indicate the start of a new frame.
§
Token Packets
There are three types of token packets,
§
In - Informs the USB device that the host wishes to read information.
§
Out - Informs the USB device that the host wishes to send information.
§
Setup - Used to begin control transfers.
Token Packets must conform to the following format,
Sync
§
PID
ADDR
ENDP
CRC5
EOP
Data Packets
There are two types of data packets each capable of transmitting up to 1024 bytes of data.
§
Data0
§
Data1
§
High Speed mode defines another two data PIDs, DATA2 and MDATA.
Data packets have the following format,
Sync
PID
Data
CRC16
EOP
§
Maximum data payload size for low-speed devices is 8 bytes.
§
Maximum data payload size for full-speed devices is 1023 bytes.
Preliminary
16
Concept2 PM3 Communication Interface Definition
§
§
Maximum data payload size for high-speed devices is 1024 bytes.
§
Data must be sent in multiples of bytes.
Handshake Packets
There are three types of handshake packets which consist simply of the PID
§
ACK - Acknowledgment that the packet has been successfully received.
§
NAK - Reports that the device temporary cannot send or received data. Also used during
interrupt transactions to inform the host there is no data to send.
§
STALL - The device finds its in a state that it requires intervention from the host.
§
Handshake Packets have the following format,
Sync
§
PID
EOP
Start of Frame Packets
The SOF packet consisting of an 11-bit frame number is sent by the host every 1ms ± 500ns on a
full speed bus.
Sync
PID
Frame Number
CRC5
EOP
Specifically, the PM3 enumerates itself as a Human Interface Device (HID) with a control endpoint and
two interrupt endpoints (IN/OUT).
Table 15 - PM3 USB Definitions
Parameter
Bus Specification
Bus Speed
Control Endpoint Max Pkt Size
Device Description
Interface Description
Manufacturer string
Product string
Endpoints
Reports
Description
USB 1.10
Full-speed (12 Mbits/sec)
8 bytes
Bus powered (98 mA max), 1 interface configuration (0)
Human Interface Device (HID)
“Concept2”
“Concept2 Performance Monitor 3 (PM3)”
IN: Interrupt/EP3/polling rate: 4 msec.
OUT: Interrupt/EP4/polling rate: 1 msec.
ID #1 – 20 bytes + 1 byte report ID
ID #2 – 120 bytes + 1 byte report ID
Network and Transport Layers
The CSAFE protocol provides both the network and transport layer functionality over USB. The
packetization, integrity checking, and node addressing is supported by the protocol. The frame size has
been increased to 96 byte from the 32 bytes specified for the asynchronous serial interface.
Preliminary
17
Concept2 PM3 Communication Interface Definition
Protocol Features
Default Configuration
Individual manufacturers specify certain protocol parameters (e.g., timeouts, auto response behavior, etc.).
Table 16 summarizes the protocol defaults for the PM3. Note that certain parameters listed in Table 16
cannot be changed (refer to the section on Unsupported Features for additional information).
Table 16 - PM3 CSAFE Protocol Defaults
Parameter
HaveID State
Transition Timeout
Default
Value
10 seconds
Inactivity During
InUse State Timeout
6 seconds
Inactivity During
Pause State Timeout
220 seconds
Units Type
User ID Digits
Metric
5
User ID
AutoUpload Byte
00000
0x10
Serial Number Digits
PM3-specific
Commands
9
All states
Comments
This timeout (settable via the cmdSetTimeout command)
defines the delay between entering the HaveID state and
transitioning back to the Idle state
This timeout defines the duration of inactivity during the
InUse state (once the workout has begun) before entering the
Paused state
This timeout defines the duration of inactivity during the
Paused state (once the workout has begun) before entering
the Finished state
Metric units only
Five-digit user ID (settable via the cmdIDDigits from 2 – 5
digits)
flgAutoStatus: Disabled (cannot be changed)
flgUpStatus: Disabled (cannot be changed)
flgUpList: Disabled (cannot be changed)
flgAck : Enabled (cannot be changed)
flgExternControl: Disabled (cannot be changed)
Number of digits in serial number response
These commands are accessible in all slave states
Unsupported Features
Individual manufacturers also determine which protocol features will not be supported by their equipment.
Table 17 summarizes the unsupported protocol features and the deviations from other features. In addition,
the status of implementation for each CSAFE command is included in Appendix A.
Table 17 - PM3 Unsupported CSAFE Protocol Features
Feature
AutoStatus Enable
UpList Enable
Ack Disable
Text Messaging
Set User Information
Get User Information
Finished State Timeout
InUse State Entry
Comments
No unsolicited status uploads
No unsolicited command list uploads
All commands will be responded to by a least a status byte
No text messaging functions
Not setting user weight, age and gender
User weight is fixed at 175 lbs, age and gender not supported
No Finished state timeout is employed to cause a transition back to the
Idle state; when a user hits the MENU/BACK to conclude viewing a
finished workout result or terminate a workout in progress, the Ready
state is entered
In addition to allowing entry into the InUse state from the Idle and
Preliminary
18
Concept2 PM3 Communication Interface Definition
Set Calories Goal
HaveID states, entry from the Ready state is also allowed
Since the PM3 allows the user to select display units (either
time/meters, watts or calories), setting the workout goal using power is
sufficient to define a target pace for the pace boat display for all
display units.
Command and Response Definitions
Workouts
Configuring a Programmed Workout
The following steps are required to configure the workout parameters and put the PM3 screen in the proper
state prior to rowing commencement:
•
•
•
Set all pertinent workout parameters including either workout time (fixed time workout) or
horizontal distance goal (fixed distance workout), and time/distance split duration (if not using
default values). Time split duration used for “fixed time” workout and distance split duration used
for “fixed distance” workout.
If a power/calories goal is desired to control the paceboat, the proper goal value must be
configured.
Configure the programmed workout using the previously set workout parameters, and direct the
PM3 to initialize the workout display parameters and go to the proper rowing screen in preparation
for beginning the workout.
The following is a sample CSAFE command sequence for configuring a 2000m fixed piece with a split
duration of 500 m and a power goal of 300 watts:
0x21 0x03 0x02 00 0x21
(CSAFE_SETHORIZONTAL_CMD, 2 x Km units specifier)
0x1A 0x07 0x05 0x05 0x80 0xF4 0x01 0x00 0x00
(CSAFE_SETUSERCFG1_CMD,
CSAFE_PM_SET_SPLITDURATION, distance, 500m)
0x34 0x03 0x2C 0x010x58
(CSAFE_SETPOWER_CMD, 300 x Watts unit specifier)
0x24 0x02 0x00 0x00
(CSAFE_SETPROGRAM_CMD, programmed workout)
Note that this complete sequence of commands can combined as follows with the same result:
0x21 0x03 0x02 00 0x21 0x1A 0x07 0x05 0x05 0x80 0xF4 0x01 0x00 0x00 0x34 0x03 0x2C 0x010x58
0x24 0x02 0x00 0x00
The following is a sample CSAFE command sequence for selecting the first standard list (predefined)
workout in the PM3:
0x24 0x02 0x01 0x00
(CSAFE_SETPROGRAM_CMD, standard list workout #1)
PC-Host Dynamic Link Library (DLL) and Application
Programming Interface (API)
Overview
Preliminary
19
Concept2 PM3 Communication Interface Definition
PC-based host applications can communicate with PM3s over multiple physical interfaces using the DLLs.
These include: Universal Serial Bus (USB).
The following sections describe the architecture and interface details of the DLLs.
Architecture
For User applications, the PM3 utilizes a protocol architecture based on CSAFE, a protocol that is targeted
at supporting communications between physical fitness equipment and a host PC. Extensions to the
CSAFE protocol are employed to provide PM3-specific functionality not supported by the generic protocol
while maintaining compatibility.
The system architecture also supports other protocols in addition to CSAFE, including PM3 proprietary
protocols for maintenance and system testing.
PM3 Device Discovery & Interface
(PM3DDI.DLL)
The PM3 Device Discovery & Interface DLL is central to all types of applications that communicate with
PM3s. It provides a means for applications to identify, initialize and communicate with PM3s, as well as to
discover the network topology upon which the PM3s reside. The Device Discovery interface centralizes
the various addressing schemes used by the Media Interfaces, and exposes a unified, global address map to
the application.
Incorporated within this DLL is a generic command/response engine. It relies on the other DLLs at the API
layer for protocol-specific information (e.g. CSAFE protocol vs. PM3 proprietary protocol for
implementing Flash download).
Media Interfaces
These interfaces are generally not called from the application layer, as they are meant to communicate
between the Device Discovery Interface and the hardware specific windows drivers. They provide
implementations of communications interfaces specific to the hardware and WDM layers. Each media
interface has unique methods for identifying and addressing PM3s (See “PM3 Comm Protocol xxx.doc”
for more information on address discovery and assignment). It is up to the Device Discovery interface to
consolidate these unique addressing schemes into a unified address mapping.
USB Interface
(RPPM3USB.DLL)
This media interface implements a Human Interface Device (HID) class connection with the PM3s over a
USB connection. The USB HID Class enumeration process performed by the built-in WDM functions
provides unique addressing information for each connected PM3.
802.xx Interface (wireless or wired network)
(tbd)
Asynchronous Interface (RS232/485)
(tbd)
CSAFE+ Command Interface
(RPPM3CSAFE.DLL, RPPM3CSAFE.INI, RPPM3CSAFE.LIB)
The CSAFE+ Command Interface DLL exposes CSAFE commands to the application and provides the
proprietary protocol-specific commands/responses that allow the implementation of the CSAFE protocol
over the PM3 network. Extensions to the CSAFE protocol (hence the name CSAFE+) provide additional
Preliminary
20
Concept2 PM3 Communication Interface Definition
proprietary functionality specific to PM3s. These proprietary commands are only available if the host PC
has performed the prescribed “authentication” process with the PM3.
At run-time, the DLL reads in an initialization text file that contains the definition and format of all of the
supported PM3 proprietary CSAFE commands/responses. When a command is issued by the calling
application, the DLL indexes the appropriate command/response object, and passes it to the PM3 Interface.
The PM3 Interface sends the command via the correct media interface, receives the response data, and then
returns it back to the CSAFE DLL, which returns the data to the calling application.
This initialization file architecture allows new commands to be implemented without having to recompile
the DLL code. New commands can be implemented using a text editor. Alternatively, giving this power
and flexibility to the user has its’ dangers, as incorrect modification of the .INI file can lead to
unpredictable behavior of the DLL.
Preliminary
21
Concept2 PM3 Communication Interface Definition
User Application API
The PM3 User Application Programming Interface (API) is based upon and fully supports the CSAFE
protocol (see http://www.fitlinxx.com/csafe/specification.htm). The PM3 User API is comprised of two
DLLs: one is utilized to provide discovery functions (Version #’s, PM3 device discovery, addressing and
status), and the other is used to implement the CSAFE command set, including an extended version of
CSAFE to handle PM3 proprietary functionality.
The DLL functions are detailed in the sections below.
PM3 Device Discovery & Interface API
(PM3DDI.DLL, PM3DDI.H, PM3DDI.LIB)
Data Type Definitions
The following data types are utilized in this DLL:
unsigned char
UINT8
unsigned short UINT16
unsigned long
UINT32
char
INT8
short
INT16
long
INT32
unsigned char
BOOLEAN
float32
FLOAT32
float64
FLOAT64
INT16_T
ECODE_T
Function Reference
tkcmdsetDDI_init
About: Initializes the DLL error code interface and media interfaces (e.g. USB, 802.11, Async).
Inputs: None
Outputs: None
Returns: ERRCODE_T ecode
Zero if successful
Error code otherwise
Function Prototype:
PM3CMD_API ERRCODE_T tkcmdsetDDI_init(void);
tkcmdsetDDI_shutdown
About: Shuts down the Command Set Toolkit functions.
Inputs: UINT16_T
port
Communication port to use
Outputs: None
Returns: ERRCODE_T ecode
Zero if successful
Error code otherwise
Function Prototype:
PM3CMD_API ERRCODE_T tkcmd setDDI_shutdown(UINT16_T port);
Preliminary
22
Concept2 PM3 Communication Interface Definition
tkcmdsetDDI_discover_pm3s
About: Discover all PM3 devices connected to the PC via various
media interfaces. Create a PM3 device map that correlates
consecutive unit identifiers to each device port number and
media interface location. Note that the calling function
provides the starting address of the unit ID.
Inputs: INT8_T *product_name
UINT16_T starting_address
Name of product to discover
Address of first unit
Outputs: UINT16_T *num_units
Number of devices found
Returns: ERRCODE_T ecode
Zero if successful
Error code otherwise
Function Prototype:
PM3CMD_API ERRCODE_T tkcmdsetDDI_discover_pm3s( INT8_T *product_name ,
UINT16_T starting_address, UINT16_T *num_units);
tkcmdsetDDI_fw_version
About: Reads the firmware version information from the PM3
Inputs: UINT16_T unit_address Address of PM
Outputs: UINT8_T * ver_ptr
FW version string stored at this location
Returns: ERRCODE_T ecode
Zero if successful
Error code otherwise
Function Prototype:
PM3CMD_API ERRCODE_T tkcmdsetDDI_fw_version(UINT16_T unit_address, UINT8_T *
ver_ptr);
tkcmdsetDDI_hw_version
About: Reads the hardware version information from the PM3
Inputs: UINT16_T unit_address Address of PM
Outputs: UINT8_T * ver_ptr
HW version string stored at this location
Returns: ERRCODE_T ecode
Zero if successful
Error code otherwise
Function Prototype:
PM3CMD_API ERRCODE_T tkcmdsetDDI_hw_version(UINT16_T unit_address, UINT8_T *
ver_ptr);
tkcmdsetDDI_serial_number
About: Reads the serial number information from the PM3
Inputs: UINT16_T unit_address Address of PM
Preliminary
23
Concept2 PM3 Communication Interface Definition
Outputs: UINT8_T * ser_ptr
Serial number string stored at this location
Returns: ERRCODE_T ecode
Zero if successful
Error code otherwise
Function Prototype:
PM3CMD_API ERRCODE_T tkcmdsetDDI_serial_number(UINT16_T unit_address, UINT8_T
* ser_ptr);
tkcmdsetDDI_special
About:
Performs special operations based on the command
Inputs: UINT16_T unit_address Address of PM
UINT16_T cmd
Special command to execute
UINT32_T in_data
Value to send with command
Outputs: UINT32_T * out_data
Location to store value returned with response
Returns: ERRCODE_T ecode
Zero if successful
Error code otherwise
Function Prototype:
PM3CMD_API ERRCODE_T tkcmdsetDDI_special(UINT16_T unit_address, UINT16_T cmd,
UINT32_T in_data, UINT32_T *out_data);
tkcmdsetDDI_get_dll_version
About: Returns the current version number of this DLL.
Inputs: None
Outputs: None
Returns: UINT16_T
ver_info
High byte is major version number
Low byte is minor version number
Function Prototype:
PM3CMD_API UINT16_T tkcmdsetDDI_get_dll_version(void);
tkcmdsetDDI_get_error_name
About: Returns the name of the error associated with the code
Inputs: ERRCODE_T ecode
UINT16_T namelen
Outputs: char * nameptr
Code to be looked up
Maximum length of name string
Location to place name string
Returns: ERRCODE_T ecode
Zero if successful
Error code otherwise
Function Prototype:
PM3CMD_API ERRCODE_T tkcmdsetDDI_get_error_name(ERRCODE_T ecode,char *
nameptr,UINT16_T namelen);
Preliminary
24
Concept2 PM3 Communication Interface Definition
tkcmdsetDDI_get_error_text
About: Returns the text description of the error associated with the code
Inputs: ERRCODE_T ecode
UINT16_T namelen
Code to be looked up
Maximum length of text description string
Outputs: char * nameptr
Location to place text description string
Returns: ERRCODE_T ecode
Zero if successful
Error code otherwise
Function Prototype:
PM3CMD_API ERRCODE_T tkcmdsetDDI_get_error_text(ERRCODE_T ecode,char *
textptr,UINT16_T textlen);
tkcmdsetDDI_init_protocol
About: Initialize a protocol engine that will be used for device
communications. This is typically called by an external
DLL to setup a specific communications protocol.
NOTE: This is not typically called by the application directly.
Inputs: ERRCODE_T *frame_builder()
ERRCODE_T *frame_checker()
UINT16_T timeout
UINT16_T buffer_size
UINT8_T retries
Ptr to frame builder function
Ptr to frame checker function
Command/response time out in MS
Max frame size
Number of command retries
Outputs: None
Returns: ERRCODE_T ecode
Zero if successful
Error code otherwise
Function Prototype:
PM3DDI_API ERRCODE_T tkcmdsetDDI_init_protocol(ERRCODE_T (*) (UINT8_T *,
UINT8_T *, UINT16_T *), ERRCODE_T (*) (UINT8_T *, UINT8_T *, UINT16_T *),UINT16_T
timeout, UINT16_T buffer_size, UINT8_T retries);
tkcmdsetDDI_do_protocol
About: Utilizing the protocol engine that was previously setup
in tkcmdsetDDI_init_protocol(), build and send a command
frame, then receive and check a response frame.
If the frame is valid, return the data.
This is typically called by an external DLL to implement
a specific communications protocol.
NOTE: This is not typically called by the application directly
Inputs: UINT16_T port
UINT16_T *num_cmd_bytes
UINT8_T *cmd_data
Identifier for device
Number of data bytes to send
Data bytes to send
Outputs:UINT16_T *num_rsp_bytes
UINT8_T *response
Number of received bytes
Response byte
Preliminary
25
Concept2 PM3 Communication Interface Definition
Returns: ERRCODE_T ecode
Zero if successful
Error code otherwise
Function Prototype:
PM3DDI_API ERRCODE_T tkcmdsetDDI_do_protocol(UINT16_T port,
UINT16_T *num_cmd_bytes, UINT8_T *cmd_data,
UINT16_T *num_rsp_bytes, UINT8_T *response)
CSAFE Interface API
(PM3CSAFE.DLL, PM3CSAFE.H, PM3CSAFE.LIB, PM3CSAFE.INI)
After the DLL has been initialized, the CSAFE+ command set is implemented using a single generic API
function. To accomplish this, the calling application maintains individual command and response buffers
(compris ed of arrays of 32-bit integers), passing the pointers to these buffers along with PM device
addressing and command information (see tkcmdsetCSAFE_command below).
Using CSAFE extended frame addressing, the DLL handles packing CSAFE frames, validating response
frames, and unpacking the data into the response array.
Important: The PM3CSAFE DLL requires the PM3CSAFE.INI initialization file to be present in order to
recognize PM3-proprietary CSAFE commands. The DLL reads in the data from the INI file and uses the
data to determine the data types expected for commands and responses. The DLL presents data to the
calling application in the return buffer according to type. For example, if a PM3 command returns six data
bytes comprised as a 2-byte integer and a 4 byte float, the data will be packed in two locations in the return
array (one location for each data type). The DLL also expects command data to be presented in this way,
which makes it a simpler interface for the application.
The DLL takes care of formatting the CSAFE frame appropriately, so the application need only send
commands and data (see examples below).
The DLL will pass standard CSAFE commands through without modification. Note however, that the
calling application must pass the data unpacked, as no data type checking/packing is done by the DLL.
Data count bytes must be included in standard CSAFE commands, whereas the count byte is not needed in
PM3 proprietary CSAFE commands.
Important: The CSAFE DLL does not currently allow extended CSAFE frames except with PM3
proprietary commands. Extended CSAFE frames (non-PM3 proprietary) can be sent using the DDI DLL
function, “tkcmdsetUSB_do_DDIcommand”.
The application program can optionally configure “streams” on selected PMs, which creates independent
data pipes for unsolicited data received from the PMs. (NOT IMPLEMENTED).
COMMAND EXAMPLES:
Standard CSAFE command – get status
Command data -> 00000080 (80 = get status)
Response data -> 00000080H 00000001H 00000001H (mirrored cmd, num response bytes, data)
PM3 Proprietary CSAFE command – get ERG
Command data -> 0000007E 00000050 00000032 (7e= GETPMCFG, 50= get ERG, 32= serial#)
Response data -> 0000007EH 00000050H 000000FDH (mirrored GETPMCFG cmd, mirrored get
ERG command, ERG= 253)
Preliminary
26
Concept2 PM3 Communication Interface Definition
PM3 Proprietary CSAFE command – get work time, get projected work time, get ERG
Command data -> 0000007E 000000A0 000000A1 00000050 00000032
Response data -> 0000007EH 000000A0H 00000000H 000000A1H 00000000H 00000050H
000000FDH (GETPMCFG, CMD, DATA, CMD, DATA, CMD, DATA)
tkcmdsetCSAFE_init_protocol
About: Initializes the DLL error code interface and configures the CSAFE protocol. Uses extended frame
addressing.
Inputs: UINT16_T
timeout
Command/response timeout in MS
(defaults to 1000ms (1 sec) if NULL)
Outputs: None
Returns: ERRCODE_T ecode
Zero if successful
Error code otherwise
Function Prototype:
PM3CSAFE_API ERRCODE_T tkcmdsetCSAFE_init_protocol(UINT16_T timeout);
tkcmdsetCSAFE_read_logblk8
About: Reads an 8-bit block of data from a logcard memory location.
Inputs: UINT16_T unit_address
UINT32_T logcard_address
UINT32_T byte_len
Address of PM device
Address of logcard memory to read
Number of bytes to be read
(0 returns all)
Outputs: UINT8_T * val_ptr8
UINT32_T * num_read
Location to store block of data read
Actual number of bytes read
Returns:
Zero if successful
Error code otherwise
ERRCODE_T ecode
Function Prototype:
PM3CSAFE_API ERRCODE_T tkcmdsetCSAFE_read_logblk8(UINT16_T unit_address,
UINT32_T logcard_address, UINT32_T byte_len, UINT8_T *val_ptr8, UINT32_T *num_read);
tkcmdsetCSAFE_command
About: Sends a CSAFE command to a PM device and returns
the response data. Note: the unit address is previously determined
using the DiscoverPM3s function in the PM3DDI DLL.
Inputs: UINT16_T unit_address
UINT16_T cmd_data_size
UINT32_T cmd_data[]
Address of PM device
Size of cmd data
Command data
Outputs:UINT16_T *rsp_data_size
UINT32_T rsp_data[]
Size of rsp data
Response data
Preliminary
27
Concept2 PM3 Communication Interface Definition
Returns: ERRCODE_T ecode
Zero if successful
Error code otherwise
Function Prototype:
PM3CSAFE_API ERRCODE_T tkcmdsetCSAFE_command(UINT16_T unit_address,
UINT16_T cmd_data_size, UINT32_T cmd_data[],
UINT16_T *rsp_data_size, UINT32_T rsp_data[]);
tkcmdsetCSAFE_get_dll_version
About: Returns the current version number of this DLL.
Inputs: None
Outputs: None
Returns: UINT16_T
ver_info
High byte is major version number
Low byte is minor version number
Function Prototype:
PM3CMD_API UINT16_T tkcmdsetCSAFE_get_dll_version(void);
tkcmdsetCSAFE_get_error_name
About: Returns the name of the error associated with the code
Inputs: ERRCODE_T ecode
UINT16_T namelen
Outputs: char * nameptr
Code to be looked up
Maximum length of name string
Location to place name string
Returns: ERRCODE_T ecode
Zero if successful
Error code otherwise
Function Prototype:
PM3CMD_API ERRCODE_T tkcmdsetCSAFE_get_error_name(ERRCODE_T ecode,char *
nameptr,UINT16_T namelen);
tkcmdsetCSAFE_get_error_text
About: Returns the text description of the error associated with the code
Inputs: ERRCODE_T ecode
UINT16_T namelen
Code to be looked up
Maximum length of text description string
Outputs: char * nameptr
Location to place text description string
Returns: ERRCODE_T ecode
Zero if successful
Error code otherwise
Function Prototype:
PM3CMD_API ERRCODE_T tkcmdsetCSAFE_get_error_text(ERRCODE_T ecode,char *
textptr,UINT16_T textlen);
tkcmdsetCSAFE_get_status
About:
Gets the CSAFE status byte from the previous transaction.
Preliminary
28
Concept2 PM3 Communication Interface Definition
Inputs:
Nothing
Outputs:
Nothing
Returns:
UINT8_T
slave_status CSAFE status byte
****************************************************************************/
PM3CSAFE_API UINT8_T tkcmdsetCSAFE_get_status(void);
Preliminary
29
Concept2 PM3 Communication Interface Definition
PM3 USB Interface API
(RPPM3USB.DLL, RPPM3USB.H, RPPM3USB.LIB)
The following is the API for the USB DLL. NOTE: The functions in this DLL are not typically called by
the application (the API layer DDI DLL calls these functions). CALLING DIRECTLY TO THE USB
DLL FUNCTIONS IS RECOMMENDED ONLY FOR ADVANCED USERS!
Note that the complete CSAFE frame must be properly formatted (including byte stuffing and checksum!)
when using this direct interface to communicate with the PM3.
tkcmdsetUSB_get_dll_version()
Returns the current version number of this software.
Inputs:
None
Outputs:
None
Returns:
UINT16_T
ver_info
High byte is major version number
Low byte is minor version number
tkcmdsetUSB_get_error_name
About: Returns the name of the error associated with the code
Inputs: ERRCODE_T ecode
UINT16_T namelen
Code to be looked up
Maximum length of name string
Outputs:
char *
Location to place name string
Returns:
ERRCODE_T ecode
nameptr
Zero if successful
Error code otherwise
tkcmdsetUSB_get_error_text
About: Returns the text description of the error associated with the code
Inputs: ERRCODE_T ecode
UINT16_T namelen
Code to be looked up
Maximum length of text description string
Outputs:
char *
Location to place text description string
Returns:
ERRCODE_T ecode
nameptr
Zero if successful
Error code otherwise
tkcmdsetUSB_init
About: Initializes the Command Set Toolkit functions.
Opens the error .INI file, and gets port numbers of all USB HID
devices that match the product name.
Inputs: INT16_T *
product_name Name of USB device to open
Outputs: UINT8_T *
num_found Number of devices that match name
Preliminary
30
Concept2 PM3 Communication Interface Definition
UINT8_T
port_list[] Port numbers of devices that match
Returns: ERRCODE_T
ecode
Zero if successful
Error code otherwise
tkcmdsetUSB_set_feature
About: Sends a USB SetFeature Standard Request to the device
This is independent of the command / response protocol
Inputs: UINT16_T
UINT16_T
port
Communication port to use
feature Identifier for desired feature to activate
Outputs: None
Returns: ERRCODE_T
ecode
Zero if successful
Error code otherwise
tkcmdsetUSB_do_DDIcommand
About: Send and receive a data block from the DDI interface.
Inputs: UINT16_T port
UINT8_T * cmd_ptr
UINT16_T timeout
Identifier for device
Location of data to send to device
Command/response timeout in ms
Outputs: UINT8_T * rsp_ptr
Location to store data returned by device
Returns: ERRCODE_T ecode
Zero if successful
Error code otherwise
tkcmdsetUSB_status
About: Reads status information from the device
Inputs: UINT16_T
port
Identifier for device
Outputs: UINT32_T * stat_ptr
Location to store status information
Returns: ERRCODE_T ecode
Zero if successful
Error code otherwise
tkcmdsetUSB_fw_version
About: Reads the firmware version information from the PM3
Inputs: UINT16_T
port
Communication port to use
Outputs: UINT8_T * ver_ptr
FW version string stored at this location
Returns: ERRCODE_T ecode
Zero if successful
Error code otherwise
Preliminary
31
Concept2 PM3 Communication Interface Definition
tkcmdsetUSB_hw_version
About:
Reads the hardware version information from the PM3
Inputs: UINT16_T
port
Communication port to use
Outputs: UINT8_T * ver_ptr
HW version string stored at this location
Returns: ERRCODE_T ecode
Zero if successful
Error code otherwise
tkcmdsetDDI_serial_number
About: Reads the serial number information from the PM3
Inputs: UINT16_T
port
Communication port to use
Outputs: UINT8_T * ser_ptr
Seria l number string stored at this location
Returns: ERRCODE_T ecode
Zero if successful
Error code otherwise
tkcmdsetUSB_shutdown
About:
Shuts down the Command Set Toolkit functions
Inputs: UINT16_T
port
Communication port to use
Outputs: None
Returns: ERRCODE_T ecode
Zero if successful
Error code otherwise
Preliminary
32
Concept2 PM3 Communication Interface Definition
Example Application Logic – CSAFE DLLs.
The following demonstrates setup and operation of the CSAFE DLLs.
/* Initialize the DLL and media (hardware) interfaces */
if (ecode = tkcmdsetDDI_init())
{
/* PM3 DLL init error */
}
/* Discover and get count of all discovered PM3s. Tell DLL to start numbering at 0. */
else if (ecode = tkcmdsetDDI_discover_pm3s(TKCMDSET_PM3_PRODUCT_NAME2, 0, &num_units))
{
/* PM discovery error */
tkcmdsetDDI_shutdown();
}
/* Initialize the CSAFE protocol engine. Leave timeout at default. */
else if (ecode = tkcmdsetCSAFE_init_protocol()
{
/* CSAFE DLL init error */
}
/* Program loop */
else
{
/* (PM initialization goes here, using CSAFE commands) */
while (program_is_running)
{
/*
* Example command : PM_GET_WORK_TIME
* Uses the CSAFE command wrapper for PM3-specfic commands.
* Where:
*
unit_address = 0;
*
// (uses CSAFE_GETPMDATA_CMD)
*
cmd_data[] = {0x7f, 0xA0}; // (PM_GET_WORK_TIME)
*
cmd_size = 2;
*/
tkcmdsetCSAFE _command(unit_address, cmd_size, cmd_data, &rsp_size, rsp_data);
/*
* Example response data:
*
rsp_data[] = {0x7F, 0xA0, 0xFFFFFFFF}; // (GETPMDATA id,
// GETWORKTIME id,
*
// work time FLOAT)
*
rsp_size = 3;
*
(notice: data is returned in the buffer according to type, i.e. the
*
DLL packs the 4-byte float).
*/
/*
* Example command : PM_GET_ERG, PM_GET_WORK_TIME
* Uses the CSAFE command wrapper for PM3-specfic commands.
* Where:
*
unit_address = 0;
*
// (uses CSAFE_GETPMDATA_CMD)
*
cmd_data[] = {0x7f, 0x50, 0x32, 0xA0};
// (GETPMDATA id,
// GETERG id,
Preliminary
33
Concept2 PM3 Communication Interface Definition
// Serial#=50
// GETWORKTIME id)
*/
tkcmdsetCSAFE _command(unit_address, cmd_size, cmd_data, &rsp_size, rsp_data);
/*
* Example response data:
*
rsp_data[] = {0x7F, 0x50, 0xfd, 0xA0, 0xFFFFFFFF};
//
// (GETPMDATA id,
// GETERG id,
// ERG # = 253
// GETWORKTIME id,
*
// work time FLOAT)
*/
}
/* Clean up and exit */
tkcmdset_shutdown();
}
Example Application Logic – USB DLL (“direct interface”).
The following demonstrates calling directly into the USB DLL, bypassing the CSAFE and DDI DLLs.
Note that the complete CSAFE frame must be properly formatted (including byte stuffing!) when using this
direct interface to communicate with the PM3.
/* Initialize the USB DLL interface */
if (ecode = tkcmdsetUSB_init())
{
/* PM3 USB DLL init error */
}
/* Initialize and discover USB PM3 devices. Update device map structure.*/
/* usb_port[] is an array of USB port numbers for all PM3’s found - will get populated by this routine */
else if (ecode = tkcmdsetUSB_init(TKCMDSET_PM3_PRODUCT_NAME2, &usb_num_units, usb_port))
{
/* USB init error – shut down DLL */
tkcmdsetUSB_shutdown();
}
/* Program loop */
else
{
/* (PM initialization goes here, using CSAFE commands) */
while (program_is_running)
{
/*
* Example command : GET STATUS (uses extended frame format)
* Where:
*
port = 0;
*
timeout = 70; (in ms)
*
cmd_data[] = {0xF0, 0xFD, 0x00, 0x80, 0x80, 0xF2}; // GET STATUS
*/
ecode = tkcmdsetUSB_do_DDIcommand(, cmd_data, rsp_data, timeout);
/* Example response data:
*
rsp_data[] = { 0xF0, 0x00, 0xFD, 0x01, 0x80, 0x01, 0x01, 0x81, 0xF2};
Preliminary
34
Concept2 PM3 Communication Interface Definition
*/
}
/* Clean up and exit */
tkc mdsetUSB_shutdown();
}
Appendix A
CSAFE Commands Implemented
Short Commands
Command Name
CSAFE_GETSTATUS_CMD
CSAFE_RESET_CMD
CSAFE_GOIDLE_CMD
CSAFE_GOHAVEID_CMD
CSAFE_GOINUSE_CMD
CSAFE_GOFINISHED_CMD
CSAFE_GOREADY_CMD
CSAFE_BADID_CMD
CSAFE_GETVERSION_CMD
Command
Identifier
0x80
0x81
0x82
0x83
0x85
0x86
0x87
0x88
0x91
CSAFE_GETID_CMD
0x92
CSAFE_GETUNITS_CMD
CSAFE_GETSERIAL_CMD
0x93
0x94
CSAFE_GETLIST_CMD
CSAFE_GETUTILIZATION_CMD
CSAFE_GETMOTORCURRENT_CMD
CSAFE_GETODOMETER_CMD
0x98
0x99
0x9A
0x9B
Preliminary
Response Data
Byte 0: Status
N/A1
N/A1
N/A1
N/A1
N/A1
N/A1
N/A1
Byte 0: Mfg ID
Byte 1: CID
Byte 2: Model
Byte 3: HW Version (LS)
Byte 4: HW Version (MS)
Byte 5: SW Version (LS)
Byte 6: SW Version (MS)
Byte 0: ASCII Digit 0 (MS)
Byte 1: ASCII Digit 1
Byte 2: ASCII Digit 22
Byte 3: ASCII Digit 32
Byte 4: ASCII Digit 42 (LS)
Byte 0: Units Type
Byte 0: ASCII Serial # (MS)
Byte 1: ASCII Serial #
Byte 2: ASCII Serial #
Byte 3: ASCII Serial #
Byte 4: ASCII Serial #
Byte 5: ASCII Serial #
Byte 6: ASCII Serial #
Byte 7: ASCII Serial #
Byte 8: ASCII Serial # (LS)
<Not implemented>
<Not implemented>
<Not implemented>
Byte 0: Distance (LSB)
Byte 1: Distance
Byte 2: Distance
Byte 3: Distance (MSB)
35
Concept2 PM3 Communication Interface Definition
CSAFE_GETERRORCODE_CMD
0x9C
CSAFE_GETSERVICECODE_CMD
CSAFE_GETUSERCFG1_CMD
CSAFE_GETUSERCFG2_CMD
CSAFE_GETTWORK_CMD
0x9D
0x9E
0x9F
0xA0
CSAFE_GETHORIZONTAL_CMD
0xA1
CSAFE_GETVERTICAL_CMD
CSAFE_GETCALORIES_CMD
0xA2
0xA3
CSAFE_GETPROGRAM_CMD
0xA4
CSAFE_GETSPEED_CMD
CSAFE_GETPACE_CMD
0xA5
0xA6
CSAFE_GETCADENCE_CMD
0xA7
CSAFE_GETGRADE_CMD
CSAFE_GETGEAR_CMD
CSAFE_GETUPLIST_CMD
CSAFE_GETUSERINFO_CMD
0xA8
0xA9
0xAA
0xAB
CSAFE_GETTORQUE_CMD
CSAFE_GETHRCUR_CMD
CSAFE_GETHRTZONE_CMD
CSAFE_GETMETS_CMD
CSAFE_GETPOWER_ CMD
0xAC
0xB0
0xB2
0xB3
0xB4
CSAFE_GETHRAVG_CMD
CSAFE_GETHRMAX_CMD
CSAFE_GETUSERDATA1_CMD
CSAFE_GETUSERDATA2_CMD
CSAFE_GETAUDIOCHANNEL_CMD
CSAFE_GETAUDIOVOLUME_CMD
CSAFE_GETAUDIOMUTE_CMD
CSAFE_ENDTEXT_CMD
CSAFE_DISPLAYPOPUP_CMD
CSAFE_GETPOPUPSTATUS_CMD
0xB5
0xB6
0xBE
0xBF
0xC0
0xC1
0xC2
0xE0
0xE1
0xE5
Byte 4: Units Specifier
Byte 0: Error Code (LSB)
Byte 1: Error Code
Byte 2: Error Code (MSB)
<Not implemented>
<Not implemented>
<Not implemented>
Byte 0: Hours
Byte 1: Minutes
Byte 2: Seconds
Byte 0: Horizontal Distance (LSB)
Byte 1: Horizontal Distance (MSB)
Byte 2: Units Specifier
<Not implemented>
Byte 0: Total Calories (LSB)
Byte 1: Total Calories (MSB)
Byte 0: Programmed/Pre-stored
Workout Number
<Not implemented>
Byte 0: Stroke Pace (LSB)
Byte 1: Stroke Pace (MSB)
Byte 2: Units Specifier
Byte 0: Stroke Rate (LSB)
Byte 1: Stroke Rate (MSB)
Byte 2: Units Specifier
<Not implemented>
<Not implemented>
<Not implemented>
Byte 0: Weight (LSB)
Byte 1: Weight (MSB)
Byte 2: Units Specifier
Byte 3: Age
Byte 4: Gender
<Not implemented>
Byte 0: Beats/Min
<Not implemented>
<Not implemented>
Byte 0: Stroke Watts (LSB)
Byte 1: Stroke Watts (MSB)
Byte 2: Units Specifier
<Not implemented>
<Not implemented>
<Not implemented>
<Not implemented>
<Not implemented>
<Not implemented>
<Not implemented>
<Not implemented>
<Not implemented>
<Not implemented>
Notes:
1.
2.
No specific response data, but the status byte will be returned
Depends on # ID digits configuration
Preliminary
36
Concept2 PM3 Communication Interface Definition
Example CSAFE command/response frames using standard frame:
Get status using the CSAFE_GETSTATUS_CMD command Command Frame: 0xF1 0x80 0x80 0xF2
Response Frame: 0xF1 0x01 0x80 0x01 0x01 0x81 0xF2
Example CSAFE command/response frames using extended frames with the host PC address of 0x00 and
the default PM (Erg) address of 0xFD:
Get version information using the CSAFE_GETVERSION_CMD command Command Frame: 0xF0 0xFD 0x00 0x91 0x91 0xF2
Response Frame: 0xF0 0x00 0xFD 0x81 0x91 0x07 0x16 0x02 0x03 0xA4 0x01 0x84 0x03 0xA3 0xF2
Long Commands
Command Name
CSAFE_AUTOUPLOAD_CMD2
CSAFE_UPLIST_CMD
CSAFE_UPSTATUSSEC_CMD
CSAFE_UPLISTSEC_CMD
CSAFE_IDDIGITS_CMD
CSAFE_SETTIME_CMD
Command
Identifier
0x01
0x02
0x04
0x05
0x10
0x11
CSAFE_SETDATE_CMD
0x12
CSAFE_SETTIMEOUT_CMD
CSAFE_SETUSERCFG1_CMD1
0x13
0x1A
CSAFE_SETUSERCFG2_CMD
CSAFE_SETTWORK_CMD
0x1B
0x20
CSAFE_SETHORIZONTAL_CMD
0x21
CSAFE_SETVERTICAL_CMD
CSAFE_SETCALORIES_CMD
0x22
0x23
CSAFE_SETPROGRAM_CMD
0x24
CSAFE_SETSPEED_CMD
CSAFE_SETGRADE_CMD
CSAFE_SETGEAR_CMD
CSAFE_SETUSERINFO_CMD
0x25
0x28
0x29
0x2B
Command Data
Byte 0: Configuration
<Not implemented>
<Not implemented>
<Not implemented>
Byte 0: # of Digits
Byte 0: Hour
Byte 1: Minute
Byte 2: Second
Byte 0: Year
Byte 1: Month
Byte 2: Day
Byte 0: State Timeout
One or more PM3
specific commands
<Not implemented>
Byte 0: Hours
Byte 1: Minutes
Byte 2: Seconds
Byte 0: Horizontal
Distance (LSB)
Byte 1: Horizontal
Distance (MSB)
Byte 2: Units Specifier
<Not implemented>
Byte 0: Total Calories
(LSB)
Byte 1: Total Calories
(MSB)
Byte 0: Programmed or
Pre-stored Workout
Byte 1: <don’t care>
<Not implemented>
<Not implemented>
<Not implemented>
<Not implemented>
Preliminary
Response Data
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
<PM3 specific
command identifer(s)>
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
37
Concept2 PM3 Communication Interface Definition
CSAFE_SETTORQUE_CMD
CSAFE_SETLEVEL_CMD
CSAFE_SETTARGETHR_CMD
CSAFE_SETMETS_CMD
CSAFE_SETPOWER_CMD
0x2C
0x2D
0x30
0x33
0x34
CSAFE_SETHRZONE_CMD
CSAFE_SETHRMAX_CMD
CSAFE_SETCHANNELRANGE_C
MD
CSAFE_SETVOLUMERANGE_C
MD
CSAFE_SETAUDIOMUTE_CMD
CSAFE_SETAUDIOCHANNEL_C
MD
CSAFE_SETAUDIOVOLUME_CM
D
CSAFE_STARTTEXT_CMD
CSAFE_APPENDTEXT_CMD
CSAFE_GETTEXTSTATUS_CMD
CSAFE_GETCAPS_CMD
N/A
N/A
N/A
N/A
N/A
0x35
0x36
0x40
<Not implemented>
<Not implemented>
<Not implemented>
<Not implemented>
Byte 0: Stroke Watts
(LSB)
Byte 1: Stroke Watts
(MSB)
Byte 2: Units Specifier
<Not implemented>
<Not implemented>
<Not implemented>
0x41
<Not implemented>
N/A
0x42
0x43
<Not implemented>
<Not implemented>
N/A
N/A
0x44
<Not implemented>
N/A
0x60
0x61
0x65
0x70
<Not implemented>
<Not implemented>
<Not implemented>
Byte 0: Capability Code
CSAFE_SETPMCFG_CMD 3
0x76
CSAFE_SETPMDATA_CMD 3
0x77
CSAFE_GETPMCFG_CMD3
0x7E
CSAFE_GETPMDATA_CMD3
0x7F
1 or more PM3 CSAFE
commands
1 or more PM3 CSAFE
commands
1 or more PM3 CSAFE
commands
1 or more PM3 CSAFE
commands
N/A
N/A
N/A
Capability Code 0x00:
Byte 0: Max Rx Frame
Byte 1: Max Tx Frame
Byte 2: Min Interframe
Capability Code 0x01:
Byte 0: 0x00
Byte 1: 0x00
Capability Code 0x02:
Byte 0: 0x00
Byte 1: 0x00
Byte 2: 0x00
Byte 3: 0x00
Byte 4: 0x00
Byte 5: 0x00
Byte 6: 0x00
Byte 7: 0x00
Byte 8: 0x00
Byte 9: 0x00
Byte 10: 0x00
See PM3 proprietary
commands
See PM3 proprietary
commands
See PM3 proprietary
commands
See PM3 proprietary
commands
N/A
N/A
N/A
Notes:
1.
2.
3.
Used for PM3-specific functionality as command wrapper
Although implemented, this command currently has no affect
Added for PM3 proprietary functionality as command wrappers (not available for public use)
Example CSAFE command/response frame using standard frame:
Preliminary
38
Concept2 PM3 Communication Interface Definition
Set work time goal to 7:30 with CSAFE_SETTWORK_CMD command Command Frame: 0xF1 0x20 0x03 0x00 0x07 0x1E 0x3A 0xF2
Response Frame: 0xF1 0x01 0x05 0x80 0x02 0x00 0x01 0xF9 0xF2
Example CSAFE PM3 proprietary command/response frame using extended frame with the host PC
address of 0x00 and the default PM (Erg) address of 0xFD:
Get device protocol parameter capabilities with the CSAFE_GETCAPS_CMD command Command Frame: 0xF0 0xFD 0x00 0x70 0x01 0x00 0x71 0xF2
Response Frame: 0xF0 0x00 0xFD 0x81 0x70 0x03 0x60 0x60 0x032 0x41 0xF2
CSAFE PM3-Specific Commands Implemented
Short Commands
Command Na me
CSAFE_PM_GET_WORKOUTTYPE
CSAFE_PM_GET_DRAGFACTOR
CSAFE_PM_GET_STROKESTATE
CSAFE_PM_GET_WORKTIME
Command
Identifier
0x89
0xC1
0xBF
0xA0
CSAFE_PM_GET_WORKDISTANCE
0xA3
Response Data
Byte 0: Workout Type
Byte 0: Drag Factor
Byte 0: Stroke State
Byte 0: Work Time (LSB)
Byte 1: Work Time
Byte 2: Work Time
Byte 3: Work Time (MSB)
Byte 0: Work Distance (MSB)
Byte 1: Work Distance
Byte 2: Work Distance
Byte 3: Work Distance (LSB)
Example CSAFE command/response frame using standard frame:
Get higher resolution work time (2:30.85 seconds) using the CSAFE_SETUSERCFG1_CMD command
wrapper with a CSAFE_PM_GET_WORKTIME command Command Frame: 0xF1 0x1A 0x01 0xA0 0xBB 0xF2
Response Frame: 0xF1 0x81 0x1A 0x06 0xA0 0x04 0xED 0x3A 0x00 0x00 0x6F 0xF2
Example CSAFE command/response frames using extended frames with the host PC address of 0x00 and
the default PM (Erg) address of 0xFD:
Get workout type (fixed distance w/ splits) and drag factor (128) using the CSAFE_SETUSERCFG1_CMD
command wrapper with a CSAFE_PM_GET_WORKOUTTYPE and CSAFE_PM_GET_DRAGFACTOR
commands Command Frame: 0xF0 0xFD 0x00 0x1A 0x02 0x89 0xC1 0x50 0xF2
Response Frame: 0xF0 0x00 0xFD 0x01 0x1A 0x06 0x89 0x01 0x03 0xC1 0x01 0x80 0xD7 0xF2
Long Commands
Command Name
Command
Identifier
Command Data
Preliminary
Response Data
39
Concept2 PM3 Communication Interface Definition
CSAFE_PM_SET_SPLITDURATION
0x05
Byte 0: Time/Distance
duration
(0: Time, 128: Distance)
Byte 1: Duration (LSB)
Byte 2: Duration
Byte 3: Duration
Byte 4: Duration (MSB)
N/A
Example CSAFE command/response frame using standard frame:
Set the split duration (100 m) using the CSAFE_SETUSERCFG1_CMD command wrapper with a
CSAFE_PM_SET_SPLITDURATION command Command Frame: 0xF1 0x1A 0x07 0x05 0x05 0x80 0x64 0x00 0x00 0x00 0xF9 0xF2
Response Frame: 0xF1 0x81 0x1A 0x01 0x0x05 0x1E 0xF2
Appendix B
PM3 Data Conversions
Watts <-> Pace
Pace is in sec/meter:
Watts = (2.8 / ( pace * pace * pace ))
Calories/Hr <-> Pace
Pace is in sec/meter:
Calories/Hr = (((2.8 / ( pace * pace * pace )) * ( 4.0 * 0.8604)) + 300.0)
Pace <-> /500m Pace
Pace is in sec/meter:
Pace/500m = (pace * 500)
Appendix C
Pre-programmed workout definitions for standard list and custom list are defined below. Note that the
"Custom List" and "Favorites" workouts can vary from PM3 to PM3 depending on actions taken by the
user.
Standard List Workouts
Program # / Description
1 - 2000m Fixed Distance with 500m splits
2 - 5000m Fixed Distance with 1000m splits
3 - 10000m Fixed Distance with 2000m splits
4 - 30:00 Fixed Time w/ 6:00 splits
Preliminary
40
Concept2 PM3 Communication Interface Definition
5 - 500m Fixed Distance Interval with 1:00 rest between intervals (500m/1:00r)
Custom List Workouts
Program # / Description
6 - 00:30 Fixed Time Interval w/ 00:30 rest between intervals (:30/:30r)
7 - 7 Interval Variable (1:00/1:00r, 2:00/2:00r, 3:00/3:00r, 4:00/4:00r, 3:00/3:00r, 2:00/2:00r, 1:00/1:00r)
8 - 4 Interval Variable (2000m/3:00r, 1500m/3:00r, 1000m/3:00r, 500m/3:00r)
9 - 9 Interval Variable (1:40/:20r, 1:40/:20r, 1:40/:20r, 1:40/:20r, 1:40/2:00r, 1:40/:20r, 1:40/:20r, 1:40/:20r,
1:40/:20r)
10 - 42195 Fixed Distance with 2000m splits
Preliminary
41
Appendix D
The PM3 error display format is a combination of error code and screen number as defined below:
<Error Code> - <Screen Number>
The error codes and their descriptions are provided in Table 18.
PM3 Error Codes
Table 18 - PM3 Error Code Descriptions
Internal Name
APMAIN_TASKCREATE_ERR
APMAIN_TASKDELETE_ERR
APMAIN_VOLTSUPPLY_ERR
APMAIN_USERKEY_STUCK_ERR
Value
1
2
3
4
APMAIN_TASK_INVALID_ERR
5
APCOMM_INIT_ERR
APCOMM_INVALIDPW_ERR
APLOG_INIT_ERR
APLOG_INVALIDUSER_ERR
APLOG_USERSTATINFO_STORAGE_ERR
APLOG_USERSTATINFO_RETRIEVE_ERR
APLOG_USERDELETE_ERR
APLOG_USERDYNAMINFO_STORAGE_ERR
APLOG_USERDYNAMINFO_RETRIEVE_ERR
APLOG_CUSTOMWORKOUT_STORAGE_ERR
APLOG_CUSTOMWORKOUT_RETRIEVE_ERR
APLOG_CUSTOMWORKOUT_INSUFFMEM_ERR
10
11
20
21
22
23
24
25
26
27
28
29
APLOG_CUSTOMWORKOUT_INVALID_ERR
30
Description
Operating system task creation error
Operating system task deletion error
<Not Used>
One or more user input keys are asserted during power-up and not
released within 2 seconds
One or more operating system tasks that should be active during
normal operation are determined to be inactive
<Not Used>
Invalid interface authentication password
<Not Used>
User number provided by the screen content is out of range
User static information not successfully stored on logcard
User static information not successfully retrieved from logcard
Unsuccessful deletion of user from logcard
User dynamic information not successfully stored on logcard
User dynamic information not successfully retrieved from logcard
Custom workout information not successfully stored on logcard
Custom workout information not successfully retrieved from logcard
Insufficient logcard memory exists to store the custom workout
information
Specific custom workout information is invalid
Concept2 PM3 Communication Interface Definition
Internal Name
APLOG_INVALIDCARDOPERATION_ERR
APLOG_INVALIDUSERCARDDATA_ERR
APLOG_INVALIDCUSTOMWORKOUT_ERR
Value
31
32
33
APLOG_INVALIDWORKOUTIDENT_ERR
APLOG_INVALIDLISTLENGTH_ERR
APLOG_INVALIDINPUTPARAM_ERR
34
35
36
APLOG_INVALIDWORKOUTNUM_ERR
APLOG_CARDNOTPRESENT_ERR
APLOG_INVALIDINTLOGADDR_ERR
37
38
39
APLOG_INVALIDLOGHDRPTR_ERR
40
APLOG_MAXSPLITSEXCEEDED_ERR
41
APLOG_NODATAAVAILABLE_ERR
42
APLOG_INVALIDCARDSTRUCTREV_ERR
APLOG_CARDOPERATIONTIMEOUT_ERR
43
44
APLOG_INVALIDLOGSIZE_ERR
45
APLOG_LOGENTRYVALIDATE_ERR
APLOG_USERDYNAMICVALIDATE_ERR
APLOG_CARDINFOVALIDATE_ERR
APLOG_CARDACCESS_ERR
46
47
48
49
APPM3_INVALIDWORKOUTNUM_ERR
60
APPM3_NOPLOTDATA_ERR
APPM3_INVALIDMFGINFO_ERR
61
62
APPM3_INVALIDCALINFO_ERR
63
Description
Screen content performed invalid logcard operation
<Not Used>
Custom workout number provided by the screen content is out of
range
Workout type provided by the screen content is out of range
<Not Used>
Special function input parameter provided by screen content is
invalid
Workout number provided by the screen content is out of range
Logcard access unsuccessful because card not present
Logcard workout log address provided by the screen content was
out of range
Accessing the logcard workout log section was unsuccessful
because some of the contents are invalid
Unable to store the split/interval data in internal log memory because
the maximum # of splits has been exceeded
Searching for the requested logcard workout log data has returned
no information
Logcard card information structure revision is invalid
Logcard operations requested by the screen content timed-out
waiting for the logcard to become available
Detected invalid data set size while storing workout results to
logcard
Failure to validate workout results written to logcard
Failure to validate updated user dynamic data written to logcard
Failure to validate updated card information data written to logcard
Unable to communicate with logcard while its status is present and
valid
Workout number provided by screen content or host PC for
configuring the PM3 is out of range
No pace plot data available for collection by the host PC
Manufacturing information structure stored in non-volatile memory
does not pass its integrity check
Calibration information structure stored in non-volatile memory does
not pass its integrity check
Preliminary
43
Concept2 PM3 Communication Interface Definition
Internal Name
APHEADER_INVALIDFONTHDR_ERR
Value
80
APHEADER_INVALIDSCRNHDR_ERR
81
AP_NETWORK_GENESISMODE_ERR
AP_NETWORK_PRIMFWDWNLOAD_ERR
AP_NETWORK_READPDA_ERR
AP_NETWORK_LOADBLOCKS_ERR
AP_NETWORK_VERIFYBLOCKS_ERR
AP_NETWORK_APPLYPDA_ERR
AP_NETWORK_RUNFW_ERR
AP_NETWORK_RESET_ERR
AP_NETWORK_PRESENT_ERR
AP_NETWORK_SECFWDWNLOAD_ERR
AP_NETWORK_DRIVERINIT_ERR
AP_NETWORK_NETWORKINIT_ERR
AP_NETWORK_UDPSERVERINIT_ERR
AP_NETWORK_COMMSQUALITY_ERR
AP_NETWORK_PACKETSTATS_ERR
AP_NETWORK_POWERMANAGECFG_ERR
TKCMDPR_INVALIDMSGTYPE_ERR
TKCMDPR_INVALID_CMD_ERR
TKCMDPR_INVALID_CMD_ADDR_ERR
TKCMDPR_INVALID_DEST_ADDR_ERR
TKCMDPR_INVALID_DEST_INTF_ERR
1230
1250
1251
1252
1253
1254
1255
1256
1257
1350
1400
1401
1402
1500
1501
1502
120
121
122
123
124
TKCMDPR_INVALID_INTF_ERR
125
TKCMDPR_ROUTE_TABLE_FULL_ERR
TKCMDPR_UNAUTHORIZED_CMD_ERR
126
127
TKCMDPR_REFUSE_CMD_ERR
128
TKCMDPR_INVALID_RSP_ERR
129
Description
Font information header structure stored in Flash memory does not
pass its integrity check
Screen content information header structure stored in Flash memory
does not pass its integrity check
<Not Used>
Command received from host PC is invalid
CSAFE command frame address is invalid
CSAFE command frame routing destination address is invalid
CSAFE command/response frame routing table entry has conflicting
destination interface with existing entry
CSAFE command/response processing specified an invalid
communication interface
Command/response frame routing table full
Command received from host PC is not supported in the current
PM3 operating mode
Broadcast command from host PC refused in the current PM3
operating mode
Command frame received from host PC is valid but at least one of
the individual commands within the frame is invalid/unsupported so
Preliminary
44
Concept2 PM3 Communication Interface Definition
Internal Name
Value
TKDATALOG_INIT_ERR
TKDATALOG_DEVICE_INVALID_ERR
TKDATALOG_CARD_INIT_ERR
TKDATALOG_DEVICE_SIZE_ERR
TKDATALOG_MULTI_STRUCT_ERR
130
131
132
133
134
TKDATALOG_READ_ERR
TKDATALOG_WRITE_ERR
TKDATALOG_RECORDIDENTIFIER_ERR
TKDATALOG_INSUFFMEM_ERR
TKDATALOG_CARD_CORRUPT_ERR
TKDISP_INVALID_CHAR_ERR
135
136
137
138
139
140
TKDISP_INVALIDPARAM_ERR
141
TKDISP_STRING_TOO_LONG_ERR
142
TKDISP_STRING_TOO_HIGH_ERR
143
TKDISP_INVALID_LANG_ERR
144
TKEEPROM_INIT_ERR
TKEEPROM_ACK_ERR
TKEEPROM_STOP_ERR
TKEEPROM_INVALID_END_ADDR
TKEEPROM_WRITE_TIMEOUT_ERR
TKEEPROM_WRITE_READ_ERR
TKEEPROM_WRITE_VERIFY_ERR
150
151
152
153
154
155
156
TKEEPROM_CHKSM_READ_ERR
TKFRAME_CSAFE_FRAME_S TUFF_ERR
TKFRAME_CSAFE_FRAME_CHKSM_ERR
TKFRAME_NO_SCI_FRAME_ERR
157
160
161
162
Description
no response is generated
Data logging toolkit functions not initialized
Selected data logging device invalid
Failure of data logging device to pass integrity check
Data logging devices size is not supported
Failure to confirm integrity or repair data logging device multstructure information
Data logging device read failure
Data logging device write failure
Data logging device record identifier invalid
Data logging device insufficient memory
Logcard data logging device corrupted
Display character provided by screen content or host PC is out of
range
Display coordinate provided by screen content or host PC is out of
range
Display string and coordinates provided by screen content or host
PC is exceeds display capability
Display string and coordinates provided by screen content or host
PC exceeds display capability
Display language provided by screen content or host PC is out of
range
EEPROM toolkit functions not initialized
Failure to receive ACK from EEPROM during read or write operation
Failure to receive ACK from EEPROM during stop operation
EEPROM address exceeds size of device
<Not Used>
Timeout waiting for EEPROM write cycle to complete
Failure to verify data written to EEPROM after write cycle has
completed
Failure to read EEPROM during checksum computation
Failure in CSAFE frame processing during byte-unstuffing
CSAFE frame checksum failure
No complete CSAFE frame detected during serial interface
character processing
Preliminary
45
Concept2 PM3 Communication Interface Definition
Internal Name
TKFRAME_NO_USB_FRAME_ERR
Value
163
TKFRAME_CSAFE_INVALID_SHORT_CMD_ERR
TKFRAME_CSAFE_INVALID_LONG_CMD_ERR
TKFRAME_CSAFE_FRAME_TOO_LONG_ERR
TKFRAME_NO_EXPRF_FRAME_ERR
164
165
166
167
TKFRAME_CSAFE_INVALID_LONG_RSP_ERR
TKHDW_EVENT_BURST_STACK_OVF_ERR
TKHDW_EVENT_BURST_STACK_UNF_ERR
TKHRTMON_INVALID_NUM_MEAS_ERR
168
170
171
180
TKHRTMON_TOO_FEW_MEAS_ERR
181
TKMEM_INVALID_MEMTYPE_ERR
TKMEM_INVALID_START_ADDR_ERR
200
201
TKMEM_INVALID_END_ADDR_ERR
202
TKMEM_FLASH_WRITE_ERR
TKRTTIMER_INVALID_MONTH_ERR
203
210
TKRTTIMER_INVALID_DAY_ERR
TKRTTIMER_INVALID_TIMER_NUM_ERR
TKRTTIMER_INVALID_TIMER_MODE_ERR
TKSCI_INVALID_PORT_ERR
TKSCI_TX_SEND_ERR
TKSCI_RX_TIMEOUT_ERR
TKSCRN_INVALID_SPECFUNCTYPE
211
212
213
220
221
222
230
TKSCRN_ILLEGAL_SPLITDURATION
TKSMCD_ACK_ERR
TKSMCD_STOP_ERR
TKSMCD_INVALID_END_ADDR
TKSMCD_WRITE_TIMEOUT_ERR
231
240
241
242
243
Description
No complete CSAFE frame detected during USB interface character
processing
Invalid short command present in CSAFE frame
Invalid long command present in CSAFE frame
CSAFE frame exceeds maximum allowable frame length
No complete CSAFE frame detected during 802.11 interface
character processing
Invalid CSAFE frame length in slave response
Burst stack overflow error
Burst stack underflow error
Number of heartrate monitor measurements requests exceeds
maximum
Number of available heartrate monitor measurements is fewer than
the requested number of measurements
Requested memory operation specified invalid memory type
Requested memory operation specified invalid start address for the
memory type
Requested memory operation specified invalid end address for the
memory type
Flash memory write failure
Invalid month specified in date structure during date format
conversion
Invalid day specified in date structure during date format conversion
Invalid task timer number specified during timer configuration
Invalid task timer mode specified during timer configuration
Invalid serial communication interface port specified
Failure during serial communication interface transmission
Receive timeout on serial communication interface
Special function type provided by the screen content or host PC is
out of range
Illegal split duration was detected and fixed
Failure to receive ACK from smart card during read operation
Failure to receive ACK from smart card during stop operation
Smart card address exceeds size of device
<Not Used>
Preliminary
46
Concept2 PM3 Communication Interface Definition
Internal Name
TKSMCD_WRITE_READ_ERR
TKSMCD_WRITE_VERIFY_ERR
Value
244
245
TKSMCD_CHKSM_READ_ERR
TKSMCD_ACK_ERR_WRITE
TKTACH_INVALID_NUM_MEAS_ERR
TKTACH_TOO_FEW_MEAS_ERR
246
247
250
251
TKTIME_INVALID_MONTH_ERR
260
TKTIME_INVALID_DAY_ERR
TKUSER_INIT_ERR
TKCRC_ERR
TKUSB_BAD_DESC_RQT_ERR
TKUSB_INVALID_EPNUM_ERR
TKUSB_RX_TIMEOUT_ERR
TKUSB_EPNUM_RX_OVERRUN
TKUSB_INIT_EPNUM_ERR
TKUSB_GET_RX_CHAR_ERR
261
260
300
330
331
332
333
334
335
TKUSB_BUS_DISABLE_ERR
TKUSB_BUS_RESET_ERR
TKUSB_NO_FEATURE_REPORT_ERR
TKUSB_INVALID_STRING_ID_ERR
336
337
338
339
TKUSB_EP_TX_OVERRUN_ERR
TKUSB_INVALID_TX_LEN_ERR
340
341
TKDIAG_DIAGFAIL_ERR
TKDIAG_FLSHFONTDIAG_BADHDRCRC_ERR
TKDIAG_FLSHFONTDIAG_CRCCALC_ERR
TKDIAG_FLSHFONTDIAG_BADFONTCRC_ERR
TKDIAG_FLSHSCRNDIAG_BADHDRCRC_ERR
TKDIAG_FLSHSCRNDIAG_CRCCALC_ERR
TKDIAG_FLSHSCRNDIAG_BADSCRNCRC_ERR
500
501
502
503
510
511
512
Description
Timeout waiting for smart card write cycle to complete
Failure to verify data written to smart card after write cycle has
completed
Failure to read smart card during checksum computation
Failure to receive ACK from smart card during write operation
Number of flywheel tach measurements requests exceeds maximum
Number of available flywheel tach measurements is fewer than the
requested number of measurements
Invalid month specified in date structure during date format
conversion
Invalid day specified in date structure during date format conversion
<Not Used>
<Not Used>
USB communication interface bad descriptor request
Invalid USB communication interface endpoint specified
<Not Used>
USB communication interface endpoint receive overrun
USB communication interface endpoint initialization failure
Failure to get character from the USB communication interface
endpoint
<Not Used>
<Not Used>
No feature report available on the USB communication interface
Invalid string descriptor ID request on the USB communication
interface
USB communication interface endpoint transmit overrun
Length of transmit data for USB communication interface exceeds
buffer size
One or more diagnostic tests failed
Flash font information header CRC failure
Flash font information CRC calculation unsuccessful
Flash font information CRC failure
Flash screen content information header CRC failure
Flash screen content information CRC calculation unsuccessful
Flash screen content information CRC failure
Preliminary
47
Concept2 PM3 Communication Interface Definition
Internal Name
TKDIAG_FLSHAPPDIAG_BADHDRCRC_ERR
TKDIAG_FLSHAPPDIAG_CRCCALC_ERR
TKDIAG_FLSHAPPDIAG_BADAPPCRC_ERR
TKDIAG_UARTDIAG_UART1_INIT_ERR
TKDIAG_UARTDIAG_UART1_WRITE_ERR
TKDIAG_UARTDIAG_UART1_READ_ERR
TKDIAG_UARTDIAG_UART2_INIT_ERR
TKDIAG_UARTDIAG_UART2_WRITE_ERR
TKDIAG_UARTDIAG_UART2_READ_ERR
TKDIAG_ADCONVDIAG_INIT_ERR
TKDIAG_ADCONVDIAG_NOTREADY_ERR
TKDIAG_ADCONVDIAG_ADCINPUT_ERR
TKDIAG_SWUSERCONFIRM_ERR
TKDIAG_SWSHORT_ERR
TKDIAG_SW0_ERR
TKDIAG_SW1_ERR
TKDIAG_SW2_ERR
TKDIAG_SW3_ERR
TKDIAG_SW4_ERR
TKDIAG_SW5_ERR
TKDIAG_SW6_ERR
TKDIAG_SW7_ERR
TKDIAG_AMUXDIAG_NOTREADY_ERR
TKDIAG_AMUXDIAG_ANALOGVREFCHAN_ERR
TKDIAG_AMUXDIAG_ANALOGGNDCHAN_ERR
TKDIAG_VSUPPLYDIAG_VEXPDIAG_ERR
TKDIAG_VSUPPLYDIAG_GENINDIAG_ERR
TKDIAG_VSUPPLYDIAG_VBATEXPDIAG_ERR
TKDIAG_VSUPPLYDIAG_VBATPROTDIAG_ERR
TKDIAG_VSUPPLYDIAG_VUSBDIAG_ERR
TKDIAG_VSUPPLYDIAG_VREFDIAG_ERR
TKDIAG_VSUPPLYDIAG_VBIASDIAG_ERR
TKDIAG_EXTEEDIAG_RDDATA1_ERR
TKDIAG_EXTEEDIAG_INVALIDCRC1_ERR
Value
520
521
522
530
531
532
533
534
535
540
541
542
550
551
552
553
554
555
556
557
558
559
560
561
562
570
571
572
573
574
575
576
580
581
Description
Flash application information header CRC failure
Flash application information CRC calculation unsuccessful
Flash application information CRC failure
Serial communication UART1 initialization failure
Serial communication UART1 loopback write failure
Serial communication UART1 loopback read failure
Serial communication UART2 initialization failure
Serial communication UART2 loopback write failure
Serial communication UART2 loopback read failure
Analog-to-digital converter initialization failure
<Not Used>
Analog-to-digital converter conversion out of range failure
User switch confirmation timeout failure
User switch short failure
User switch 0 assertion failure
User switch 1 assertion failure
User switch 2 assertion failure
User switch 3 assertion failure
User switch 4 assertion failure
User switch 5 assertion failure
User switch 6 assertion failure
User switch 7 assertion failure
Analog mux analog-to-digital conversion not available failure
Analog mux reference channel conversion out of range failure
Analog mux ground channel conversion out of range failure
Expansion module voltage supply out of range failure
Flywheel generator input voltage out of range failure
Battery expansion module voltage out of range failure
Battery protected voltage out of range failure
USB input voltage out of range failure
Reference voltage out of range failure
LCD bias voltage supply out of range failure
EEPROM read data location 1 failure
EEPROM manufacturing structure CRC validity failure
Preliminary
48
Concept2 PM3 Communication Interface Definition
Internal Name
TKDIAG_EXTEEDIAG_RDDATA2_ERR
TKDIAG_EXTEEDIAG_INVALIDCRC2_ERR
TKDIAG_EXTEEDIAG_WRDATA1_ERR
TKDIAG_EXTEEDIAG_WRDATA2_ERR
TKDIA G_EXTEEDIAG_DATA1_ERR
TKDIAG_EXTEEDIAG_DATA2_ERR
TKDIAG_TACHDIAG_USERCONFIRM_ERR
TKDIAG_TACHDIAG_TACHUNPLUG_ERR
TKDIAG_TACHDIAG_TACHPLUG_ERR
TKDIAG_TACHDIAG_TACHSPINNING_ERR
TKDIAG_TACHDIAG_USERABORT_ERR
TKDIAG_HRTMONDIAG_USERCONFIRM_ERR
TKDIAG_HRTMONDIAG_HRTUNPLUG_ERR
TKDIAG_HRTMONDIAG_HRTPLUG_ERR
TKDIAG_HRTMONDIAG_HRTACTIVE_ERR
TKDIAG_HRTMONDIAG_USERABORT_ERR
TKDIAG_GENINPUTDIAG_USERCONFIRM_ERR
TKDIAG_GENINPUTDIAG_THRESHMAX_ERR
TKDIAG_GENINPUTDIAG_THRESHMIN_ERR
TKDIAG_GENINPUTDIAG_USERABORT_ERR
TKDIAG_SCDIAG_USERCONFIRM_ERR
TKDIAG_SCDIAG_ILLEGALDETECT_ERR
TKDIAG_SCDIAG_DETECT_ERR
TKDIAG_SCDIAG_COMM_ERR
TKDIAG_SCDIAG_USERABORT_ERR
TKDIAG_EXPCFREG_NOTPRESENT_ERR
TKDIAG_EXPCFREG_LO_ERR
TKDIAG_EXPCFREG_HI_ERR
TKDIAG_EXPSTSLED_NOTPRESENT_ERR
TKDIAG_EXPFLASH_NOTPRESENT_ERR
TKDIAG_EXPFLASH_FILLNORMALDATA_ERR
TKDIAG_EXPFLASH_NORMALDATA_ERR
TKDIAG_EXPFLASH_FILLINVERTEDDATA_ERR
TKDIAG_EXPFLASH_INVERTEDDATA_ERR
Value
582
583
584
585
586
587
590
591
592
593
594
600
601
602
603
604
610
611
612
613
620
621
622
623
624
660
661
662
670
680
681
682
683
684
Description
EEPROM read data location 2 failure
EEPROM calibration structure CRC validity failure
EEPROM write data location 1 failure
EEPROM write data location 2 failure
EEPROM write/read verify data location 1 failure
EEPROM write/read verify data location 2 failure
Tach confirmation timeout failure
<Not Used>
Tach input is active or flywheel spinning failure
Tach input flywheel not spinning failure
Tach user diagnostic abort failure
Heartrate montor confirmation timeout failure
<Not Used>
Heartrate monitor is active or pulses present failure
Heartrate monitor no pulses present failure
Heartrate monitor user diagnostic abort failure
Generator confirmation timeout failure
Generator voltage above max threshold failure
Generator voltage below min threshold failure
Generator user diagnostic abort failure
Smart card confirmation timeout failure
Smart card detect if no card present failure
Smart card no detect if card present failure
Smart card communication failure
Smart card user diagnostic abort failure
Expansion configuration register module not present failure
Expansion configuration register low loopback signal failure
Expansion configuration register high loopback signal failure
Expansion status LED module not present failure
Expansion Flash memory module not present failure
Expansion Flash memory fill normal data failure
Expansion Flash memory normal data verify failure
Expansion Flash memory fill inverted data failure
Expansion Flash memory inverted data verify failure
Preliminary
49
Concept2 PM3 Communication Interface Definition
Internal Name
TKDIAG_EXPSRAM_NOTPRESENT_ERR
TKDIAG_EXPSRAM_NORMALDATA_ERR
TKDIAG_EXPSRAM_INVERTEDDATA_ERR
TKDIAG_EXPEEDIAG_NOTPRESENT_ERR
TKDIAG_EXPEEDIAG_INVALIDCRC_ERR
Value
690
691
692
700
701
TKDIAG_EXPEEDIAG_RDDATA1_ERR
TKDIAG_EXPEEDIAG_WRDATA1_ERR
TKDIAG_EXPEEDIAG_DATA1_ERR
TKDIAG_EXP232DIAG_NOTPRESENT_ERR
TKDIAG_EXP232DIAG_CONFIG_ERR
TKDIAG_EXP232DIAG_TXCHAR_ERR
TKDIAG_EXP232DIAG_LOOPBACK_TO_ERR
TKDIAG_EXP232DIAG_LOOPBACK_DATA_ERR
TKDIAG_EXP232DIAG_USERCONFIRM_ERR
TKDIAG_EXP232DIAGDIAG_USERABORT_ERR
TKDIAG_EXP485DIAG_NOTPRESENT_ERR
TKDIAG_EXP485DIAG_CONFIG_ERR
TKDIAG_EXP485DIAG_FORMATFRAME_ERR
TKDIAG_EXP485DIAG_SENDCMD_ERR
TKDIAG_EXP485DIAG_UNFORMATFRAME_ERR
TKDIAG_EXP485DIAG_USERCONFIRM_ERR
TKDIAG_EXP485DIAGDIAG_USERABORT_ERR
TKDIAG_EXP485DIAG_NORESPONSE_ERR
TKDIAG_EXPWIFIDIAG_NOTPRESENT_ERR
TKDIAG_EXPWIFIDIAG_CFINIT_ERR
TKDIAG_EXPWIFIDIAG_RECONFIG_ERR
TKDIAG_EXPWIFIDIAG_USERABORT_ERR
TKDIAG_EXPWIFIDIAG_DHCP_TO_ERR
TKDIAG_EXPWIFIDIAG_CFNOTPRESENT_ERR
TKEXP_RS232_INVALID_ERR
TKEXP_CF_NOTPRESENT_ERR
TKEXP_CF_CIRQINVALID_ERR
TKEXP_CF_CARDNOTREADY_ERR
702
703
704
710
711
712
713
714
715
716
720
721
722
723
724
725
726
727
730
731
732
733
734
735
1000
1001
1002
1003
Description
Expansion static RAM module not present failure
Expansion static RAM normal data write/read verify failure
Expansion static RAM inverted data write/read verify failure
Expansion EEPROM module not present failure
Expansion EEPROM manufacturing information CRC valid check
failure
Expansion EEPROM read failure
Expansion EEPROM write failure
Expansion EEPROM write/read verify failure
Expansion RS232 interface module not present failure
Expansion RS232 configuration failure
Expansion RS232 loopback transmit failure
Expansion RS232 loopback receive timeout failure
Expansion RS232 loopback data verify failure
Expansion RS232 confirmation timeout failure
Expansion RS232 user diagnostic abort failure
Expansion RS485 interface module not present failure
Expansion RS485 configuration failure
Expansion RS485 CSAFE frame format failure
Expansion RS485 CSAFE frame send failure
Expansion RS485 CSAFE frame unformat failure
Expansion RS485 confirmation timeout failure
Expansion RS485 user diagnostic abort failure
Expansion RS485 no command response failure
Expansion 802.11 module not present failure
Expansion 802.11 initialization failure
Expansion 802.11 task reconfiguration failure
Expansion 802.11 user diagnostic abort failure
Expansion 802.11 DHCP timeout failure
Expansion 802.11 correct CF card present failure
<Not Used>
Expansion module CF card not present
Expansion module CF IRQ invalid state
Expansion module CF card not ready
Preliminary
50
Concept2 PM3 Communication Interface Definition
Internal Name
TKEXP_CF_MEMTEST_ERR
TKEXP_CF_INVALIDSTATE_ERR
TKEXP_CF_RFVENDORSTRING_ERR
TKEXP_INVALIDLEDMODE_ERR
TKEXP_INVALIDLEDCOLOR_ERR
TKDEBUG_INIT_ERR
IOADCONV_BG_TIMEOUT_ERR
IOADCONV_RESET_TIMEOUT_ERR
IOADCONV_INVALID_CHAN_ERR
IOADCONV_NOT_RDY_ERR
IOADCONV_INVALID_REF_ERR
IOADCONV_INIT_ADC_ERR
IODMA_INVALID_MEM_CHAN_ERR
IODMA_INVALID_IO_RQST_CHAN_ERR
IODMA_INIT_DMA_ERR
IODMA_QUEUE_FULL_ERR
IOHDW_MEM_INVALID_CS_ERR
IOHDW_INVALID_DMACLK_ERR
IOHDW_INVALID_SYSCLK_ERR
IOI2C_NOACK_ERR
IOI2C_INIT_WDR_TIMOUT_ERR
IOI2C_INIT_XMIT_TIMOUT_ERR
IOI2C_SEND_XMIT_TIMOUT_ERR
IOI2C_GET_RECV_TIMOUT_ERR
IOI2C_STOP_TIMEOUT_ERR
IOI2C_WDR_TIMOUT_ERR
IOI2C_INVALID_BAUD
IOLCD_DISPINIT_ERR
IOLCD_INVALIDPARAM_ERR
IOMEM_FLASH_ERASE_TIMEOUT_ERR
IOMEM_FLASH_WRITE_TIMEOUT_ERR
IORTCLOCK_WRITE_TIME_ERR
IOSCI_INVALID_PORT_ERR
IOSCI_INVALID_BAUD_ERR
Value
1004
1005
1006
1007
1008
2000
810
811
812
813
814
815
820
821
822
823
830
831
832
840
841
842
843
844
845
846
847
860
861
870
871
880
890
891
Description
Expansion module memory test failure
Expansion module invalid state
Expansion module invalid 802.11 vendor string
Expansion module invalid status LED mode
Expansion module invalid status LED color
<Not Used>
Analog-to-digital converter bandgap reference ready timeout
Analog-to-digital converter reset timeout
Analog-to-digital converter invalid channel
Analog-to-digital converter not ready
Analog-to-digital converter invalid reference level
<Not Used>
DMA invalid memory channel requested
DMA invalid IO channel requested
DMA initialization unsuccessful
DMA queue full
Memory chip select invalid
DMA clock invalid
System clock invalid
I2C no ACK on read or write
I2C initialization wait for data ready timeout
I2C initialize transmit data timeout
I2C send transmit data timeout
I2C get receive data timeout
I2C stop condition timeout
I2C wait for data ready timeout
I2C invalid baud rate
LCD display initialization unsuccessful
LCD invalid display parameter specified
Flash memory erase timeout
Flash memory write timeout
Real-time clock write timeout
Serial communication interface invalid port
Serial communication interface invalid baud
Preliminary
51
Concept2 PM3 Communication Interface Definition
Internal Name
IOSCI_INVALID_CNT_ERR
IOSCI_INIT_PORT_ERR
IOSCI_TXOVERRUN_ERR
IOSCI_RXOVERRUN_ERR
IOSCI_RXFRAME_ERR
IOSCI_RXPARITY_ERR
IOSCI_RXBREAK_ERR
IOTIMER_INVALID_TIMERID_ERR
IOUSER_SEMAPHORE_PEND_ERR
IOUSER_SEMAPHORE_POST_ERR
IOUSB_RST_TIMOUT_ERR
IOUSB_CFG_TIMOUT_ERR
IOUSB_CFG_ENDPT_ERR
IOUSB_SETUP_ERR
IOUSB_FIFO_RD_ERR
IOUSB_NULL_PTR_ERR
IOUSB_BUS_INIT_ERR
IOUSB_TX_BUFFER_ERR
IOUSB_EP_BUSY_ERR
IOUSB_EP_INVALID_ERR
IOUSB_WAKEUP_DISABLE_ERR
IOUSB_BAD_FRAMENUM_ERR
IOUSB_CFG_DEV_ERR
IOUSB_BAD_IFCNUM_ERR
Value
892
893
894
895
896
897
898
910
920
921
930
931
932
933
934
935
936
937
938
939
940
941
942
943
Description
Serial communication interface characters requested out of range
Serial communication interface unsuccessful port initialization
Serial communication interface transmit overrun
Serial communication interface receive overrun
Serial communication interface framing failure
Serial communication interface parity failure
Serial communication interface break condition failure
Timer ID invalid
<Not Used>
<Not Used>
USB interface reset timeout
USB interface configuration timeout
USB interface endpoint configuration timeout
USB interface control endpoint packet setup failure
USB interface FIFO read failure
USB interface null pointer
USB interface bus initialization failure
USB interface null Tx buffer pointer
USB interface endpoint busy
USB interface invalid endpoint specified
USB interface bus unable to resume
USB interface bad frame number
USB interface not configured
USB interface invalid interface number
Preliminary
52
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertising