Hi all, a short update on SWO logger. I managed to implement a very basic SWO data logger based on M5STACK device. Looks nice and works well (see the picture below where my test setup is shown). I have to admit though, that this thing turned out to be not as simple as expected. Now it needs some real-life testing. I’ll use it for some of my future projects and let you know about my experience. I hope it worth the time spent on it.
- – the white thing on the picture is a power bank, small blue PCB is the “device under test” stm32 “bluePill”, black box with LCD – m5stack that runs my SWO data logger software.
Hi everybody, since my first post about the project I have made a couple video demonstrations and built several prototypes. I invested in the project a huge amount of time, but this is the time to admit that the project has failed. And I want to explain why.
The largest problem – incomplete unclear and misleading documentation of the esp32 chip. According to the specification, esp32’s I2S is able to work at 40MHz clock rate, but it’s not true (at least for parallel mode). According to my experiments and some information from other developers the maximum speed is 20MHz but even at this speed not all FIFO modes work. I have spent a couple of weeks investigating the problem and wondering why I2S at high speed puts 2 absolutely identical samples in the buffer. I found that other developers have the same problem and obviously it’s esp32 limitation.
The second problem – no JTAG debugging support. Unfortunately, I didn’t manage to make JTAG for esp32 work properly. Developers of “Sloeber IDE” did a greate job to create a fully functional IDE for Arduino platforms, but for some reasons, my j-Link doesn’t work with esp32’s OCD server from Espressif properly. When there is no proper documentation for the chip a proper debugger becomes a crucially important part of a successful development. But it’s not the case for esp32 (at least now, I hope in future it will be better).
The third problem – analog frontend of a high-speed oscilloscope is not a simple thing. Yes, my knowledge in analog electronics is relatively limited and it took me a while before I realized that I have underestimated the complexity of this part of the project. My goal was to create a very simple and cheap hardware that could be easily assembled by an amateur, but it seems to be not possible. Without shielding, bus drivers, operational amplifiers and other parts of a proper analog frontend it simply doesn’t work with proper quality. And when you put all of this in the project it becomes neither simple nor cheap.
So to summarize:
- My initial goals for the project (40Msps, low-cost and simple schematic) are not reachable with esp32 and selected hardware architecture. I think that 20Msps is a too slow speed.
- The development effort for esp32 is unacceptably high due to bad documentation and absence of proper debugging tools. But this statement is true only when you are doing something unusual. With typical tasks like web server hosting and wifi communication esp32 works well.
Due to some software mistakes, the signal doesn’t look really good, but I found the problem and now waiting for PCB to improve also hardware quality. Hopefully, on the next video, we will see a beautiful picture with all features of a good oscilloscope (various trigger settings and low noise). Stay tuned!