STN1100 Family Reference and Programming Manual PRELIMINARY
STN1100 Table of Contents Overview ......................................................................................................................................................... 3 1.0 2.0 Feature Highlights ......................................................................................................................................... 3 3.0 Typical Applications ................................................................................................................................
Family Reference and Programming Manual 1.0 Overview On-Board Diagnostics, Second Generation (OBD-II) is a set of standards for implementing a computer based system to control emissions from vehicles. It was first introduced in the United States in 1994, and became a requirement on all 1996 and newer US vehicles. Other countries, including Canada, parts of the European Union, Japan, Australia, and Brazil adopted similar legislation.
STN1100 4.0 Communicating with the STN11xx The STN11xx uses a three-wire UART connection that is CMOS/TTL compatible. The UART settings are: • • • • • 38400 baud (default) 8 data bits No parity bit One stop bit No handshaking The baud rate is software-selectable (see STBR). Note: The UART Tx pin is configured as an open drain output and requires a 10 kΩ pull-up resistor. Maximum pullup voltage is 5 volts. Once powered and connected, the STN11xx will display the welcome prompt: ELM327 v1.
Family Reference and Programming Manual 5.0 AT Commands This section lists the AT commands supported by the STN11xx. Every effort was made to maintain compatibility with legacy ELM327 software, and for most purposes, these commands work exactly as described in the ELM327 datasheet. Please refer to the “AT Commands” section of the ELM327 datasheet for the complete description of the AT command set. Asterisk (*) marks default setting.
STN1100 OBD Commands Command AL AR AT 0/1/2 BD BI DP DPN H 0/1 MA MR hh MT hh NL PC R 0/1 RA hh S 0/1 SH hhh SH hh hh hh SP h SP Ah SR hh ST hh TP h TP Ah Description Allow long (>7 byte) messages Automatically receive Adaptive timing off, auto1*, auto2 Buffer dump Bypass initialization sequence Describe current protocol Describe current protocol by number Headers off*/on Monitor all Monitor for receiver hh Monitor for transmitter hh Normal length messages* (7 bytes max) Protocol close Responses off/on* Se
Family Reference and Programming Manual Command CAF 0/1 CF hhh CF hh hh hh hh CFC0/1 CM hhh CM hh hh hh hh CP hh CRA hhh CRA hh hh hh hh CS D 0/1 FC SM h FC SH hhh FC SH hh hh hh hh FC SD [1-5 bytes] RTR V 0/1 Description Automatic formatting off/on* Set ID filter to hhh Set ID filter to hh hh hh hh Flow control off/on* Set ID mask to hhh Set ID mask to hh hh hh hh Set CAN priority to hh (29 bit only) Set CAN receive address to hhh Set CAN receive address to hh hh hh hh Show CAN status counts Display of th
STN1100 5.1 Supported ELM327 Programmable Parameters Programmable parameters are configuration values stored in non-volatile memory. Please refer to the “Programmable Parameters” section of the ELM327 datasheet for a full description of this functionality. All programmable parameters can be turned off and reset to their default values by holding RESET ¯¯¯¯¯¯ input low for 5 seconds, until PC Rx LED starts flashing rapidly.
Family Reference and Programming Manual 6.0 ST Commands ST commands are designed to provide extended functionality, without breaking compatibility with the ELM327 AT command set. Both command sets are available simultaneously.
STN1100 CAN Specific Command CAFCP ttt, rrr CCFCP Description Add flow control 11-bit ID pair Clear all Flow Control 11-bit ID Pairs Monitoring Command M MA Description Monitor OBD bus using current filters Monitor all messages on OBD bus Command FAP [pattern] , [mask] FAB [pattern] , [mask] FAFC [pattern] , [mask] FCP FCB FCFC Description Add pass filter Add block filter Add flow control filter Clear all Pass filters Clear all Block filters Clear all Flow Control filters Filtering 6.
Family Reference and Programming Manual 1110 1120 Print the device manufacturer ID string. On STN1110, this command returns “Generic” by default. one-time programmable microOBD 200 SN X.Y is the device hardware revision number. Print the device serial number. Serial numbers for all devices are 12 digits long, and begin with the device ID, making each serial number unique across all STN11xx devices: Example: OBDLink r1.
STN1100 UART sleep/wakeup triggers on/off. Each of the two parameters can be specified as “on” or “off”. The first parameter specifies sleep trigger (UART inactivity timeout) setting, second – wakeup trigger (low pulse on UART Rx input) setting. The defaults are sleep = off, wake = on. SLUIT sec Set UART inactivity timeout. The parameter is specified in seconds (decimal). The default is 1200 (20 minutes). SLUWP min, max Set UART wakeup pulse timing. The parameters are specified in microseconds.
Family Reference and Programming Manual 6.6 Filtering ST Commands Each of the Add Filter commands dynamically allocates a block of RAM to store the filter, and can return OUT OF MEMORY error if there is not enough memory to add the filter. If this occurs, OBD requests may start generating the OUT OF MEMORY errors because the OBD memory buffer is located in the same RAM. FAP [pattern], [mask] Add a pass filter. Takes two parameters: pattern and mask.
STN1100 7.0 OBD Requests The STN11xx uses the same format for OBD requests as the ELM327. Please refer to the “OBD Commands” section of the ELM327 datasheet for information. See the following standards for more information about legislated On-Board Diagnostics: SAE J1979: E/E Diagnostic Test Modes. This document describes data reporting requirements of On-Board Diagnostic regulations in the United States and Europe, and any other region that may adopt similar requirements in the future.
Family Reference and Programming Manual address of the receive (or transmit) node passed as the parameter. STM command uses all filters “as-set”: it does not modify them in any way. ATSR turns off the automatic filtering mode, and sets up a pass filter to accept messages sent to the receive address provided as the parameter to ATSR. In order to directly manipulate the filters, use the filtering ST commands described in section 6.6. 8.
STN1100 9.0 CAN Message Reception For most users, CAN message reception works “out of the box”, as configured by default. However, for those users who wish to take full advantage of the STN11xx’s CAN architecture, it is important to understand what goes on behind the scenes. You will notice that the flowchart in Figure 3 is simply a more detailed version of the flowchart from Figure 2.
Family Reference and Programming Manual of frame it is (single, first, consecutive, or flow control). If the frame is not a valid ISO 15765-2 first frame, or if flow control is off, it is passed to the block filters. If the frame is a valid ISO 15765-2 first frame, and flow control is on, what happens next is determined by the ID type.
STN1100 10.0 PowerSave Functionality STN11xx features a sophisticated power management system (PowerSave™) that can be used to put the device in low power mode. The primary purpose of PowerSave is to prevent the vehicle’s battery from being drained when the device is left plugged in for extended periods of time (e.g., permanent in-vehicle installations). Several sleep and wakeup triggers are available. Each trigger can be independently enabled or disabled.
Family Reference and Programming Manual 10.2.3 External SLEEP Input Another automatic sleep trigger is the external SLEEP input. This trigger is off by default. When enabled (using the STSLX command), it allows the external circuitry to control the sleep state. When STN11xx senses a logic low on the SLEEP pin, it immediately aborts any OBD reception in progress, or monitoring command that is active at the time, and prints the command prompt.
STN1100 • • • In sleep mode, current consumption is about 37 mA (54 mA if the USB cable is plugged in and the virtual COM port is closed). External SLEEP control input is not enabled (ATIGN always returns “ON”, and STSLXS always returns “WAKE”). The “STATUS” LED is not controlled by the STN1100, and remains on during sleep. 10.5.2 OBDLink Hardware Rev 2.x OBDLink devices with hardware revision 2.x implement the SLEEP input as “host present”, which detects voltage on the USB connector.
Family Reference and Programming Manual 11.0 Error Messages When hardware problems or transmission errors are encountered, the STN11xx will display an error message. For a list of other possible error messages and their descriptions, please refer to the “Error Messages” section of the ELM327 datasheet. OUT OF MEMORY This error message is displayed when there is not enough available RAM to complete the requested operation. For example, this may happen if too many filters are set. STN1100FRPMA www.
STN1100 Appendix A: Revision History Revision A (October 28, 2009) Initial release of this document. 22 of 23 www.obdsol.
Family Reference and Programming Manual Appendix B: Contact Information OBD Solutions 1819 W Rose Garden Ln Ste 3 Phoenix, AZ 85027 United States Phone: Fax: Email: Web: +1 623.434.5506 +1 623.321.1628 sales@obdsol.com www.obdsol.com STN11XXDSB www.obdsol.