5 ms·
I recently started using the ESP32 and its IDF sdk, and find it hits all the authors’s desiderata.
by rahimiali 6y ago
I recently started using the ESP32 and its IDF sdk, and find it hits all the authors’s desiderata.
- sitzkrieg 6y agoI agree, this is a nice writeup but I was surprised there were not some other big players covered. ESP32, Microchip XC32, Ti CCS etc ..
- ampdepolymerase 6y agoI do wish Arduino would increase the scope of their supported features. As a platform abstraction layer, using the arduino.h C++ header provides an excellent embedded development experience and there is a large number of compatible libraries online. But the scope is very, very small and limited. For features like parallel IO however you often have to drop down to inline assembly/invoke platform sdk.
- II2II 6y agoI have been using PlatformIO as of late, which has the option of selecting frameworks when the project is created. While that doesn't really solve the problem of having a universal abstraction layer, it does ease the burden of installing frameworks since it handles that automatically and it provides a more consistent development environment. As for that universal abstraction layer, I doubt that it is practical. There is too much variation across features offered by MCUs. Ultimately some features would end up unsupported on some products unless every vendor decided to put their weight behind it (and agree upon how everything should be implemented).
- amelius 6y agoOne problem I have with Arduino and such is that they sell their products as educational toys, and thus unsuitable to incorporate into any serious product.
- imtringued 6y agoArduinos are just a dev board. You can always take the underlying micrcontroller and design your own PCB.
- 00deadbeef 6y agoYou don’t even need to use it with Arduino hardware. At this point I think there are more people using the Arduino SDK with ESP devices.
- flqn 6y agoAgreed, the ESP32 ecosystem is a stellar example of what MCU vendors could offer.
- sgtnoodle 6y agoWhen I used it for a hobby project, it was pretty gnarly. All I wanted to do was sample an ADC channel at 8Khz. The software triggered ADC proved to be fundamentally broken (it felt like a race condition in their lower level coprocessor), and I had to switch to I2S so that the ADC would be accessed by DMA. The documentation was basically non-existent and the most relevant code examples were an incoherent mess. I eventually got it to work barely well enough, after probably spending 16 hours on it. I'm still impressed with the wifi functionality. It's a cool chip, and I appreciate the company's willingness to support hobbiests. I wouldn't use their SDK as the reference for a particularly good vendor support package, though. On the other hand, maybe there are no good vendor support packages and ESP32 is one of the least worst?
- elcritch 6y agoI've had similar experience with the ESP-IDF, with racey bugs in certain parts and broken i2c, etc. Though turns out most of those were due to their v4.1 branch being listed as stable (AFAICT) but it's actually pretty broken. Switched to v4.0 and everything works. Still it's open source and the dev's will respond to GitHub issues. Overall I'd say it's not too bad, or not so much worse than other chips. It seems every piece of embedded hardware will have quirks and the SDK's will have pain points. From what I gather and my limited experience, it's more a matter of how many and how severe. I prefer at least an open source SDK where it's possible to share patches with the broader community. From what I gather here and elsewhere the only other open source SDK's are for the Nordic chips. P.S. the esp32's ADC supposedly has terrible calibration issues.
- sgtnoodle 6y agoI used the ESP32 to build a two lead ECG SD logger with real time viewing over wifi. I randomly had to get a pacemaker this year, and it's been very useful to self-diagnose device issues (such as why my heart rate was jumping back and forth between 50bpm and 100bpm!) The pacemaker generates 350uS 2V "capture pulses", and they're very easy to detect coming out of an analog ECG amplifier front end. The ESP32 would completely miss maybe 1 out of every 5 capture pulses until I switched to I2S. Now it reliably samples every single pulse. The data coming out is good enough to see what I need to see; qualitatively how my heart is beating. When using software triggered ADC conversions via an 8Khz timer interrupt, the racey issue would occur periodically for several milliseconds at a time. The ADC would act as if its input was disconnected and floating. With a changing input signal, the samples would read as a nearly constant voltage and completely miss blips that were well within the Nyquist frequency. Switching to I2S/DMA seemed to work around that issue. Even with the ADC working reliably, the samples suffer from what I can only guess is horrendous differential non-linearity. The waveform really looks quite ugly, despite the ADC being driven by a very low impedance amplifier output. At least I can clean up the ECG plots with a low pass filter to make them pretty. The pacemaker pulse is a 350uS square wave, but the heart's natural impulses are significantly lower frequency.
- kps 6y agoThe author's article only covers ARM Cortex-M4 SDKs; its title is a little over-broad.
- Rebelgecko 6y agoAre you using the IDF directly or via something like PlatformIO? I've been using PIO a lot, but I wonder if there's advantages to just using the IDF on its own
- rahimiali 6y agoI’m invoking idf.py directly. I edit my code in vim.