Jump to content
  • 0

DigitalDiscovery: Logic Analyzer trigger issue


Etienne

Question

Dear all,

I try to debug my SPI bus with the logic analyzer and I have problems configuring it and synchronize it with my script.

Firstly, how can I set the "Simple" function (1. in the picture bellow) by script and how can I set the trigger type for a defined IO (2. in the picture bellow) by script?
I set the logic analyzer in "normal" mode so it should start recording only when the trig condition happen but nothing happen.
I use the "Logic1.single()" command in the script to arm the logic analyzer just before my SPI command. I want to trig on the falling edge of the select line.
Digilent_LogicAna_Trigger_setup.thumb.jpg.f2244991e78d42bdf15ad84ff9677700.jpg

I also try the "Record" mode, then it works, but the trigger event appear at a non-sens moment (not at 0s) and only show 5ms of recording.
I set 5M sample at 1MHz I should have 5 second of recording. I also try a sample rate of 100kHz which is sufficient while my SPI clock is 10kHz, but it doesn't change anything.
What is also strange is that when I try to set the time base by script with <<Logic1.Time.Base.text = "10ms/div">>, it simply ignore this line

Digilent_LogicAna_Record_issue.jpg.8720dd1cb48d86938318d5286a3b3011.jpg

Attached, you'll find my workspace, it will work without anything connected to the device, the ADC will simple read FFFF due to the pull-up in MISO.

Thanks in advance
Kind regards
Etienne

DDS_OPD_Test.dwf3work

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

Dear Attila,

Thank you for your answer. This explain why my "adc" variable is empty, but as mentioned in your image, "the Logic Analyzer can be used to investigate the signals", so I should be able to see the SPI signals in the logic analyzer, isn't it?

Didn't I understand correctly?

Best regards
Etienne

Link to comment
Share on other sites

Dear Attila,

Thank you for your answer.

In fact, I'm not using the "Logic Analyzer" embedded in the Protocol tool. I see that when I click on the "Logic Analyzer" on the top right of the Protocol window I got the message that MISO will not work.

But I'm using and configuring the Logic Analyzer in the dedicate tool. Does it behave the same? Even if I don't use the bus decoder but put SPI lines like standard bits?

Best regards
Etienne

Link to comment
Share on other sites

Hi @Etienne

There are hardware resources that can be used by only one tool at a time: digital input, digital output, analog input...

The "Logic Analyzer" mode in the Protocol tool uses/opens a normal Logic Analyzer instrument.

When this mode is not enabled, the Protocol tool uses both digital input and output hardware resources to generate and capture data.
Only one of the Protocol or Logic Analyzer tools can be used at a time.
The last started/used tool (Protocol or Logic Analyzer) will take control over the digital input hardware resource.

When this mode is enabled the Protocol.SPI,I2C... functions won't read data.
You can use the Protocol to generate signals (digital output) and the "Logic Analyzer" to capture data (digital inputs).

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...