Improving the number of samples possible? #280
Replies: 4 comments 11 replies
-
Not possible. Consider this: If you want to capture at 50Mhz even if you run at 400Mhz the RP2350 you have 8 cycles to implement the encoding, you need in those 8 cycles to pull from the PIO fifo, compare the values, check if needs escape if it is a different value, check how many bits are you capturing, check if you need to roll because is a ring buffer, store to memory one to three bytes, increment counters, check if the buffer is full, etc, and all done using only the CPU, so that's already nearly impossible if not impossible. Also, you are using only 8 channels so I assume you are analyzing something like SPI or I2C, if you have so many "repetitive" samples that RLE is useful, then what you should use is the burst mode, let's supose that you are analyzing SPI, then if you use the burst mode, set the trigger to capture when CS is low, and set a small window size you will skip all the "silences" optimizing the usage and only retrieving data when there is really meaningful data achieving basically the same as if you were using RLE. In fact many times it will give you more capacity than RLE as with RLE depending on the data it will use even more space than unencoded when it is mostly all different values. |
Beta Was this translation helpful? Give feedback.
-
As an alternative - would it be possible to increase the sample depth by using one RP2350 per channel? They are silly cheap so having 16 of them on a PCB wouldn't make a huge dent in the wallet. But for it to really increase the samples then we'd need to shift 8 samples into a single byte before storing it into RAM. It would for sure be nice to have 4M samples, but I seem to recall you previously said that isn't possible to do that. |
Beta Was this translation helpful? Give feedback.
-
I can't see it as a huge routing problem. Only a single trace from each RP would be routed down to the connector, that could be done on the bottom layer. The two mid-layers handles gnd and vcc. And the top layer routes the decoupling caps and the signal between the RP's. That should be pretty clean and nice.
Length matching is basically a non-issue. Most LA specs says that the samples allows for 1 sample skew, at 400 MHz I think that means that we need to match lengths to like 300mm. Even if we go bonkers and say we want to be within 10% of the rise time the requirement is not more than 10mm matching. But there is still plenty of room on the bottom for matching to 1 ps ;-)
Sent with [Proton Mail](https://proton.me/mail/home) secure email.
…On Sunday, 27 July 2025 at 20:01, Agustín Gimenez Bernad ***@***.***> wrote:
> Hrm, just routing it the way it is would be a nightmare on it's own.
Agreed.
> But what about USB? Was the plan to add 24 USB sockets? Or just one and several USB hub chips?
No, this is something that already have in mind for the monolythic analyzer that I'm preparing, there would be single master with USB connected, and as there would be many free IOs on each device it is trivial to use a PIO to do parallel transfers from one MCU to other, so the master would send the data from all the MCUs.
—
Reply to this email directly, [view it on GitHub](#280 (reply in thread)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/AACPNTXT3MQILE4YNLY5I3L3KUHYFAVCNFSM6AAAAACCO3X2JCVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTGOJQGI4TIMI).
You are receiving this because you commented.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I did a new revision of my board, ordered it and then released it in a new repository: https://github.com/RudolphRiedel/8x-Logic-Analyzer |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I found this interesting and did not consider every aspect of it untill now.
I built my own board, because I could and I did not build a Pi-Pico board before:

I designed this board and ordered it a couple of days ago from JLCPCB.
Apart from the 1x9 2.54mm pin header, everything will be populated by JLCPCB.
The board is rather small at 44mm x 28mm.
I went with USB-C, just because I never used that in one of my designs.
I reduced the number of channels to 8 as I mostly look at SPI and need 2 pins extra, so 6 in total.
I am using 74LVC2G17 as input buffers as these are 5V tolerant with 3.3V supply, so the input range is about 2.5V to 5.5V.
The part actually placed by JLCPCB is C3294723 ([AIP74LVC2G17GB236.TR)
The I/Os used are 0...7, I maybe should have used 2...9.
I added a reset button since I really dislike the press-button-insert-cable approach that the original Pi-Pico as pushing.
The coil I went with for the core supply is the one Adafruit is using, so it should be working.
I could not do much in regards of length matching the input lines, but the range is from 11.034mm/60.481ps to 6.978mm/38.247ps between the controller and the 51R series resistors I am using.
Anyways, I started to play with the 6.5 beta software.
I got it to compile and added my own board definition.
I am running the software on a Waveshare RP2350-Zero and did not attach anything to it, yet.
I noticed that with limited channels, no complex-trigger pins and GPIO_LED, the size of the .UF2 dropped from 90kiB to 77kiB,
So I increased the CAPTURE_BUFFER_SIZE untill I get an error message, the limit is 469kiB which results in 480.256 maximum samples showing up in LogicAnalyzer 6.5 software.
Ok, nice upgrade.
Then it hit me, this is not even 10ms with the 50MHz I was using -> this is practically unuseable for me.
What could be done about this?
A PSRAM could be added, but if that actually could be made to work, that would only extent the samples to 170ms @50MHz.
And it probably would not even work, since at best write speed to the external SRAM is less than 50MB/s.
So at best this would improve the number of samples with frequences below maybe 40MHz, mabye even less than that.
What about compressing the buffer then?
As this is a byte stream, the good old RLE (Run Length Encoding) could be used to compress the buffer in realtime.
Sampling then does not end at a fixed sample-number, but when the buffer is full.
This needs two special tokens, for example 0xff for a new value found, 0xfe for the value 0xff found.
0xff would be followed by the byte value and the number of consecutive bytes with that value.
Example:
0xff 0x00 0xfd 0xff 0x01 0x30 0xff 0x03 0x30
-> 349 samples in 9 bytes of lossless compression
Beta Was this translation helpful? Give feedback.
All reactions