Hello,
I am using Flasher STM8 in production and it is working quite well. Biggest mcu is STM8L151C8 with 64kb and it takes about 6.4s for program & verify without erase (USB) which is quite close to 11.3kB as it says online.
As I program >100k mcus/year I would like to improve this speed. I think with checking my setup I could increase the speed to the 11.3kB but my wish would of course be to make it even faster.
After analysing the SWIM flashing algorithm I wonder where the bottleneck is.
According to datasheet programming a page size of 128 bytes will be typ. 3ms -> so 512 pages for 64kb-> 1.536 seconds for programming (no erase).
Transfer via SWIM in high speed mode could be aproximately 130kb/sec (16Mhz HSI, 10 Clocks/bit, aproximatly 12bits per Byte for writing a page on the fly -> 16meg/10/12=~133kbyte) -> ~0,5 seconds for a full memory transfer + another 0,5 for verify = 1 second.
So overall programming time for 64kb could - in theory be - ~1.5s + 1s = ~2.5 seconds. USB-transfer time to Flasher STM8 will add to this value but it is quite still a gap to my measured 6.4seconds.
Where is this difference coming from? If I remember right, there was quite a delay necessary between the SWIM commands or is it something else?
Best regards & thanks in advance,
Alexander T.
I am using Flasher STM8 in production and it is working quite well. Biggest mcu is STM8L151C8 with 64kb and it takes about 6.4s for program & verify without erase (USB) which is quite close to 11.3kB as it says online.
As I program >100k mcus/year I would like to improve this speed. I think with checking my setup I could increase the speed to the 11.3kB but my wish would of course be to make it even faster.
After analysing the SWIM flashing algorithm I wonder where the bottleneck is.
According to datasheet programming a page size of 128 bytes will be typ. 3ms -> so 512 pages for 64kb-> 1.536 seconds for programming (no erase).
Transfer via SWIM in high speed mode could be aproximately 130kb/sec (16Mhz HSI, 10 Clocks/bit, aproximatly 12bits per Byte for writing a page on the fly -> 16meg/10/12=~133kbyte) -> ~0,5 seconds for a full memory transfer + another 0,5 for verify = 1 second.
So overall programming time for 64kb could - in theory be - ~1.5s + 1s = ~2.5 seconds. USB-transfer time to Flasher STM8 will add to this value but it is quite still a gap to my measured 6.4seconds.
Where is this difference coming from? If I remember right, there was quite a delay necessary between the SWIM commands or is it something else?
Best regards & thanks in advance,
Alexander T.