flipperzero-firmware icon indicating copy to clipboard operation
flipperzero-firmware copied to clipboard

Feature request: GPIO Logic analyzer/scope

Open Patronics opened this issue 2 years ago • 6 comments

A really useful option for debugging circuits, a logic analyzer app (and possibly even an analog scope option) would be very powerful! Could also optionally output the data to a computer for more advanced analysis, perhaps mimicking either a Saleae logic analyzer or a cheaper simpler one from another brand.

Patronics avatar Mar 17 '22 23:03 Patronics

We've been exploring that area for a while and found that it's not going to be very useful because of hardware limitations(ARM core + USB + Memory performance). But do plan to add some basic scope to GPIO screen.

skotopes avatar Mar 20 '22 15:03 skotopes

Hi,

@skotopes Were you able to initiate something regarding this feature? I'd be interested to contribute on if not but I never implemented something for flipper zero. My goal to start with would be to add a screen where one or more gpio are displayed in high or low state in real time.

Could you provide me some guidelines to start on something?

Thanks a lot

drakes00 avatar Nov 03 '22 15:11 drakes00

@gornekich can share some thought

skotopes avatar Nov 17 '22 09:11 skotopes

Hello @drakes00 ! I was thinking about Logic Analyzer app too. As @skotopes said, it might not be perfect because of hardware limitation. However there is one approach that can be used to capture signal with minimal CPU resources. You can run TIM2 (32bit timer) and trigger DMA through DMAMUX by EXTI signal to transfer timings from timer register to memory. At the end you will get your digital signal representation as an array of timings for level durations. One of our community member have basic implementation for this approach. I want to ask him to push the code. This would be a good start for writing Logic Analizer App

gornekich avatar Nov 28 '22 08:11 gornekich

I would also find this functionality very useful.

I've been working on a fork of the stock GPIO app which has GPIO input support: https://github.com/biotinker/flipperzero-gpioreader

@drakes00 that app does what you requested regarding displaying GPIOs as high or low in real time, as well as allowing you to set internal pullups.

Plan is to add analog/scope features to it as well, though if other people are already working on such things, I'd rather team up than duplicate work.

Is there any plan to add ADC functionality to FuriHal in the near term? That would make the job much, much easier.

biotinker avatar Dec 10 '22 00:12 biotinker

Waiting for ADC functionality to FuriHal very much! =)

gabbapeople avatar Jan 12 '23 18:01 gabbapeople