2018-02-14 01:26 PM
Hello everybody
I am working on a design using STM8S103F2P6TR and will produce a big quantity of it so I am thinking to make another portable design using STM32F407VGT6 as a flasher to program the units after manufacturing without the need to connect it to a PC which take long time. So is there a way I can store the Hex data for
STM8S103F2P6TR into
STM32F407VGT6 embedded flash memory
or an external memory associated with STM32F407VGT6 in a portable small design and just connect this flasher device with the main design to program it. As I know STM8/32 MCUs use JTAG for flashing so do I need to implement the circuit for ST-link inside my flasher design or there is an easier way to flash the firmware to STM8S103F2P6TR
with STM32F407VGT6
?Thanks in advance.
2018-02-14 01:44 PM
The STM8 uses a SWIM protocol, you'd have to see what documentation is available about the protocol, or what ST is willing to share with you.
.HEX files aren't unduly efficient, you might want to consider an STM32F407 board with a MicroSD card as a convenient and generic way of supplying file data.
2018-02-14 01:50 PM
First of all, it is swim for stm8.
It is not difficult to design an on-the-go flasher. The simplest would be use stlink plus adapter.
Then you could look into bootloader's if your chip supports it.
Then Google production off-line programmers.
If all fails, get the swim programming manual and implement it yourself.
2018-02-14 02:06 PM
Hi,
You don't need to develop anything, as there is already a commercial product that does what you need. See the Flasher STM8 from Segger:
https://www.segger.com/products/production/flasher-st/models/flasher-stm8/
Regards,
Alex R.
2018-02-15 11:09 AM
Hi,
Note that you have to account for the time it takes you to do the flasher hardware design, the firmware development, handling debugging issues, etc. It might be more that the 700USD that you would pay for a device already build and tested.
Why can't you use a PC+STLink to program your units after manufacturing? Would they be deployed already in the field?
If they are still in your manufacturing office, or at your office, you also can have several PC + STLink in parallel, to do the programming.
Another possibility is to request your STM8 distributor to do the programming ahead of assembling the MCU on the final board. Arrow Electronics and others offer that service.
Take a look at this presentation from ST which list a number of companies that have solutions for STM8 flash programming
Regards,
Alex R.
2018-02-15 11:32 AM
I have no problem to use st-link programmer but I don't want to use a PC, is there a way I can connect ST-programmer to another MCU through USB to provide the firmware to my target MCU?
2018-02-15 11:46 AM
Hi Alex, I am looking for a design I can make 10pcs of it as a flasher, add some features and its cost around 20USD but this flasher costs 700USD for just one.
I have found this
https://sourceforge.net/p/stm32f100tostm8s105swimlibrary/wiki/Home/
talking about a library to implement SWIM, I am going to test it and hope it works but still this one just implement ST-Link and I still need a PC.2018-02-15 12:28 PM
Thanks Alex!
The point is after programming I want to store some other data on the flash memory of each MCU, this data defers based on some factors like each device ID and so on. So I want to do all that in one step or it will take long time to program each unit using a PC then connect it to my system to store some identification data.