Live data from Hacker News

Updating STM32 Over-The-Air using ESP32

github.com

31–40 of 63 posts

Re: Updating STM32 Over-The-Air using ESP32

#31

Earlier quoted context omitted.

Better support, documentation, and peripherals. The ESP32 datasheet is 62 pages. The STM32F4 datasheet is 1729 pages, and that's not counting the reference manuals. The ESP32 datasheet contains about 3 paragraphs about the ADC, which basically say that it has an accuracy of +/-6%, see example code for ways to calibrate it (which probably amounts to a linear interpolation between two sample counts with the pin pulled…

If you're throwing an ESP on there anywhere, wouldn't an I2C or SPI ADC be way cheaper than a whole nother MPU for the same performance?

Weirdly, no, a lot of the time.

It's $1 for an STM32F0 or $2.65 for an STM32F4 with a quantity of ten 12-bit 2.4 MSPS ADCs included, but a single-channel SOT23-5 ADC chip is also $1, and if you wanted 10 single-ended channels at 2 MSPS you're looking at $8 per device.

You typically don't use an off-chip ADC peripheral when most every MCU has a few channels of ADC on-board unless you've got special requirements (like sigma-delta high-resolution, simultaneous sampling, very high sample rate, etc), and those requirements cost money.

Re: Updating STM32 Over-The-Air using ESP32

#32

Earlier quoted context omitted.

It’s notoriously not a friendly or easy perform to develop for and despite its capabilities, the ESP32 has largely been relegated to daughterboard status in most embedded situations.

On RIOT we’ve put quite some work into implementing the peripheral APIs on the esp8266/esp32 just like on any other supported platform. So no matter if you are on stm32, esp* or ATmega, you can run the same code.

Would I be able to build something that leverages Bluetooth mesh functionality with RIOT and ESP32? Is this use-case supported well?

Re: Updating STM32 Over-The-Air using ESP32

#33

Or you can use an esp8266 module as a full debugger for the STM32: https://github.com/markrages/blackmagic/blob/esp8266/src/pla...

thanks for the link! I have some never used esp8266 laying around! I might try to use it for my stm32 tinkering! (I have a couple of discovery boards around as well)

Re: Updating STM32 Over-The-Air using ESP32

#35
post #20
post #16

Earlier quoted context omitted.

Just a basic board comparable to the ESP32 modules you can but for DIY stuff

I generally recommend going for the highest-spec board that suits your requirements. The STM32L4+, STM32L5, and STM32H7 are all amazing microcontrollers.

I'm playing with STM32 Cube IDE right now. I got surprised that it works well on Linux (ok, I did only basic stuff, but did not have any trouble setting it up).

However I was wondering what would be totally open source toolchain and development setup? That might be too advanced for me now (and I'm happy with graphical peripheral selection in ST tools), but would like to try it in the future

Re: Updating STM32 Over-The-Air using ESP32

#36
post #30

Earlier quoted context omitted.

Yes it's a shame. The hardware is quite capable for the price but the documentation is lacking, so one has to resort to reverse-engineering - which is totally ridiculous. Traditional MCU vendors have set quite a high standard to the quality and availability of documentation. I know good documentation takes effort, but the lack thereof is hampering the product. One can only hope that with Espressif trying to become mo…

A datasheet is a contract, not just documentation. If they put something on the datasheet, they need to write the document, then test the parameter, and guarantee that performance. If I receive 10k of a part that does not satisfy specified performance parameters, I will return the reels, and never design that manufacturer's parts into any future product.

Oh, surely they're not contracts. They're full of disclaimers like: "MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND [..], RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE."

And then they publish 50 pages errata including: "Ethernet functionality in 64-pin packages is not available."

...

Re: Updating STM32 Over-The-Air using ESP32

#37

Earlier quoted context omitted.

Yes, people don't realize how inadequate ESP32 is for commercial use. There are literally no commercial products that use ESP32 (or its older brother ESP8266) besides some chinese cheap toys on Amazon. There are packages out there that use ESP32 as a "augmentation" chip to do OTA with a main processor being STM32 or NXP. There are also major security flaws and silicon revisions made by ESP32 that makes the whole thin…

> There are literally no commercial products that use ESP32 (or its older brother ESP8266) besides some chinese cheap toys on Amazon. There are lots of commerical IoT devices that use the ESP chips (Shelly, Sonoff, Tuya e.g.).

And due to popularity of ESP in hobby circles, there are many good open-source firmwares for those devices, such as ESPurna with its very impressive feature set: https://github.com/xoseperez/espurna

The final product is better than almost any "professional" IoT device. I'd rather risk with higher odds of system failures (the Atom bug showed that not even Intel is safe) than suffer daily with slow, buggy, expensive, restricted and privacy-hostile cloud-connected trash from the likes of Logitech.

Re: Updating STM32 Over-The-Air using ESP32

#38
post #30

Earlier quoted context omitted.

A datasheet is a contract, not just documentation. If they put something on the datasheet, they need to write the document, then test the parameter, and guarantee that performance. If I receive 10k of a part that does not satisfy specified performance parameters, I will return the reels, and never design that manufacturer's parts into any future product.

Oh, surely they're not contracts. They're full of disclaimers like: "MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND [..], RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE." And then they publish 50 pages errata including: "Ethernet functionality in 64-pin packages is not available." ...

Well, I can tell you that if 5% of the parts on a reel are out of spec, that reel is being returned for a full refund. Everyone treats the datasheet as a contract, whatever the small print may say.

This is also why parts can often perform well above their specified performance levels, and often have undocumented functionality; the manufacturers are happy to design in this performance, but they refuse to test and guarantee it.

Re: Updating STM32 Over-The-Air using ESP32

#39

Earlier quoted context omitted.

If you're throwing an ESP on there anywhere, wouldn't an I2C or SPI ADC be way cheaper than a whole nother MPU for the same performance?

Weirdly, no, a lot of the time. It's $1 for an STM32F0 or $2.65 for an STM32F4 with a quantity of ten 12-bit 2.4 MSPS ADCs included, but a single-channel SOT23-5 ADC chip is also $1, and if you wanted 10 single-ended channels at 2 MSPS you're looking at $8 per device. You typically don't use an off-chip ADC peripheral when most every MCU has a few channels of ADC on-board unless you've got special requirements (like…

To be clear, there is a quantity of one ADC in the STM32F4, with a multiplexer in front. You could emulate this with an analog switch like 74HC4051, which costs pennies in quantity.

Re: Updating STM32 Over-The-Air using ESP32

#40

Earlier quoted context omitted.

Better support, documentation, and peripherals. The ESP32 datasheet is 62 pages. The STM32F4 datasheet is 1729 pages, and that's not counting the reference manuals. The ESP32 datasheet contains about 3 paragraphs about the ADC, which basically say that it has an accuracy of +/-6%, see example code for ways to calibrate it (which probably amounts to a linear interpolation between two sample counts with the pin pulled…

Yes, people don't realize how inadequate ESP32 is for commercial use. There are literally no commercial products that use ESP32 (or its older brother ESP8266) besides some chinese cheap toys on Amazon. There are packages out there that use ESP32 as a "augmentation" chip to do OTA with a main processor being STM32 or NXP. There are also major security flaws and silicon revisions made by ESP32 that makes the whole thin…

We use an esp32 commercially to provide a web interface (including doing OTA) to our chip. Works pretty decently.
Post reply on HN