This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Sharing Saleae Plugin for analyzing TRF7970A SPI captures with the community

Other Parts Discussed in Thread: TRF7970A

Hi All:

During our struggle with the TRF7970A to make it work in ISO14443-A emulation mode we spent a lot of time analysing the SPI captures Josh Wyat sent to us. That job is frustrating and has no fun at all.

In collaboration with Enric Pons (who is also in the middle of the same 'battle') we created one plug-in for the Saleae software and we want to share it so it could also help others.

The file (DLL), if I uploaded it right, can be downloaded from here:

 [http://e2e.ti.com/cfs-file.ashx/__key/communityserver-discussions-components-files/667/7608.VLorzSPIAnalyzer.rar].

For installing the plug-in simply copy the DLL to the "Analysers" directory in Saleae's installation directory and restart the Logic application (in case it is running).

Usage is similar to that of the standard SPI analyser. Remove the SPI analyser and add the "V.Lorz's SPI Analyser". Configure it with the same settings as the SPI analyser (in fact I used that analyser as base).

You'll note no visual difference, the difference comes when you export the data using the plug-in's export functionality.

This is a partial sample output:

[0000] 0                  59 C0 > ReadRegister();                                             NFCTargetProtocol=[RF Above Wakeup] [RF Above Coll] [1rstCmd is ISO14443A] [Speed=RESERVED]
[0001] 1.04375e-005       6C 14 3E                         > ContinuousReadRegister();                                   IRQStatus=[CRC Error] [Byte Framing/EOF Error] Collision position and interrupt mask register=3E [Interrupt enable for collision error] [Interrupt enable for Parity] [Interrupt enable for CRC] [Interrupt enable for FIFO] ;
[0002] 2.85e-005          83                               > SendCommand( Software Initialization );
[0003] 3.4875e-005        80                               > SendCommand( Idle );
[0004] 4.1375e-005        96                               > SendCommand( Block Receiver );
[0005] 4.8125e-005        00 21                            > WriteRegister();                                            Chip Status Control=21; [5V Oper] [Receiv Auto-enable] [AGC Off] [Main RX Input] [Full power] [RF out Active] [Direct mode 2] [Active Mode] ;
[0006] 5.925e-005         01 24                            > WriteRegister();                                            ISO Control=24; [ISO15693 low bit rate, 6.67 kbps, double subcarrier, 1 out of 4] [NFC or Card Emulation Mode] [Direct Mode 0] [RX CRC (CRC is present in the response)] ;

Disclaimer: the plug-in is not fully tested, only thing we can say is it serves for 'our' purpose and simplifies 'our' job, we cannot guarantee anything.

We hope it's useful.

Regards, Victor

  • Victor,

    This sounds great!  I tried to use it, but maybe I am not selecting the correct export settings as i dont see the analyzed data as shown in your screenshot.  Can you please clarify what export settings you used?  Thanks!

  • Hi Eddie,

    Click in the 'Settings' icon for the Analyser and select the option 'Export', then 'Export as text/cvs file', like in the image below.

    If I find some time in the future, I'll give it one more apporpiated name for the analyzer and make the source code also available.

    Not all registers are decoded, only the ones that were of help for us.

    --Victor

  • ...sorry, I forgot this 'small detail'.

    One more thing, for properly decoding and grouping in transactions the analyser needs data from all of the following channels: MISO, MOSI, CLK & ENABLE.

    In case of any of the four channels is missing, the analyser reverts the export generator to the same as the original SPI analyser.

    --Victor

  • Thanks.  I was trying to export the data from the "Options" menu.  This looks pretty helpful so far.  Thanks for sharing!

  • Hi,

    We made some minor updates on the plug-in, mostly small improvements on output formatting.

    You can find it attached here: [667/6355.VLorzSPIAnalyzer.rar] and [667/5344.TRF7970ASPIAnalyzer.rar]. The first and second one are just the same, but the second one has one more appropiated name.

    Regards, Victor

  • Sharing those work is great, thank you (even if I will not use it, it found that awesome;)).

  • Hello All,

    Continuing with our 'battle' to create one ISO14443A-Part4 card emulator based on the TRF79760A we made some more minor/major additions to the plug-in. These will most surely be the last ones, but if I find some time in the future I'll clean up a bit the code and share it too.

    Most relevant changes are:

    • The output format for TEXT export has changed, not only the low level operations presentation but also the addition of one new column with the time elapsed from the previous operation. This information was handy for determining if the sample code provided by TI was or not compliant with ISO14443A timing specifications.
    • We implemented one new method for grouping the SPI transactions as we think there are some bugs in some Saleae Logic software's API method implementation. In the previous version of the plug-in those bugs were of no importance as transact_id's were not used by the plug-in's logic but only displayed.
    • The most usefull or important change comes in that we updated the bubbles generation support so decoded values are now shown there by placing the mouse cursor over.

    Here are some screen captures. This first one is Note++ showing the new output format.

    These three images below show the new bubbles support. For reproducing it, place the mouse cursor over the bubbles that represent the bus values. Meaningless bytes (MOSI when reading, MISO when writing) are shown as 'Ignored'.

    This last one also shows the new bubbles support. Center the graph in the byt of interest and zoom-in.

    We hope it's also usefull for other developers but, please, take into account that this library (plug-in) is delivered AS IS, with no warranty of any kind, and could contain (even severe) bugs. Enjoy it.

    The compressed library: 3252.TRF7970ASPIAnalyzer.rar

    --Victor

  • Victor,

    Thanks for your effort, It's really helpful.

  • I'm using the Saleae Logic 16 Pro for a TRF7970A debug. The analyzer described here would be quite useful but it does not work with the later Saleae code (version 1.1.23 and above). Is there an update to this analyzer for the Logic 16 pro? According to Saleae a recompilation of the dll with new Saleae libraries is needed, reference http://support.saleae.com/hc/en-us/articles/202422229-Updating-custom-analyzer-code-for-the-new-Analyzer-SDK-1-1-23- Much appreciated, Bob
  • Hi Bob,

    Sorry to tell you I did not continue working in the plugin as we discontinued the development line based on this transceiver. I started writing a CodeProject article giving all the information for reproducing the development environment and releasing the decoder code, but in the meantime I started working for another company in much higher complexity projects that required all of my attention.

    I'll try to get some time to put it alltogether again, as I started cleaning up the code I'm most certain it will not compile right now. Give me a couple of days to check it and I'll get back to you.
  • Hi Bob,

    It is better not to keep looking for the best time for making things, time will simply never come and urgent works never say "I can wait". I have received another request today so I just paused everything.

    Logic version 1.1.15 works with the old plug-in, Logic 1.1.34 requires a new API version so I recompiled the plugin against SaleaeAnalyzerSdk-1.1.23. 

    Attached here are two DLL binaries TRF7970ASPIAnalyzer-debug.rar and TRF7970ASPIAnalyzer-release.rar, for debug mode and release mode, respectively. I had no time for testing.I see now  the forum CMS has changed the way of handling attachments, I tried to attach the files here, but this editor's behaviour is annoying.

    TRF7970ASPIAnalyzer-debug.rar TRF7970ASPIAnalyzer-release.rar

    I loaded an old session file created with the old version (Logic 1.1.14) using Logic 1.1.23 configured for using the pluging DLL in debug mode and it worked.

    edit: The first time I loaded the release mode DLL it crashed but I was not able to get information about the error. Following times it worked.

    Here is a screen capture, just for reference.

    I hope it is of use for you and other colleagues.

    Best regards,

    Victor Lorenzo

  • Hi,

    The attached file contains the plugin compiled for the 64bit version of Saleae Logic 1.1.34.

    Regards,

    --Victor

    TRF7970ASPIAnalyzer64_release.rar