It needs a ESP8266 board. Source-Code and Usage at https://github.com/csnol/STM32-OTA
———add on 22 DEC 2017————-
———————————————-
Because It’s a Arduino sketch of ESP8266, So I don’t know how to PR to STM32-Arduino and STM32GENERIC.
Tested on STM32F0, STM32F103C/R boards.

-> For STM32-Arduino repo https://github.com/rogerclarkmelbourne/Arduino_STM32

-> For STM32GENERIC repo https://github.com/danieleff/STM32GENERIC

and It can be used for stm32duino https://github.com/stm32duino/Arduino_Core_STM32 but I’ve not the official boards to test.
One more thing, If you use it, you have to keep below webserver codes in your sketch for sharing.
Version 1.0 by <a style=\"color:white\" href=\"https://github.com/csnol/STM32-OTA\">CSNOL
The last few weeks I played with the NodeMCU and different programming languages like MikroPython.
It would be very good if the BluePill could be programmed with the NodeMCU and afterwards the NodeMcu could be used as interface controller to the web.
[stevestrong – Wed Dec 20, 2017 10:20 am] –
Will this work under Windows?
Not yet.
Up to now, only support Linux and MacOS.
This use-case seems overly complex.
Why not just use an ESP32 board? More SRAM, more flash, faster clock, 2 cores… less power intensive overall and still programmable under the ArduinoIDE.
Andreas shows how to OTA the ESP32 here
I just picked one quickly … you may find it less expensive with some time investment.
https://www.aliexpress.com/item/ESP-32S … 38651.html
Adafruit carries a small collection, at a premium price: https://www.adafruit.com/?q=ESP32
Ray
[mrburnette – Wed Dec 20, 2017 1:26 pm] –
Why?This use-case seems overly complex.
Why not just use an ESP32 board? More SRAM, more flash, faster clock, 2 cores… less power intensive overall and still programmable under the ArduinoIDE.
Andreas shows how to OTA the ESP32 here
………..
Yes , ESP32 is better than ESP8266/8285.
but this topic is not focus on ESP chips. I can’t sure if you’ve got my topic.
I just wanna sharing a new way to flash STM32 chips without wires. (it is useful for the chip be sealed in a BOX or other place can’t gotten)
Thanks anyway.
CS. Nol
[csnol – Wed Dec 20, 2017 1:57 pm] –
<…>
Yes , ESP32 is better than ESP8266/8285.
but this topic is not focus on ESP chips. I can’t sure if you’ve got my topic.
I just wanna sharing a new way to flash STM32 chips without wires. (it is useful for the chip be sealed in a BOX or other place can’t gotten)Thanks anyway.
CS. Nol
Yes, I got the topic and understand the “new way” you suggested. Years ago, we had Bluetooth upload of Arduino AVR devices. It clever and with the right use-case may be worth the two uC requirement and additional power requirement.
But my “why” was more to the “scenario” where this would be used. Clearly, it is not well suited for a battery operated device since the ESP8266 is not known to be power friendly. Maybe a solar application where the solar cell and battery provide more power than the STM32duino needs. Maybe a permanent AC powered unit stuck in the attic or basement where access to upgrade the firmware is awkward.
My questioning is not about the technology implementation but more about is the implementation actually useful – and if so, what would those use cases be? My point on the ESP32 is that it is inexpensive enough and powerful enough to perform both roles, replacing the ESP8266 and the STM32Fxxx.
So, where would this dual uC contraption be utilized to make for a good engineering solution?
Ray
[mrburnette – Wed Dec 20, 2017 2:20 pm] –
ESP8266 is not known to be power friendly.
Totally agree with this. Thanks.
[ag123 – Wed Dec 20, 2017 3:46 pm] –
hopefully one day st would bother to have an soc with an integrated 2.4ghz radio with stm32, preferably s/w configurable to do BT LE or WIFI![]()
Seems that their future focus do cover you wants but perhaps not in the manner you wish:
http://www.st.com/en/wireless-connectivity.html
and more specifically:
http://www.st.com/en/wireless-connectiv … tId=SC1930
Ray
http://www.st.com/content/st_com/en/pro … nrg-2.html
the wireless competition is certainly heating up
unfortunately that evaluation board is tad bulky (compared to maple mini / blue pills) & cost a whopping 70 bucks
http://www.st.com/content/st_com/en/pro … 008v1.html
![]()
[ag123 – Wed Dec 20, 2017 4:06 pm] –
<…>
unfortunately that evaluation board is tad bulky (compared to maple mini / blue pills) & cost a whopping 70 bucks
<…>
Domestic beer = $2.50
$70 / $2.50 = 28 beers
So, is jumping on the next wave of evolving technology worth the price of 28 beers? Everything in the world comes down to fundamental decision making ![]()
by mrburnette »
This use-case seems overly complex.
Why not just use an ESP32 board? More SRAM, more flash, faster clock, 2 cores… less power intensive overall and still
There could be a use case: The Bluepill has more Pins than an ESP32. There are a lot off drivers for the BluePill, I think more than for the ESP32.
There might be a scenario where you only power up the ESP8266 for programming and later on power only the BluePill to save power.
The next thing: You can have a really independent real time system with the STM and a web server with the PluePill.
The next question: how well does the ESP32 ADC compare to the BluePill ADC ?
To save cost it could be useful to use a 6 pin ESP8266 instead of more expensive NodeMcu.
The difference is in the mind. Not in a chip.
I haven’t found this function in internet, so share it. don’t care if useful or useless.
In fact, My plan is for a simple Open-source Iot project use a less 32pin STM32 chip and a ESP8285 on 15mm * 40mm board.
BR.
CS . Nol
I’m curious about the ESP+STM32 board, post some pics if you don’t mind.
[stevestrong – Thu Dec 21, 2017 10:20 am] –
I moved the topic to “Projects”, I personally find it useful, so thanks, @csnol.
Thank you. I defined it is a tools.
BTW, If you wanna use it in Windows. you can upload the bin file to flash STM32 chip at http://192.168.x.66 on web-browse. or write a bat file.
I almost never use Win10.
[moc – Thu Dec 21, 2017 10:34 am] –
This is a great function mate!
I’m curious about the ESP+STM32 board, post some pics if you don’t mind.
It is only in my mind now. I just finished 1st step.
ESP8285: https://github.com/csnol/STM32-OTA/blob … sp8285.jpg
I am not opposed to the implementation, per se, but as an engineer I find that putting a context around such an implementation helpful.
A battery powered implementation where the STM32 turns on/off the ESP8266 periodically for firmware updating is interesting, but either of Espressif’s offerings can turn on/off the RF section and may be satisfactory in a solo arrangement. More on the timing of the on/off toward the end.
ADC? The ESP devices are 1.0 Volt AD referenced. That could impact some flexibility.
The ADC driver API currently only supports ADC1 (9 channels, attached to GPIOs 32-39).
The combined current of the ESP8266 + STM32F1xx exceeds that of the ESP32 and exceeds that of a rPi_Zero_W (configured headless.)
It seems I annoyed a few forum members … I’m pretty good at doing that – no offense was meant, just seeking answers to questions that popped into my head. Part of any good initial design is to take a need, implement a prototype, and then evolve that prototype. In my mind, a bit more evolving needs to be completed, but the presented project is a good prototype.
Just thinking: Turning the ESP8266 on/off to conserve battery power will take a bit of designing since RTC drift could impact the update schedule unless the on-time was rather long which impacts the battery performance. Once the update server was identified, the RTC could be synced. However, the addition of a precision RTC is likely the better option.
I will be interesting to see how (if) this evolves over time and also interested to learn of specific use cases where the tandem uC solution cannot be bettered by another less complex approach.
Ray
[ropa – Tue Jan 16, 2018 1:20 pm] –
Very Good, if you can automatically download the firmware via HTTP server.
Thanks.
It’s based on ESP8266 HTTP server. sorry I can’t get your means about “automatically download” you said because of my English.
If you only wanna upload a bin file to STM32.
Usage at my last version:
https://github.com/csnol/1CHIP-Programmers
[ropa – Fri Jan 26, 2018 5:00 am] –
Thank you for your reply,I didn’t make myself clear,I want to be like https://arduino-esp8266.readthedocs.io/ … ttp-server
OK, I got it. in fact, that way is 1st idea in my head when I wanna code it. but it’s not good enough for me and not easy for me
. The ESP8266 IP port has to selected in Port menu once you power on ESP again or reopen Arduino IDE. and this OTA version just do something when you 1st time use this function. don’t care which is the port later anymore. just click upload button is all.
Thanks and BR.
CS. Nol
very beautiful solution indeed, I need t have stm32 bin file uploaded over the air with esp32s, in the same time keep running daq for some pins within the the esp32, do you have a wiring diagram showing the right connections, also looking to have the esp32 firmware updated with the same concept,
also looking to have a modbus working between the stm32 and esp32 and view data on ili9341 with encoder/menus, am looking for a freelancer interested if so kindly contact me. regards.
[minime – Mon Jun 25, 2018 12:47 am] –
csnolvery beautiful solution indeed, I need t have stm32 bin file uploaded over the air with esp32s, in the same time keep running daq for some pins within the the esp32, do you have a wiring diagram showing the right connections, also looking to have the esp32 firmware updated with the same concept,
also looking to have a modbus working between the stm32 and esp32 and view data on ili9341 with encoder/menus, am looking for a freelancer interested if so kindly contact me. regards.
ohh longtime not login. Sorry I’ve to focus on local chips of China. ARMlinux make me crazy.
Just like Mr.Ray said . Esp32s is 2 cores more quickly more Pins and WiFi BTLE double wireless protocols module.
You can use 1 core to updated stm32 and other core to DAQ informations. Just connect its GPIOs to stm32’s RX TX RESET BOOT0 pins. It’s easy to coding to esp32 from esp8266.
But I can’t do this for you. It’s my hobby not business.
Don’t suggest use the codes in business projects.
BTW, A piece of ESP32 is good enough to manage all LCD encoder and DAQ functions. What for do you use STM32?
i am building custom daq with dual redundancy to compare the results hopefully as also GOD bless china too may send me a working pcb board this time.
esp32 can not handle many encoders with interrupts and I just luv turning more knobs without limits not the pathetic pots unless you found away to manage more encoders with intrrupts using esp32.
thank you for your reply i will check your input how to connect it and hopefully it works sooner or later in a way or another in this life time.
btw when i said i am looking for a freelancer i meant I really really reaaaaalllly pay very very well for creative solutions from beautiful minds on earth but sadly very very extremely few very rarely few were able to provide more than just words.


