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

0 Members and 1 Guest are viewing this topic.

Offline vnv

  • Contributor
  • Posts: 12
  • Country: hr
Rigol DS1054Z SPI decoder issue
« on: December 30, 2018, 02:47:46 am »
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

  • Frequent Contributor
  • **
  • Posts: 936
  • Country: us
Re: Rigol DS1054Z SPI decoder issue
« Reply #1 on: December 30, 2018, 06:05:38 am »
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: 9427
  • Country: 00
Re: Rigol DS1054Z SPI decoder issue
« Reply #2 on: December 30, 2018, 06:14:44 am »
Try setting your mode to "timeout" instead of "CS"
 

Offline vnv

  • Contributor
  • Posts: 12
  • Country: hr
Re: Rigol DS1054Z SPI decoder issue
« Reply #3 on: December 30, 2018, 10:46:12 am »
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 vnv

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

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

Online Martin72

  • Frequent Contributor
  • **
  • Posts: 273
  • Country: de
Re: Rigol DS1054Z SPI decoder issue
« Reply #5 on: December 30, 2018, 11: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 vnv

  • Contributor
  • Posts: 12
  • Country: hr
Re: Rigol DS1054Z SPI decoder issue
« Reply #6 on: December 30, 2018, 11: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.
 

Online Martin72

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

We have 16bit length, therefore:

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

Offline vnv

  • Contributor
  • Posts: 12
  • Country: hr
Re: Rigol DS1054Z SPI decoder issue
« Reply #8 on: December 30, 2018, 12:26:01 pm »
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.
 

Online Martin72

  • Frequent Contributor
  • **
  • Posts: 273
  • Country: de
Re: Rigol DS1054Z SPI decoder issue
« Reply #9 on: December 30, 2018, 12:41:49 pm »
Hi,

Quote
What is your pause from CS going low?

In our case appx 1 µs

 

Offline vnv

  • Contributor
  • Posts: 12
  • Country: hr
Re: Rigol DS1054Z SPI decoder issue
« Reply #10 on: December 30, 2018, 12:43:31 pm »
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.
 

Online Martin72

  • Frequent Contributor
  • **
  • Posts: 273
  • Country: de
Re: Rigol DS1054Z SPI decoder issue
« Reply #11 on: December 30, 2018, 09:53:22 pm »
Hi,

I´ll do it at work next week.

 

Offline vnv

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

Offline 2N3055

  • Super Contributor
  • ***
  • Posts: 1589
  • Country: hr
Re: Rigol DS1054Z SPI decoder issue
« Reply #13 on: December 31, 2018, 01:13:34 am »
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: 9427
  • Country: 00
Re: Rigol DS1054Z SPI decoder issue
« Reply #14 on: December 31, 2018, 07:39:41 am »
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:

 

Online Martin72

  • Frequent Contributor
  • **
  • Posts: 273
  • Country: de
Re: Rigol DS1054Z SPI decoder issue
« Reply #15 on: December 31, 2018, 08:24:54 am »
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 vnv

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

Online Martin72

  • Frequent Contributor
  • **
  • Posts: 273
  • Country: de
Re: Rigol DS1054Z SPI decoder issue
« Reply #17 on: December 31, 2018, 09:22:52 am »
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 vnv

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

Online Martin72

  • Frequent Contributor
  • **
  • Posts: 273
  • Country: de
Re: Rigol DS1054Z SPI decoder issue
« Reply #19 on: December 31, 2018, 09:38:34 am »
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