Bug 1076 - Rigol-ds only calculates a valid sample rate if at least one analog channel is enabled
Summary: Rigol-ds only calculates a valid sample rate if at least one analog channel i...
Status: CONFIRMED
Alias: None
Product: libsigrok
Classification: Unclassified
Component: Driver: rigol-ds (show other bugs)
Version: unreleased development snapshot
Hardware: x86 All
: Normal normal
Target Milestone: ---
Assignee: Nobody
URL:
Keywords:
: 1495 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-12-15 18:08 CET by John Sanderson
Modified: 2020-02-13 08:49 CET (History)
4 users (show)



Attachments
.sr (516 bytes, application/zip)
2017-12-15 19:05 CET, John Sanderson
Details
screen shot (44.35 KB, image/png)
2017-12-15 19:07 CET, John Sanderson
Details
.sr second try (521 bytes, application/zip)
2017-12-15 19:41 CET, John Sanderson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Sanderson 2017-12-15 18:08:00 CET
Hello All,

This might not be a bug at all but I've tried everything under the sun so:

1.
PC running win7, I have two of these, one the home version the other pro.
I get the same result with each.
Pulseview installed.
Zadig.exe executed > driver WinUSB(v6.1.7600.16385)

2.
LA is a Rigol DS1102D. I use D0 as SCL and D1 as SDA

3.
Target hardware is an I2C system known to have been stable for years.
I'm simply using it to prove the LA and protocol decoder.


Pulseview sees the Rigol perfectly. Identifies it and reads the D0 and D1
data stream without trouble.
Nothing I've tried will get the I2C to decode, all I get is a hashed
stripe where the decode should be.

Also I've tried:
_every_ driver available under Zadig. Either I get the above or no reaction
from Pulseview at all.

Any ideas anyone before I pull the rest of my hair out?


rgds,   John
Comment 1 Soeren Apel 2017-12-15 18:13:54 CET
Hello John, can you please provide
a) an .sr file of the data you measured and
b) a screenshot of what PV looks like (ideally with the decoder config dialog open)

Thanks!
Comment 2 John Sanderson 2017-12-15 18:31:40 CET
(In reply to Soeren Apel from comment #1)
> Hello John, can you please provide
> a) an .sr file of the data you measured and
> b) a screenshot of what PV looks like (ideally with the decoder config
> dialog open)
> 
> Thanks!

Hi Soeren!

That's quick! I'll tfr this and present it soon.


rgds,   John
Comment 3 John Sanderson 2017-12-15 19:05:36 CET
Created attachment 355 [details]
.sr
Comment 4 John Sanderson 2017-12-15 19:07:05 CET
Created attachment 356 [details]
screen shot
Comment 5 John Sanderson 2017-12-15 19:07:56 CET
Hi Soeren,

As requested. Hope it helps...


rgds,  John
Comment 6 Uwe Hermann 2017-12-15 19:22:56 CET
Thanks! The samplerate in the .sr file is 0 Hz, that causes the problems later on. We need to fix whatever place doesn't properly pass along the samplerate, maybe the rigol-ds driver in libsigrok (just a guess at the moment).

I've faked the samplerate to 1MHz for a quick test, the I2C decoder is running OK then (didn't check the data, though).
Comment 7 John Sanderson 2017-12-15 19:30:59 CET
Hi Soeren,

Thanks, at least there's a sane answer.

I have seen that my screen is not the same as shown in the various
tutorials, videos and so on but I don't know why.
Is there a way for me to adjust the sample rate? (haven't seen it yet..)

rgds,   John
Comment 8 John Sanderson 2017-12-15 19:41:11 CET
Created attachment 357 [details]
.sr  second try

This is a second trial .sr file.
It includes the I2C trace which the first file did not have.
Comment 9 Soeren Apel 2017-12-15 19:52:27 CET
This is a driver bug. As we can see, the driver only calculates a valid sample rate if at least one analog channel is enabled:

https://sigrok.org/gitweb/?p=libsigrok.git;a=blob;f=src/hardware/rigol-ds/api.c;h=443d89ddc7166e95e39e71eefba9b16bcfc376ff;hb=HEAD#l521

John's screenshot shows that he has both analog channels disabled, which triggers this bug.
Comment 10 John Sanderson 2017-12-15 20:00:55 CET
Soeren and Uwe!

Thanks, you were dead right.
Not what was intended but it's great to now have a workaround!

rgds,   John
Comment 11 Uwe Hermann 2018-02-13 21:41:29 CET
Parts of this is fixed in libsigrokdecode now (e.g. in 8accc30bf5d98aa958af839511d57e0e1ddefe94), many decoders now will work fine without samplerate as well (where possible).

Leaving the bug open, as there's still a driver bug there, of course.
Comment 12 Soeren Apel 2020-02-13 08:49:36 CET
*** Bug 1495 has been marked as a duplicate of this bug. ***