Author Topic: Rigol DS1054Z SPI decoder issue  (Read 4965 times)

0 Members and 1 Guest are viewing this topic.

Offline vnvTopic starter

  • Contributor
  • Posts: 12
  • Country: hr
Rigol DS1054Z SPI decoder issue
« on: December 29, 2018, 03:47:46 pm »
Hi everyone,

got some issues with my RIGOL DS1054Z  :-BROKE |O so I wanted to share it with you and maybe someone can help out.
So this is the case, I am using Buspirate to generate SPI signal.

Buspirate configuration:
Mode: SPI
Speed: 1 MHZ
Clock polarity: Idle low *default
Output clock edge: Activate to idle *default
Input sample phase: Middle *default
CS: /CS *default
Output type: Normal (H=3.3V, L=GND)


And after setting up my scope (which you can see from the pictures) I send [ 0x20 ] to SPI.
Scope has SPI decoder ON and crazy  thing is that after decoding it shows decoded number as 00000000 ??? |O |O
Just to be sure Buspirate works I connected it to my Saleae Logic analyzer and it showed all was ok, everything that I've sent logic analyzer showed as ok.

So this is how my scope looks like...



 Thanks in advance!!

 

Offline MarkF

  • Super Contributor
  • ***
  • Posts: 2542
  • Country: us
Re: Rigol DS1054Z SPI decoder issue
« Reply #1 on: December 29, 2018, 07:05:38 pm »
It's been a while since I've looked at SPI. 
I seem to remember that the threshold levels need to be adjusted.
(Bottom right button on your QuickPrint3 picture)
 

Offline Fungus

  • Super Contributor
  • ***
  • Posts: 16642
  • Country: 00
Re: Rigol DS1054Z SPI decoder issue
« Reply #2 on: December 29, 2018, 07:14:44 pm »
Try setting your mode to "timeout" instead of "CS"
 

Offline vnvTopic starter

  • Contributor
  • Posts: 12
  • Country: hr
Re: Rigol DS1054Z SPI decoder issue
« Reply #3 on: December 29, 2018, 11:46:12 pm »
Thanks for helping out, so here comes the new info.... So I pulled out my STM32F103 board and wrote SPI code on it and started to play.
To be sure that I add more issues to it, I have removed all but one GND from probes and it still worked, at around 4MHz without any issue as seen on picture 2.1.
I've concluded that problem could be because of long wait for data to come in (CS gets low but there is long pause afterward till data start comming), so I started to add pause and then (picture 2.3 and 2.4) problem started to go off.
It seems that for some reason time between CS going low and data coming in creates issue for SPI decoder  :--  :palm:
What do you say ?? Could it be such stupid BUG exists?  :wtf:
 

Offline vnvTopic starter

  • Contributor
  • Posts: 12
  • Country: hr
Re: Rigol DS1054Z SPI decoder issue
« Reply #4 on: December 29, 2018, 11:50:11 pm »
Try setting your mode to "timeout" instead of "CS"

Sorry but how could I use "timeout", never worked with it?
 

Offline Martin72

  • Super Contributor
  • ***
  • Posts: 5796
  • Country: de
  • Testfield Technician
Re: Rigol DS1054Z SPI decoder issue
« Reply #5 on: December 30, 2018, 12:08:07 am »
You should use timeout when you have a 2-wiring protocol, CLK and Data.

Another point is, your DS1054 can only decode what´s on the screen displayed.


Offline vnvTopic starter

  • Contributor
  • Posts: 12
  • Country: hr
Re: Rigol DS1054Z SPI decoder issue
« Reply #6 on: December 30, 2018, 12:37:06 am »
Another point is, your DS1054 can only decode what´s on the screen displayed.

In the first set of pictures I have it in the screen, and trigger is set to Single so it should show it decoded, but as I said if the pause is to big (going from trigger - CS low) no decoding gets done. This is one very strange thing.
 

Offline Martin72

  • Super Contributor
  • ***
  • Posts: 5796
  • Country: de
  • Testfield Technician
Re: Rigol DS1054Z SPI decoder issue
« Reply #7 on: December 30, 2018, 12:52:02 am »
What´s the length..

We have 16bit length, therefore:

https://www.directupload.net/file/d/5300/vqsctiu7_png.htm

Offline vnvTopic starter

  • Contributor
  • Posts: 12
  • Country: hr
Re: Rigol DS1054Z SPI decoder issue
« Reply #8 on: December 30, 2018, 01:26:01 am »
What´s the length..

We have 16bit length, therefore:

https://www.directupload.net/file/d/5300/vqsctiu7_png.htm

It doesn't matter the size. First time I had the situation it was with 8bit, then I have done it with 16 and more.

What is your pause from CS going low? Can you test it out with pause of 50us (also post the picture if possible).
I have uploaded pics so you can see how it looks above.
 

Offline Martin72

  • Super Contributor
  • ***
  • Posts: 5796
  • Country: de
  • Testfield Technician
Re: Rigol DS1054Z SPI decoder issue
« Reply #9 on: December 30, 2018, 01:41:49 am »
Hi,

Quote
What is your pause from CS going low?

In our case appx 1 µs


Offline vnvTopic starter

  • Contributor
  • Posts: 12
  • Country: hr
Re: Rigol DS1054Z SPI decoder issue
« Reply #10 on: December 30, 2018, 01:43:31 am »
Hi,

Quote
What is your pause from CS going low?

In our case appx 1 µs

If you want to test the issue add 50us or 80us and see if it decodes.
 

Offline Martin72

  • Super Contributor
  • ***
  • Posts: 5796
  • Country: de
  • Testfield Technician
Re: Rigol DS1054Z SPI decoder issue
« Reply #11 on: December 30, 2018, 10:53:22 am »
Hi,

I´ll do it at work next week.


Offline vnvTopic starter

  • Contributor
  • Posts: 12
  • Country: hr
Re: Rigol DS1054Z SPI decoder issue
« Reply #12 on: December 30, 2018, 11:37:15 am »
Great, please tell what you get.
 

Offline 2N3055

  • Super Contributor
  • ***
  • Posts: 6600
  • Country: hr
Re: Rigol DS1054Z SPI decoder issue
« Reply #13 on: December 30, 2018, 02:13:34 pm »
Like other have said, it decodes from the screen. Decoder needs to "see" CS edges going up and down before and after packet for it to work. So on screen you have to have CS edge going low , data packet and  then CS going up. Using timeout (explained in manual) doesn't need CS and would work with only data packet on screen...
 

Offline Fungus

  • Super Contributor
  • ***
  • Posts: 16642
  • Country: 00
Re: Rigol DS1054Z SPI decoder issue
« Reply #14 on: December 30, 2018, 08:39:41 pm »
Like other have said, it decodes from the screen. Decoder needs to "see" CS edges going up and down before and after packet for it to work. So on screen you have to have CS edge going low , data packet and  then CS going up. Using timeout (explained in manual) doesn't need CS and would work with only data packet on screen...

Hence "timeout" mode. It doesn't look at CS, it looks for clock pulses. :popcorn:

 

Offline Martin72

  • Super Contributor
  • ***
  • Posts: 5796
  • Country: de
  • Testfield Technician
Re: Rigol DS1054Z SPI decoder issue
« Reply #15 on: December 30, 2018, 09:24:54 pm »
Hi,

Quote
What is your pause from CS going low?

In our case appx 1 µs

My fault - I meant timeout about 1µs, afaik we don´t use CS.
Sorry

Offline vnvTopic starter

  • Contributor
  • Posts: 12
  • Country: hr
Re: Rigol DS1054Z SPI decoder issue
« Reply #16 on: December 30, 2018, 09:38:51 pm »
How do you assert CS line , how do you mean you don't use it?
 

Offline Martin72

  • Super Contributor
  • ***
  • Posts: 5796
  • Country: de
  • Testfield Technician
Re: Rigol DS1054Z SPI decoder issue
« Reply #17 on: December 30, 2018, 10:22:52 pm »
On our controller boards there existing two measuring points for testing, SPI out and SPI clock.
We had several (analog) inputs for supervision the circuits (e.g., Input voltage)on the controller board.
This will be feed in the µC.
The µC gives a value out in decimal to the SPI out testpoints( e.g., 400Vdc Input means a value of 920d).
To decode it correct, if you don´t use CS (like we didn´t), you must choose "timeout".



Offline vnvTopic starter

  • Contributor
  • Posts: 12
  • Country: hr
Re: Rigol DS1054Z SPI decoder issue
« Reply #18 on: December 30, 2018, 10:24:11 pm »
Got it!  :-+ Cool approach.
 

Offline Martin72

  • Super Contributor
  • ***
  • Posts: 5796
  • Country: de
  • Testfield Technician
Re: Rigol DS1054Z SPI decoder issue
« Reply #19 on: December 30, 2018, 10:38:34 pm »
We are in the market for power inverters/converters.
Using long time mostly analog control circuits, except creating pulsewidth modulation and error supervisions, realized by an PLD (lattice).
Today we use in new projects controlboards fully controlled by µCs, even regulation.
To get sure that the a/d conversion circuits are proper mounted with the right resistor/capacitor values, we use the "debugging function" via SPI, check the values for every input circuit on the board.

 
The following users thanked this post: 2N3055


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf