Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PicoW #21

Open
tony1tf opened this issue Jul 4, 2022 · 6 comments
Open

PicoW #21

tony1tf opened this issue Jul 4, 2022 · 6 comments

Comments

@tony1tf
Copy link

tony1tf commented Jul 4, 2022

With the new PicoW release last week, this seems like an ideal time to upgrade this logic analyser. Since the WiFi chip uses SPI for communication, I guess it is going to be faster than the USB serial port. Any thoughts about this Shawn?

@pico-coder
Copy link
Owner

Rough, off-the-cuff response.
Per the Raspberry PI PICO W datasheet the SPI interface to the WiFi chip is only single lane SPI, and per section 3.8 typically runs at 33Mhz.
The CYW43439 datasheet indicates support for up to 2KB data transfers per SPI operation if you use the special wifi functions, with only a 4B command overhead. So in theory the SPI link might reach ~30Mbit/sec of raw data rate. But there could be all sorts of bottlenecks (Hardware and Software) in the ability of the PICO to send the packets.

IIRC, your ideal use case was something like 16 channels at 3Msps with fairly low run length encoding success due to needing to sample a clock and due to all the variable delay line circuits etc. With no RLE, you need 48 Mbit/sec raw bandwidth, so you would still come up a bit short, but 30 is a bit higher than the 12Mbit/sec raw USB bandwidth.

Also, the RP2040 says SPI clock can reach half of sys_clk and the CYW43439 says it can support 50Mhz, so I think you might be able to boost the 33Mhz based to 50, but with a product that was just release a week ago I wouldn't start pressing my luck.
Further we are still in the era of the chip shortage and these seem to be built from the typical rare earth metal "unobtanium" ;=). It's also fishing season so my screen time has been pretty light these days....

Side note: As I was looking into the broadcom specs for the CPUs used on the Raspberry Pi Model 3/Model 4, they all seem to have a DMA engine that can access their GPIOs, and thus in theory you should be able to build a logic analyzer with fast and well spaced sample rates without even using a PICO. Granted you lose analog sampling, though with the right parallel interface of a PICO feeding the GPIOs of the Model 3/4 you could likely get analog signals (up to 500Khz limited by the PICO) and higher digital sample rates.
But, what is strange is that I can't seem to find any reference to a DMA based raspberry pi model 3/4 logic analyzer on the internet, and it just seems strange that nobody has every done it. Perhaps people are just scared of programming DMA engines and just throw down the $16 for a logic analyzer and call it a day....

@normanr
Copy link

normanr commented Jul 8, 2022

https://iosoft.blog/2020/06/11/fast-data-capture-raspberry-pi/ uses DMA, but seems to be for doing SPI to an ADC.

Amazingly these projects have the same name, but completely different code (and neither of them using DMA as far as I can tell)

@pico-coder
Copy link
Owner

FWIW, I put in a backorder for a PICO W to spark fun, no ETA provided, and they no longer even allow backorders.
Note that I'm not sure I want to go through the efforts of creating a sigrok wifi driver, so at best this might have the PICO W export a webpage to download a file. But first need to prove we can actually get a noticeable bw increase over USB....

@tony1tf
Copy link
Author

tony1tf commented Jul 8, 2022 via email

@AapoTahkola
Copy link

AapoTahkola commented Jul 21, 2022

You might have better luck getting an pico w from local sellers or small business. Couple random emails here and there. I would guess it is just temporary because there are shops with over 100 in stock here EU or nordic contries. Did the calculations and got 3 for 4.5e piece. I guess I will be using them mostly for home assistant stuff.

Anyway, I have played with esp32 wifi stuff for a long time and I can tell from experience that if pico w is anything like esp32 this stuff is fairly easy. It takes like 20 lines of code to open a port and start doing some stuff over the wifi. As this is a new chip though I might wait a bit and look at what is happening from a distance until most of the bugs are dealt with. I can see that pulseview has tcp/ip option.

@mtk11
Copy link

mtk11 commented Oct 18, 2022

An interesting ESP32 based project - esp32_sigrok which uses Rigol emulation to communicate via WiFi with pulseview. Also would it be possible to add support for external high speed ADC/s ? As well as use the overcloking of mcu for faster sampling ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants