Jump to content
  • 0

Custom SPI Trigger


Emcotek

Question

I am using the Digital Discover SPI trigger to view data on my board.  The issue I am having is that the data is not true SPI in the sense of having a SS signal to frame the decoder on.  Rather I have other signals on the board which I need to sync the decoder.  Specifically, I need to start decoding when SH_LD is low and SER_CLK goes from low to high.  At present I am using the START option parameter to delay the decoder.  Problem is, that the signals generate asynchronously so each time I capture a frame of data I have to adjust the START delay.

 

Can I use a CUSTOM trigger type to sync automatically on the aforementioned signals?

image.png.10411407aa9336ba93bdac4324a41c40.png

image.thumb.png.e148d2a8fea6381e5764c99884471321.png

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

Hi @Emcotek

The latest beta version adds support for such sync signal:
https://forum.digilentinc.com/topic/8908-waveforms-beta-download/

image.thumb.png.869be3031bf7fdd681802b7620860874.png

 

You can set the number of samples higher to capture the required amount of data, use record with position at zero.
The View/Logging can be used to automate export.
You can use the Script tool to verify the data, like to compare the new capture with a reference one.

image.thumb.png.63a86ffecf9067f6a0cebc0daafe8374.png

image.thumb.png.d1d26d5a5bf9a4069053b45a21398724.png

 

Link to comment
Share on other sites

My task is that I need to capture/verify the data from the trigger I described for 4096 bytes that follow.  If the buffer can capture and hold the entire stream of data (4096+ bytes), then I could export the data to a file and compare it to my source packet.  If not, then it would be great if I could delay the capture from the trigger event and grab the data in chunks to export and compare.

The source clock rate is 8MHz and the time between SH_LD pulses is 4uS.

Thank you!

 

Link to comment
Share on other sites

The capture and record works fantastic and I have discovered an anomaly in the data stream of my project. 

Instead of comparing one capture trace to the other what I really need to do is have an array of 4096 bytes of expected data and compare each capture to that array.  Upon a failure to compare, I need to generate a low pulse on one of the Digital Output pins one SER_CLK width wide in order to interrupt the MCU and sync to a breakpoint so I can inspect the MCU firmware to see what the root cause of the failure is.

Link to comment
Share on other sites

Is it possible to create an array in the script for the comparison and generate a digital output signal that pulses low for one SER_CLK cycle?  If so, I can use this to interrupt my target MCU and locate the root cause of the anomaly in the code.

Link to comment
Share on other sites

Hi @Emcotek

The .events are returned as array of text. When decimal format is used this is automatically converted by JS to number so it can be compared with numeric array.
Make sure the source of the problem is not caused by glitch on the clock line, so the analyzer sees one clock pulse as two.

image.png.d7930d826bbc6973d506464b4c0b642e.png

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...