Logic Sniffer 102

From DP

Jump to: navigation , search

Work in progress... Please contribute if you can.

Contents

Capture setup

OLS-setup.png

Analyzer port, speed

The OLS uses a USB virtual serial port, choose the correct port from the drop down menu. Ports should be detected automatically in v0.9.1+ of the LogicSniffer client. The OLS runs at up to 921600bps.

Number scheme

See the inside and outside number scheme illustration in Logic Sniffer 101.

Sampling clock source

The OLS can be driven by an external clock source through the CKI header.

Sampling rate

Choose a sampling rate from the drop down menu. The OLS supports up to 200MHz sampling speeds.

  • Limitation on 200MHz sampling: 2 groups, no noise filter (?)

Channel groups

Select the channel groups to capture. The location of the channel groups depends on the inside/outside number scheme setting.

Sample depths

Maximum number of samples
Number of channels Maximum samples
8 (one group) 24K
16 (two groups) 12K
24 (three groups) 8K
32 (four groups) 6K

Disable unused channel groups to get the maximum number of samples. If you only need to analyze 8 channels, the OLS can capture up to 24K samples. With 32 channels, however, the samples are reduced by a quarter.

Bitstream v2.12+ required for dynamic memory adjustment.

Noise filter

Run Length Encoding (RLE)

Run Length Encoding is a compression method that records the time between logic changes, instead of snapshot of the logic at each point in time.

  • A common issue is that sampling never ends. This will happen if there are no changes to record.
  • The highest channel is not available in RLE modes. It is used in the RLE protocol.
See updates for the v3 Demon Core that supports RLE

Simple triggers

OLS-trigger-config.png

  1. Click the trigger tab on the capture settings window
  2. Click the trigger box to enable triggers
  3. Use the slider to set the number of samples to return from before and after the trigger
  4. Leave trigger type as Simple
  5. Click some mask boxes, marked channels trigger the logic capture. Only channels with the mask bit set can trigger a capture
  6. Click the value box to set the trigger on a high level (1), or leave it black for a low level trigger (0)

Complex parallel triggers

You can also create multi-stage triggers, but that's a little more complicated. These triggers require up to four conditions to be satisfied before sampling starts. This can help hone in on very specific parts of protocols.

Complex trigger can be made of multiple stages triggering in sequences and or in parallel.

Example source. To do: explain arm, mode, channel, action, and delay options.

Example 1, AND trigger

Ols-ct-ex1.png

Let say i have a state machine on 4 channels i want to trigger the acq after a reset 0000 AND state 0001 so it will be a 2 stages triggers

Stage 1

Ols-ex1-st1.png

Stage 1 is the yellow line in the example.

  • Select type - complex
  • mode - parallel
  • arm - immediately i want to detect my reset 0000 right away
  • mask 1111 channel 0 to 3
  • value 0000
  • action unchecked so it will arm other stage's trigger

Stage 2

Ols-ex1-st2.png

Stage 2 is the red line in the example.

  • mode - parallel
  • arm - On level 1 so this stage will be arm after stage 1 has been triggered
  • mask 1111
  • value 0001
  • action checked - start capture

Example 2, OR trigger

Ols-ct-ex2.png

Now i want to trig capture at state 0001 OR state 0010

Stage 1

Ols-ex2-st1.png

This is the red line in the example.

  • select type - complex
  • mode - parallel
  • arm - immediately
  • mask 1111
  • value 0001
  • action checked - start capture

Stage 2

Ols-ex2-st2.png

This is not shown in the output, conditions for this trigger were not met.

  • mode - parallel
  • arm - immediately
  • mask 1111
  • value 0010
  • action checked - start capture

Example 3, AND + OR trigger

Ols-ct-ex3.png

Now i want to trig capture at state 0001 OR state 0010 after a reset 0000

Stage 1

Ols-ex3-st1.png

Stage 1 is satisfied at the green and yellow line, but the trigger doesn't start until the red line when the stage 3 is completed.

  • select type - complex
  • stage1 - mode - parallel
  • arm - immediately
  • mask 1111
  • value 0000
  • action unchecked

Stage 2

Ols-ex3-st2.png

This is not shown in the example, this trigger was never used.

  • mode - parallel
  • arm - On level1
  • mask 1111
  • value 0001
  • action checked - start capture

Stage 3

Ols-ex3-st3.png

Stage 3 is the red line.

  • mode - parallel
  • arm - On level1
  • mask 1111
  • value 0010
  • action checked - start capture

Complex serial triggers

Example 1, Capture a UART character

Ols102-capture-uart-car.jpg

Bus Pirate is transmitting :0) using syntax [":""o"")"]. The trigger char is "o" , and the result cursor is place kindof the middle of the character "o".

At 8N1 serial UART settings the trigger for "o" is 011110110:

  • 0 = start
  • 1111011 = "o" in reverss
  • 0 = stop

Sample close to the actual serial UART baud rate. Other sampling freqs are too far from the bps rate for the serial triggers to work.

  • sampling at 10k is a little bit over 9600bps
  • sampling at 20k is a little bit over 19200bps

It seems there no resampling of the capture buffer to match the target uart frequency so only near sampling to uart freq works.

Instead of [":o)"], I chunked the 3 characters in 3 send commands to give a bit of extra time between chars.

  • At 20k sending [":o)"] is catch by the trigger but the UART decoder finds timing errors and wrong last character
  • At 20k sending [":""o"")"] is catch by the trigger and the UART decoder finds the good characters with some timing errors

Few bugs tho, if i change sampling freq between trigger scans and uart tool uses, i have to shutdown the software and unplug and replug the OLS board or the trigger will never find a match.

From here.

Other Stuff