# Logic 2.2.16

**URL:** <https://discuss.saleae.com/t/logic-2-2-16/519>\
**Category:** Downloads / Releases\
**Created:** [May 15, 2020, 4:18pm UTC](https://discuss.saleae.com/t/logic-2-2-16/519 "2020-05-15T16:18:09Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![rani](https://yyz2.discourse-cdn.com/flex030/user_avatar/discuss.saleae.com/rani/32/343_2.png) [@rani](https://discuss.saleae.com/u/rani)\
**Post date:** [May 15, 2020, 4:18pm UTC](https://discuss.saleae.com/t/logic-2-2-16/519/1 "2020-05-15T16:18:09Z")

</div>

## **Download Links**

- [Windows](https://downloads.saleae.com/logic2/Logic+Setup+2.2.16-master.exe)
- [Linux](https://downloads.saleae.com/logic2/Logic-2.2.16-master.AppImage)
- [MacOS](https://downloads.saleae.com/logic2/Logic-macOS-2.2.16-master.zip)

## What’s new

- Capture presets - Save, load and share your configurations  
 ![](https://media.giphy.com/media/VekncLUraKC3K3Pla6/source.gif)
- Per-channel glitch filter setting  
 ![](https://media.giphy.com/media/VIWa0yWHY3Rd6c8q8z/source.gif)

## Improvement

- Persist the width of data table columns
- Unique analyzer names when adding multiple analyzers of the same type

## Bug fixes

- Fixed bug where sometimes the timing display would show inaccurate absolute times
- Fixed broken keyboard shortcuts (arrows, jump trigger)
- Graph renders correctly when scaling the UI down
- Properly reload extensions
- Memory management & trimming improved for looping and triggered captures
- Fixed Linux blank screen bug (Upgrade to Electron 8)
- Fixed non-breaking bug when starting and stopping captures rapidly
- Possible fix for a critical bug that’s causing capture failures
- Fixed SMBus and Simple Parallel analyzers

---

<div class="post-metadata">

**Author:** ![rani](https://yyz2.discourse-cdn.com/flex030/user_avatar/discuss.saleae.com/rani/32/343_2.png) [@rani](https://discuss.saleae.com/u/rani)\
**Post date:** [May 15, 2020, 8:47pm UTC](https://discuss.saleae.com/t/logic-2-2-16/519/2 "2020-05-15T20:47:32Z")

</div>

Pinned on May 15, 2020, 8:47pm UTC



---

<div class="post-metadata">

**Author:** ![rani](https://yyz2.discourse-cdn.com/flex030/user_avatar/discuss.saleae.com/rani/32/343_2.png) [@rani](https://discuss.saleae.com/u/rani)\
**Post date:** [May 15, 2020, 8:47pm UTC](https://discuss.saleae.com/t/logic-2-2-16/519/3 "2020-05-15T20:47:37Z")

</div>

Made this a banner on May 15, 2020, 8:47pm UTC. It will appear at the top of every page until it is dismissed by the user.



---

<div class="post-metadata">

**Author:** ![Jonathan](https://yyz2.discourse-cdn.com/flex030/user_avatar/discuss.saleae.com/jonathan/32/2142_2.png) [@Jonathan](https://discuss.saleae.com/u/Jonathan)\
**Post date:** [May 15, 2020, 10:09pm UTC](https://discuss.saleae.com/t/logic-2-2-16/519/4 "2020-05-15T22:09:55Z")

</div>

Nice improvements!

Also some good news (technically occurred several releases ago), is that the C++ plugin which I mentioned back in [Logic 2.2.5](https://discuss.saleae.com/t/logic-2-2-5/333/11) no longer has the rendering issue that blacks out the GUI!

There are still issues here which I will attempt to explain here and maybe this could be looked into if there is an internal issue in the implementation, something that has yet to be implemented to support the old versions behaviors/features, or a general compatibility issue with the new implementation which won’t be fixed for some reason.

In the figure below I am committing a frame that is intended for only a specific channel; in this case MISO which I outline the in green.

What I am finding is that committing this frame is generating bubble text to be rendered on unrelated channels. Normally my plugin does not render bubble text on the SPI clock channel but for testing purposes I added in the statement below:

In SpiAnalyzer::SetupResults() method:  
mResults-\>AddChannelBubblesWillAppearOn(mSettings-\>mClockChannel);

Furthermore in SpiAnalyzerResults::GenerateBubbleText() I checked the “channel” parameter to see if the clock channel is specified, if so I return immediately thus no call to AddResultString() was performed for this channel.

In V1 this meant no bubble text / blue frame would be drawn on the channel at the currently processed frame’s timespan. This seems to have changed in V2.

So with this behavior I have 1 frame that is supposed to be drawn on MISO and instead it is also being drawn on MOSI and SCLK simply because these channels are added via AddChannelBubblesWillAppearOn().

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/saleae/original/1X/eebf75b7f6d9c52e598a302393ad016830a4b4f2.png)

Removing my modification for AddChannelBubblesWillAppearOn() it looks like this:

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/saleae/original/1X/ddf9b843924da79c2cad514e6ee35b64b99be1f0.png)

For reference here is how it is suppose to be rendered.

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/saleae/original/1X/56bfbecfb1b0ac24d749e011483ab0b1ccb3dd98.png)

As you can see above, the “TIME” frame is being drawn on top of 4 other frames that were actually meant to be rendered on MOSI.

I believe with the standard Saleae plugins MOSI and MISO data are combined into a single frame. This is the main difference between this implementation and the standard SPI plugin. I believe any plugin that would be developed as a bi-directional asynchronous solution (i.e. think the standard serial plugin but using both TX and RX within the same plugin instance) would be problematic to support in this current state; of course in my case SPI is synchronous, but I break down the frame structure logically to be more user friendly in consuming the information (rather than lumping multiple fields into a single frame or breaking up a large frame into separate components). So I think this is an issue that should be resolved to make the framework more capable.

---

<div class="post-metadata">

**Author:** ![siddacious](https://yyz2.discourse-cdn.com/flex030/user_avatar/discuss.saleae.com/siddacious/32/290_2.png) [@siddacious](https://discuss.saleae.com/u/siddacious)\
**Post date:** [May 16, 2020, 1:39am UTC](https://discuss.saleae.com/t/logic-2-2-16/519/5 "2020-05-16T01:39:03Z")

</div>

Ooh, I’m glad to see the Simple Parallel analyzer 🙂

---

<div class="post-metadata">

**Author:** ![rei\_vilo](https://avatars.discourse-cdn.com/v4/letter/r/0ea827/32.png) [@rei\_vilo](https://discuss.saleae.com/u/rei_vilo)\
**Post date:** [May 16, 2020, 5:18pm UTC](https://discuss.saleae.com/t/logic-2-2-16/519/6 "2020-05-16T17:18:01Z")

</div>

Most comments I posted for [release 2.2.15](https://discuss.saleae.com/t/logic-2-2-15/508/6) remain valid.

- Turn the label of the setting being modified in bold white for better readability —just like some elements when being hovered.

 ![Capture 2020-05-16 à 19.12.54](https://canada1.discourse-cdn.com/flex030/uploads/saleae/original/1X/ab6b36173d96601ee8c07d16b99d32d1327cfcb2.png)

- The trigger is not listed in the **Trim Data** pane.

 ![Capture 2020-05-16 à 19.01.10](https://canada1.discourse-cdn.com/flex030/uploads/saleae/original/1X/a4d24bba8fc0231c75b384ee811242a7c2ef8d96.png)

- I still don’t get the logic between the new lines on the Terminal view.

I would suggest adding one new line before each `write to` and `read to` —and maybe changing the latter for `read from`.

 ![Capture 2020-05-16 à 19.07.51](https://canada1.discourse-cdn.com/flex030/uploads/saleae/original/1X/c532e2b320ae8f8bb5d665682b20fb6a6c4b3cb5.png)

Thank you!

---

<div class="post-metadata">

**Author:** ![rei\_vilo](https://avatars.discourse-cdn.com/v4/letter/r/0ea827/32.png) [@rei\_vilo](https://discuss.saleae.com/u/rei_vilo)\
**Post date:** [May 16, 2020, 5:26pm UTC](https://discuss.saleae.com/t/logic-2-2-16/519/7 "2020-05-16T17:26:15Z")

</div>

- Does the **Terminal** work for SPI signal?

The **Data Table** is populated, but not the **Terminal**.

 ![Capture 2020-05-16 à 19.24.54](https://canada1.discourse-cdn.com/flex030/uploads/saleae/original/1X/3476aaddd6050570f5fa7fa424d3122edf77bdd6.png)

 ![Capture 2020-05-16 à 19.24.15](https://canada1.discourse-cdn.com/flex030/uploads/saleae/original/1X/5a8804cb3ea3457fb9156440de4bae518d17ead4.png)

---

<div class="post-metadata">

**Author:** ![rei\_vilo](https://avatars.discourse-cdn.com/v4/letter/r/0ea827/32.png) [@rei\_vilo](https://discuss.saleae.com/u/rei_vilo)\
**Post date:** [May 16, 2020, 5:29pm UTC](https://discuss.saleae.com/t/logic-2-2-16/519/8 "2020-05-16T17:29:48Z")

</div>

- Very nice addition to save and retrieve presets!

![Capture 2020-05-16 à 19.28.22](https://canada1.discourse-cdn.com/flex030/uploads/saleae/original/1X/fb0bc0945617c8a13f9bd8c021782a3a5c2b1fd1.png)

However, how to use **Import Preset**?

**Manage Presets** allows to load the presets saved through **Save Presets As**.

---

<div class="post-metadata">

**Author:** ![rani](https://yyz2.discourse-cdn.com/flex030/user_avatar/discuss.saleae.com/rani/32/343_2.png) [@rani](https://discuss.saleae.com/u/rani)\
**Post date:** [May 18, 2020, 3:58pm UTC](https://discuss.saleae.com/t/logic-2-2-16/519/9 "2020-05-18T15:58:01Z")

</div>

> However, how to use **Import Preset**?

You can export a preset from the manage presets dialog and share it with others. Similarly, you can import a preset to add it to your list of presets

> **Manage Presets** allows to load the presets saved through **Save Presets As**.

What do you mean?

---

<div class="post-metadata">

**Author:** ![rani](https://yyz2.discourse-cdn.com/flex030/user_avatar/discuss.saleae.com/rani/32/343_2.png) [@rani](https://discuss.saleae.com/u/rani)\
**Post date:** [May 18, 2020, 3:58pm UTC](https://discuss.saleae.com/t/logic-2-2-16/519/10 "2020-05-18T15:58:42Z")

</div>

It might be a bug, can you share with us the capture? We’d love to look into this

---

<div class="post-metadata">

**Author:** ![markgarrison](https://yyz2.discourse-cdn.com/flex030/user_avatar/discuss.saleae.com/markgarrison/32/23_2.png) [@markgarrison](https://discuss.saleae.com/u/markgarrison)\
**Post date:** [May 18, 2020, 6:18pm UTC](https://discuss.saleae.com/t/logic-2-2-16/519/11 "2020-05-18T18:18:28Z")

</div>

Hi @Jonathan,

I think there are two different problems here, both of which we should look at.

1. you’re right, in the SDK, if `GenerateBubbleText` is called, and your code just calls `ClearResultStrings` and never adds any result strings, it should not be displayed on the given channel. I haven’t tested this myself, but I don’t think we took this into account when we implemented this for Logic 2. It should be a simple fix - however, I think we have a larger problem.

2. The original analyzer SDK was not intended to support overlapping frames. This limitation would prevent you from displaying different bubble ranges on one channel and another, which is what your analyzer is doing. In the V1 software, this happened to work because most of the frame rendering code just looked at the starting sample of each frame - the ending sample was largely ignored.  
The V2 software implements bubble merging code, which may break this behavior - although I haven’t tested it yet. I suspect the bubble merging code requires all frames to be in ascending order of starting sample number and ascending order of ending sample number. If that’s the case, that would probably break for analyzers like yours.

We’re working on a solution for this in Python High Level Analyzers (HLAs). HLAs also only support a single stream of output frames at the moment, we’re still working out how to support outputting frames on multiple layers or streams, like you’re trying to do here.

Could you share your analyzer source code, so we could use it to reproduce the first issue over here for debugging? If not, we can just modify our SPI analyzer to mimic the behavior.

I’ll talk to the team about the second issue you’re seeing, but I think we’ll mainly focus on how to support this in the HLA API. Could you send any details about what you’re trying to accomplish? Any thoughts on what functionality you would like to see would be great!

---

<div class="post-metadata">

**Author:** ![markgarrison](https://yyz2.discourse-cdn.com/flex030/user_avatar/discuss.saleae.com/markgarrison/32/23_2.png) [@markgarrison](https://discuss.saleae.com/u/markgarrison)\
**Post date:** [May 18, 2020, 6:20pm UTC](https://discuss.saleae.com/t/logic-2-2-16/519/12 "2020-05-18T18:20:54Z")

</div>

> [@rei\_vilo](#):
>
> - I still don’t get the logic between the new lines on the Terminal view.
> 
> I would suggest adding one new line before each `write to` and `read to` —and maybe changing the latter for `read from` .

Hi @rei_vilo! Rani already asked for captures, but I want to also ask for samples of your I2C and SPI data. We have some sample data over here but it’s very limited - the terminal works fine for it, but it’s not a realistic representation of real data. That would help me debug the terminal behavior.

---

<div class="post-metadata">

**Author:** ![Jonathan](https://yyz2.discourse-cdn.com/flex030/user_avatar/discuss.saleae.com/jonathan/32/2142_2.png) [@Jonathan](https://discuss.saleae.com/u/Jonathan)\
**Post date:** [May 18, 2020, 10:10pm UTC](https://discuss.saleae.com/t/logic-2-2-16/519/13 "2020-05-18T22:10:13Z")

</div>

Hi Mark,

> Could you share your analyzer source code, so we could use it to reproduce the first issue over here for debugging? If not, we can just modify our SPI analyzer to mimic the behavior.  
> The link I provided in the previous post has details on this but here are the links for convenience:

> **[Releases · hms-networks/AbccSpiAnalyzer](https://github.com/hms-networks/AbccSpiAnalyzer/releases)**
>
> Saleae Logic Plugin for Analyzing HMS Anybus CompactCom SPI Communication - hms-networks/AbccSpiAnalyzer

The plugin supports simulation but I think that feature is still missing in V2, so if you need a capture the link here has a file which can be used:

> [@Logic 2.2.5](https://discuss.saleae.com/t/logic-2-2-5/333/11):
>
> Here are some issues that I have come across in the V2. NOTE: This is utilizing a plugin I wrote which I understand may not be in a supported state right now. To test the behaviors below the plugin can be obtained here: [https://github.com/hms-networks/AbccSpiAnalyzer/releases](https://github.com/hms-networks/AbccSpiAnalyzer/releases) And a test capture is available here: [AbccSpi\_Example\_Startup.sal](https://discuss.saleae.com/uploads/short-url/kRq92Y7W7oCtDerBmOV5Nkk7kP.sal) (56.4 KB) An analyzer plugin’s committed frames seems to now always create an entry in the “Decoded Protocols” subwindow even through no tabular text w…

The plugin is quite complex and not the easiest to understand what is going on; so here are some additional details that might help:

The actual SPI packet structure is as follow (taken from the ABCC40 Software Design Guide):

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/saleae/original/1X/2836bcd50da638e1fbc5858a3515da07a709ccae.png)  
**NOTE** : What is shown in the image above is one SPI packet (one instance where chipselect may assert low and then deassert). What I show within the red box is what my previous images correlate with. In the same timespan as MISO’s “NETTIME” field, the MOSI has “APP STAT”, “INT MASK”, and 2 bytes of the message data field which in this case I implement each byte of the message field as its own V1 frame.

Effectively my plugin is creating the following V1 frames:

```auto
MOSI (CH1): [Frame #1][Frame #2][Frame #3][Frame #4]
MISO (CH2): [Frame #5]
TIME: --------------------------------------------------------------->

```

Over this time span there are a total of 5 frames added. 1 for MISO, and 4 for MOSI. I use the flags field of the V1 Frame to indicate whether the frame is for MOSI or MISO (if looking at the source code this is “SPI\_MOSI\_FLAG”).

The logic implemented in GenerateBubbleText() is separated into a few parts. The main two sections consist of:

- Logic that ONLY concerns MOSI
- Logic that ONLY concerns MISO.

Effectively, when a MOSI-indicated frame (i.e. the special SPI\_MOSI\_FLAG is asserted in the V1 Frame’s flags field) is passed into GenerateBubbleText() with the “channel” parameter set to MISO, this frame (in most cases) will be skipped (no call to AddResultString is made). This is how this separation of MOSI/MISO frame structure is supported.

- The exceptions to this is for common/shared events that both channels exhibit at the same time. This for instance is for things like an SPI fragment where the SPI chipselect deasserts before the end of the packet is reached. Such an event may be handled for both MOSI and MISO. In these cases the frame time span is identical (and the same exact V1 frame).

Comparatively, the Saleae SPI plugin does this (where the frame size is specified by user settings):

```auto
MOSI (CH1): [Frame #1][Frame #2][Frame #3][Frame #4]
MISO (CH2): [Frame #1][Frame #2][Frame #3][Frame #4]
TIME: --------------------------------------------------------------->

```

In other words, a V1 frame that is committed contains data for both MISO and MOSI. This means the SPI packet framing structure must be identical for both MISO/MOSI. The previous example avoids this by committing frames for MOSI independent of MISO.

During initial development of the plugin I considered the alternate approach where the plugin would always use a frame size of 16-bits this would make both MOSI and MISO have the same frame size.

Current framing structure:

```auto
MOSI (CH1): [APP STAT][INT MASK][MSG DATA][MSG DATA]
MISO (CH2): [NETTIME]
TIME: --------------------------------------------------------------->

```

Alternate framing structure (16-bit frames):

```auto
MOSI (CH1): [APP STAT + INT MASK][MSG DATA0 + MSG DATA1]
MISO (CH2): [NETTIME LO-WORD][NETTIME HI-WORD]
TIME: --------------------------------------------------------------->

```

I opt’d against it since using a field’s actual data size as the frame size is more intuitive than splitting up a 32-bit value into two 16-bit frames. And certain features like the CRC32 field where computation is performed and the bubble text will indicate to the user if the CRC32 is invalid would not be as clean of an implementation.

- NOTE: You might wonder why did I not consider 32-bit framing structure instead of 16-bit frames? Well the SPI packet structure does not have this guarantee. The protocol defined here only guarantees the number of bytes transmitted will always be evenly divisible by 2.

---

<div class="post-metadata">

**Author:** ![rei\_vilo](https://avatars.discourse-cdn.com/v4/letter/r/0ea827/32.png) [@rei\_vilo](https://discuss.saleae.com/u/rei_vilo)\
**Post date:** [May 19, 2020, 6:40am UTC](https://discuss.saleae.com/t/logic-2-2-16/519/14 "2020-05-19T06:40:09Z")

</div>

I posted the SPI trace at the [Samples thread](https://discuss.saleae.com/t/saleae-team-we-would-love-samples-of-protocol-captures/520/9).

---

<div class="post-metadata">

**Author:** ![rei\_vilo](https://avatars.discourse-cdn.com/v4/letter/r/0ea827/32.png) [@rei\_vilo](https://discuss.saleae.com/u/rei_vilo)\
**Post date:** [May 19, 2020, 6:52am UTC](https://discuss.saleae.com/t/logic-2-2-16/519/15 "2020-05-19T06:52:09Z")

</div>

@rani Sorry for not having been clear enough about the presets.

Actually, there are two different flows: one internal and the other external.

The menu **Save Preset As…** and **Manage Presets** work together. Presets are saved internally.

To use the **Import Preset** , the preset needs to be saved externally to the disk through the **Export** button on the Presets pane.

 ![Capture 2020-05-19 à 08.41.24](https://canada1.discourse-cdn.com/flex030/uploads/saleae/original/1X/08c17cd2120b4d392ea59bf74aa0b667f232e632.png)

 ![Capture 2020-05-19 à 08.44.45](https://canada1.discourse-cdn.com/flex030/uploads/saleae/original/1X/5fc403b80cdb6fac8971eb21c6b31f06bc3ac4b3.jpeg)

_My fault: I didn’t noticed the **Export** button as it was light grey on dark grey._

It would be nice to make the flows management more explicit and consistent,

- either by removing the **Import Preset** from the **File** menu and moving it to the Manage Preset pane,
- or by adding an **Export Preset** option to the **File** menu.

---

<div class="post-metadata">

**Author:** ![markgarrison](https://yyz2.discourse-cdn.com/flex030/user_avatar/discuss.saleae.com/markgarrison/32/23_2.png) [@markgarrison](https://discuss.saleae.com/u/markgarrison)\
**Post date:** [May 30, 2020, 1:57am UTC](https://discuss.saleae.com/t/logic-2-2-16/519/16 "2020-05-30T01:57:39Z")

</div>

Removed this banner on May 30, 2020, 1:57am UTC. It will no longer appear at the top of every page.


