The Peripheral Sensor Interface 5 (PSI5) interface is a mainstay in automotive applications for data traffic between remote sensors and microcontrollers. The interface is a two-wire, current-modulation signal at data rates of 125 kb/s. Teledyne LeCroy oscilloscopes can be equipped with software-based decoders for a large number of industry standard serial data protocols. Many standard interfaces, including PSI5, are based on the fundamental building blocks of the Manchester or NRZ line encoding schemes. The following describes using Teledyne LeCroy’s Manchester protocol decode software for decoding PSI5 signals.
About the PSI5 Physical and Data Link Layers
Before examining the decoding of the specific signal used for this document, it may be instructive to cover some of the basic information regarding the PSI5 specification. The base specification can be examined in more detail at: psi5.org.
PSI5 uses two wires for both power supply to the sensors and data transmission. The ECU provides a pre-regulated voltage to the sensor. Data transmission from the sensor to the ECU is done by current modulation on the power supply lines. Current oscillations are damped by the ECU and the input impedances of the sensors.
Manchester encoding is used for data transmission. A logic "0" is represented by a rising slope and a logic "1"by a falling slope of the current in the middle of a given bit.
At the data link layer, each PSI5 data frame consists of:
- two start bits (S1 and S2), always coded as “0”
- one parity bit (P) with even parity or three CRC bits (C0, C1, C2)
- a payload data region (D0 … D[k-1]) with k = 10.. 28 bit
Data frames must be separated by a gap exceeding the duration of one bit. The different parts of the PSI5 data frame are illustrated in Figure 1.
Embarking on a Decode
Start by acquiring a signal. For purposes of this document, the signal being examined is a 125 kb/s PSI5 signal with a 13-bit data frame consisting of two start bits, 10 data bits, and one parity bit, as shown in Figure 1. In this case, the signal is current modulated, which typically indicates sensor-to-ECU communication. Conversely, ECUto-sensor communication is achieved with voltage modulation on the supply lines.
Once the signal is acquired and suitably displayed on the oscilloscope screen, use the Analysis drop-down menu at the top of the screen to access the Serial Decode dialog box, as shown in Figure 2.
Pressing the Protocol button in the Decode 1 row brings up a popup menu of different protocols (what appears in the menu is determined by which serial-decode software options are installed in the oscilloscope). The decode options are shown in Figure 3:
Select Manchester in the Protocol popup menu. Next, designate the source of the on-screen trace in this case, the trace is stored in Memory 1 or M1. The decoder works on all channels, math traces, and memory traces. In the Serial Decode dialog box, assign the on-screen trace to Decode 1 by turning Decode 1 on. Then press the Setup button for Decode 1, which opens the Decode Setup tab in the dialog box.
The Three Tabs: Basic, Decode, and Levels
Upon entering the Decode Setup tab, note its layout as shown in Figure 4:
Be sure to check the View Decode box. Note that Source 1 (Data) is set to M1 and the Protocol to Manchester.
The Basic tab will be open on the right by default. Try switching between the Basic, Decode, and Levels tabs. Then return to the Basic tab for the next section of the tutorial.
The Basic Tab
The Basic tab, shown at right in Figure 4, provides all of the fundamental controls required to allow proper bitlevel decoding. The configurable Manchester decoder supports a wide range of bit rates. Input the appropriate Bit Rate using the Bit Rate parameter in the Physical Layer portion of the Basic tab. The PSI5 specification dictates two fixed data transmission rates of 125 kb/s or 189 kb/s. The signal used for this example is at a bit rate of 125 kb/s.
The Timeout Definition for the gap between bursts comprises two parameters, Units and # Bits. The former can be set to either Bits or Seconds. If Bits is chosen, the range is from 1 to 100. If Seconds is used, the range is from 1 to 99.99 µs. As noted above, the gap between frames for PSI5 is specified as exceeding the duration of one bit. For purposes of this example, it has been set at 6 bits.
The Idle State, which complements the Timeout Definition parameters, may be set to either IdleHigh, IdleLow, or Don’t Care. Setting the Idle State helps to precisely define the separation gap between data bursts. For sensor-toECU communication in PSI5, the idle state between data frames corresponds to the quiescent current consumption of the sensor. Thus, the Idle State is set to IdleLow.
The Polarity may be set to either Falling = 0 or Falling = 1. This determines whether an edge falling through the threshold level is decoded as a logical 0 or a logical 1, respectively. The PSI5 specification dictates that an edge falling through the threshold level equates to a logical 1. Thus, for this example, Polarity is set at Falling = 1.
The next section of this document will cover the Decode tab. But to ensure that the bit-level decode is correct, zoom in on a portion of the decoded signal by drawing a rectangle around it on the screen. This opens a zoomed view of that portion as shown in the lower portion of the screen capture in Figure 5.
Note that in the zoomed view Z1, which corresponds to the highlighted portion in the center of M1, each binary 1 is represented by a positive half-bit period pulse followed by a negative half-bit period pulse. Similarly, a binary 0 is represented by a negative half-bit period pulse followed by a positive half-bit period pulse. This type of signaling is also called split–phase encoding. In this case, Polarity is set to physical Falling = 1.
Tap the Z1 annotation box and uncheck Trace On at the upper left. Close the Zoom dialog and reopen the Decode Setup dialog by tapping the Manchester data table. On the Decode tab, set Data Mode back to Words.
The Decode Tab
The next series of steps will cover the Decode tab (Figure 6), where decode at the word level is set up. First, note that when the Data Mode is switched to Bits, all of the word-level parameters on the tab are greyed out. Switching the Data Mode back to Bits makes them all active.
The First Transition Used (FTU) parameter accounts for items that may precede the actual data payload. These might include such elements as a preamble or a synchronization sequence. The default setting for FTU is zero; it can range in increments of one to a maximum of 400.
The Bit Stretch Tolerance parameter comes into play when transitions often occur at mid-bit. Due to hardware or signal-propagation issues, these mid-bits may not be perfectly equidistant. This parameter is adjusted to better decode jittery signals. After setting the Bit Rate on the Basic tab, the Bit Stretch Tolerance may require adjustment from its default setting of 20% to achieve stable decoding.
At the bottom of the Decode tab is a number of parameters for Grouping of Bits into Words. Figure 7 shows the PSI5 signal grouped into words with a zoomed view of a single burst.
The first step in the process is to ensure that the Data Mode is set to Words.
Within the Manchester decode software are tools and capabilities to group bits into Sync Bits, PrePad, Data Bits, and PostPad. Again, at the data link layer, each PSI5 data frame consists of two start bits, one parity or three CRC bits, and a payload data region.
PrePad bits comprise messages, frame control bits, or status bits, all of which are optional in the PSI5 specification. The trace used for this document has only two start bits in the PrePad section. In Figure 7, they are the portions of the bit stream seen with a purple overlay.
The Manchester decoder can parse from one to 32 Data bits. The PSI5 specification provides from 10 to 24 data bits in Data Region A, and up to 12 more bits in an optional Data Region B. The trace used for this document has 10 data bits. These are seen with a blue overlay.
PostPad bits serve to group information following the data bits. The Manchester decoder allows from zero to 32 PostPad bits representing a CRC, a checksum, or other protocol constructs. PSI5 specifies either a single parity bit or three CRC bits. In the trace used for this document, there is one parity bit. PostPad bits are seen with a yellow overlay.
The Level Tab
The last of the three tabs in the Decode Setup dialog box is the Level tab, shown in Figure 8.
Levels can be set using either percentage or absolute voltage values as determined by the Level Type setting. The Level setting itself determines the threshold that transitions must cross to be counted as transitions. The default value is 50% or 1.5 V for percentage and absolute level types, respectively.
Hysteresis settings are used to account for noisy signals with spikes that may create false transitions if they cross the Level threshold. It appears as a blue-shaded band centered vertically on the Level setting. The default Hysteresis value is 15%, but it may be varied from zero to 50%.
Teledyne LeCroy’s configurable Manchester decoder is an extremely capable tool, enabling users to explore the intricacies of PSI5 signals as well as others encoded with the Manchester scheme. Armed with a bit of foreknowledge of the signal under test, users may exploit the decoder’s nearly unlimited flexibility with respect to signal parameters to cleanly decode and display signals and extract data relative to their physical characteristics.