Open MarcelRobitaille opened 1 year ago
Same error here, I compiled a fresh nightly from Sigrok git including the libs. When I open pulseview and connect to the Pico I can run a trace without issues. Disabling channels does not throw any errors either. As soon as I rename a single channel an error is thrown.
sr: srpico: ERROR: Serial_w_ack a10 failed (1).
sr: srpico: ack resp char 2 d 50
sr: srpico: ERROR: Channel enable fail
sr: session: Could not start raspberrypi-pico device /dev/ttyACM0 acquisition.
sr: srpico: Dropping 6 device bytes
sr: session: Cannot remove non-existing event source 0x5a9c73966f50.
Notifying user of session error: "Capture failed" ; "generic/unspecified error"
So as kind of a workaround I think it works to just leave the "D
First off, thanks for all your effort on pico support in sigrok!
I think the naming problem comes from this line? https://github.com/sigrokproject/libsigrok/blob/master/src/hardware/raspberrypi-pico/api.c#L507
At least, the Serial_w_ack
error can be printed from a call just below that.
Looks like you're using the first character of the name to indicate analog or digital. Surely there's another way to look that up, such as from ch->index
(which I assume the user cannot change)?
I'd really like to be able to set arbitrary names so I don't have to manually rename in pulseview before I can get a protocol decoder, such as GPIB, to load.
A nice-to-have would be the ability to specify an arbitrary ordering for channels. I assume such an order would carry over from sigrok-cli --channels x,y,z...
to pulseview. It's not currently possible; I think that's because the contiguous-channels logic equates unsorted with discontiguous.
For example, I'd be able to do sigrok-cli --channels D18=DIO1,D4=DIO2,D5=DIO3,...,D8=NRFD,...
to fix a case where I connected the signals in a weird order. Then (I hope) pulseview would show DIO1, then DIO2, then DIO3, and so on.
So, fixing the channel renaming will require a change to the libsigrok code, simple, but it will need to through the main libsigrok curation. Will post a link when I have it. As for the arbitrary reordering that likely won't happen. In order to compensate for the very slow 12MBit/s USB rates I implemented run length encodings at certain numbers of channels. While it's theoretically possible to remap arbitrary channels there is lots of code involved on both the sender and receiver to pull it off, and would be a lot more work (and risk of releasing something broken) than having the user move a jumper :).
I see, I'd assumed the re-ordering could stay on the driver side and the pico need not know anything about it.
I compiled sigrok and pulseview based on your fork. Everything is working great, except that I've noticed that I get crashes after renaming channels. For example, I open pulseview with this command:
When the software opens, I can press "Run" and record data.
If I then change the name of the first channel to "MOSI" and press "Run" again, I get a dialog box showing an error message. When I click ok, the program crashes.
Here are the relevant logs with
--loglevel 5
:Please let me know if I should report this upstream instead