By using sigrok and implementing the SUMP protocol over serial I was able to use the ESP32 as a logical analyzer.
Quite a nice way to get a better understanding of the streams of bits running over the wires of the ESP32.
https://en.wikipedia.org/wiki/Sigrok
Here is the source.
https://github.com/Ebiroll/esp32_sigrok
Does not yet work with Open Bench Logic sniffer but that will be the next step if this project sparks interest.
https://lxtreme.nl/projects/ols/
Another improvement would be using parallel i2s input with DMA to get a higher and smother sampling rate.
Happy holidays
ESP32 as a logic analyzer.
Re: ESP32 as a logic analyzer.
Nice! Sprite & I were actually chatting about this the other day. Will watch this project with interest.
Once you have I2S and DMA is doing the heavy lifting, you may be able to do SUMP over a TCP socket.
Once you have I2S and DMA is doing the heavy lifting, you may be able to do SUMP over a TCP socket.
-
- Posts: 27
- Joined: Tue Jan 31, 2017 10:59 am
Re: ESP32 as a logic analyzer.
Hello again.
I did some more tests yesterday and it turns out that the reason why it was working so well was because I was using pin 12-15 on the WROVER-KIT. Sigrok was then able to use the JTAG, chip on the WROVER-KIT board for data acquisition.
It was just a coincidence that I used these pins on the WROVER board, and I should have become more suspicious when the code was working on the first try.
This is however good news as sigrok was running quite well with this setup, and this is better than having a second ESP32 for data acquisition.
During the holidays I will give it another try and will try to get parallel i2s with DMA transfers running for those who do not have a WROVER-KIT. I think implementing the SUMP protocol is still a good Idea, and getting it to run over Wifi is even better. However the current implementation with alarms to trigger the sampling, does not work.
Best regards,
Olof
I did some more tests yesterday and it turns out that the reason why it was working so well was because I was using pin 12-15 on the WROVER-KIT. Sigrok was then able to use the JTAG, chip on the WROVER-KIT board for data acquisition.
It was just a coincidence that I used these pins on the WROVER board, and I should have become more suspicious when the code was working on the first try.
This is however good news as sigrok was running quite well with this setup, and this is better than having a second ESP32 for data acquisition.
During the holidays I will give it another try and will try to get parallel i2s with DMA transfers running for those who do not have a WROVER-KIT. I think implementing the SUMP protocol is still a good Idea, and getting it to run over Wifi is even better. However the current implementation with alarms to trigger the sampling, does not work.
Best regards,
Olof
- Vader_Mester
- Posts: 300
- Joined: Tue Dec 05, 2017 8:28 pm
- Location: Hungary
- Contact:
Re: ESP32 as a logic analyzer.
Hi Olof,
Is there a way to something else than the Wrover kit, so with something like the Devkit for example?
I also saw on the Guthub, that the current sample rate is hard coded to 10kHz. For me it seems quite small, or maybe I'm missing something.
Regards,
Ben
Is there a way to something else than the Wrover kit, so with something like the Devkit for example?
I also saw on the Guthub, that the current sample rate is hard coded to 10kHz. For me it seems quite small, or maybe I'm missing something.
Regards,
Ben
Code: Select all
task_t coffeeTask()
{
while(atWork){
if(!xStreamBufferIsEmpty(mug)){
coffeeDrink(mug);
} else {
xTaskCreate(sBrew, "brew", 9000, &mug, 1, NULL);
xSemaphoreTake(sCoffeeRdy, portMAX_DELAY);
}
}
vTaskDelete(NULL);
}
Re: ESP32 as a logic analyzer.
Olof Astrand wrote:By using sigrok and implementing the SUMP protocol over serial I was able to use the ESP32 as a logical analyzer.
Quite a nice way to get a better understanding of the streams of bits running over the wires of the ESP32.
https://en.wikipedia.org/wiki/Sigrok
Here is the source.
https://github.com/Ebiroll/esp32_sigrok
Does not yet work with Open Bench Logic sniffer but that will be the next step if this project sparks interest.
https://lxtreme.nl/projects/ols/
Another improvement would be using parallel i2s input with DMA to get a higher and smother sampling rate.
Happy holidays
very nice example! you are welcome!
i did a mini oszilloscope for android and on a wifi port ( like angus spoken )
i will try to use your project in my simple doings - very very welcome!
thanks!
best wishes
rudi
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪
-
- Posts: 27
- Joined: Tue Jan 31, 2017 10:59 am
Re: ESP32 as a logic analyzer.
Hello,Vader_Mester wrote:Hi Olof,
Is there a way to something else than the Wrover kit, so with something like the Devkit for example?
I also saw on the Guthub, that the current sample rate is hard coded to 10kHz. For me it seems quite small, or maybe I'm missing something.
Regards,
Ben
Sorry for the late reply. Yes it was hard coded to 10kHz as I used a high performance timer to collect data. I could not get it to run faster with this technique. A much better way to do this is by using DMA and i2s.
It does not require the Wrover kit, but is then limited to 10kHz. The Rigol DS emulation over wifi also is a bit unstable. Most of the times it works but I have a feeling that the huge amounts of interrupts maybe makes the network code drop some packets.
https://twitter.com/ESP32net/status/958438631949111298
Here is another guy, looking to do something similar.
https://github.com/easyvolts/espScope
Regards,
Olof
Who is online
Users browsing this forum: No registered users and 14 guests