Author Topic: STM8S003 flash endurance  (Read 1412 times)

0 Members and 1 Guest are viewing this topic.

Offline HwAoRrDkTopic starter

  • Super Contributor
  • ***
  • Posts: 1480
  • Country: gb
STM8S003 flash endurance
« on: August 20, 2022, 11:21:43 am »
I have a project where I plan to use an STM8S003. But, a potential problem with that from a development point of view is the low flash endurance of only 100 (yes, one hundred) writes stated in the datasheet.

I am concerned that this is going to be a problem during development - too many re-flashes wearing out the memory. Is this a realistic concern? Am I worrying too much about something that's unlikely to be a problem in reality?

Yes, I know the datasheet figure is a minimum guarantee for the specified operating conditions, and it could be greater. But by how much? 101, 1000? Knowing my luck I get a chip that starts corrupting data at only a few dozen writes over the mark.

Now, the STM8S103 is essentially an identical pin-compatible drop-in substitute (but with more EEPROM and a unique ID register) that has 100,000 writes flash endurance that I could use for development prototypes, but these are for some reason much harder to find at the moment. Stocks are intermittent and the price is 4x or more of the '003 chips.
 

Offline wek

  • Frequent Contributor
  • **
  • Posts: 495
  • Country: sk
Re: STM8S003 flash endurance
« Reply #1 on: August 20, 2022, 12:31:17 pm »
> Yes, I know the datasheet figure is a minimum guarantee for the specified operating conditions, and it could be greater. But by how much? 101, 1000?

Endurance and retention go hand in hand, temperature is their sister and statistics is their mother. The physical reason for ("lack" of) endurance is damage to the memory transistor's oxide through which electrons are "shot" during programming. The consequence is leakage, i.e. the memory cell tends to forget its state. and this gets worse by increasing temperature (exponentially).

Note, that the 100 cycle endurance is given for 20 years of retention at 55deg.C. This means roughly that if you subject the mcu to 100 erase/program cycles and then keep it 20 years at 55deg.C, the probability of failure is still low enough so that only a few devices will fail. Note, that these devices are used in products which are sold in millions, and nobody wants to see them starting to return in large volumes within several years.

Also note, that the EEPROM in the same chip has quoted 10k cycles endurance for 20y retention, and 100k for 1y retention (the latter even at elevated temperature to 85deg.C).

In other words, if you'll keep your device at room temperature and won't require retentions beyond a few days, 1000 cycles is absolutely OK and 10k cycles is probably fine, too.

JW
 

Offline HwAoRrDkTopic starter

  • Super Contributor
  • ***
  • Posts: 1480
  • Country: gb
Re: STM8S003 flash endurance
« Reply #2 on: August 20, 2022, 04:46:39 pm »
Note, that the 100 cycle endurance is given for 20 years of retention at 55deg.C. This means roughly that if you subject the mcu to 100 erase/program cycles and then keep it 20 years at 55deg.C, the probability of failure is still low enough so that only a few devices will fail.

Hmm, true I had kind of overlooked the condition on the 100 cycles was for retention over that period in those conditions. But we're just guessing as to how the failures curve looks for shorter time periods in less harsh conditions. Could be logarithmic, could be linear, we don't know.

In other words, if you'll keep your device at room temperature and won't require retentions beyond a few days, 1000 cycles is absolutely OK and 10k cycles is probably fine, too.

So you think I should not worry about it, and just do development on the '003 and forget about trying to get some '103?
 

Offline wek

  • Frequent Contributor
  • **
  • Posts: 495
  • Country: sk
Re: STM8S003 flash endurance
« Reply #3 on: August 20, 2022, 07:10:34 pm »
> But we're just guessing

Indeed. Did you expect ST to chime in with hard data?

And guess what: they're guessing, too. Or do you expect them conducting a 20 year experiment? ;-)

But it's true that I have no firm data.

I once performed an experiment - with different mcu, different conditions, so completely irrelevant to this case. The nominally 100k endurance EEPROM leaked after cca 8M cycles so badly that it could not hold value until readback after a few us, and heating it up by touching the chip by finger changed the readback value significantly :-) So yes, in that case obviously there wasn't a 2 orders of magnitude reserve.

> So you think I should not worry about it, and just do development on the '003 and forget about trying to get some '103?

Let's put it in this way: how many times you expect to overwrite the FLASH? How big a program fits into the 'S003? Let's say, a dozen of features, each requiring say a dozen of rewrites; and then another dozen of bugs times a dozen of rewrites? That's 288. I don't think you should be very concerned.

Meantime, why not trying to get the 'S103, through moderate means. You need how much, and how expensive that is? Is this the very last project you're going to do with the STM8s?

JW
 

Offline Alti

  • Frequent Contributor
  • **
  • Posts: 404
  • Country: 00
Re: STM8S003 flash endurance
« Reply #4 on: August 21, 2022, 12:08:25 am »
I think you should not do a development on a final target, first place. It does not make sense since you need 2x or 3x that much memory to run development firmware with all the checks, buffers and -g optimization.
 

Offline PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 1548
  • Country: au
Re: STM8S003 flash endurance
« Reply #5 on: August 21, 2022, 10:17:40 am »
So you think I should not worry about it, and just do development on the '003 and forget about trying to get some '103?

You can do both :)
Why not have some spare '003 and keep an eye open for flash failures, and if you suspect an issue, swap in a new one to check.
Relative to development costs, MCUs prices are in the noise floor.

You can also get some '103 on longer lead times, to qualify code on.

There are also many vendors offering '003 pinout alternatives, tho if you are coding in ASM porting to those would be more work.
 

Offline wek

  • Frequent Contributor
  • **
  • Posts: 495
  • Country: sk
Re: STM8S003 flash endurance
« Reply #6 on: August 21, 2022, 12:15:59 pm »
There are also many vendors offering '003 pinout alternatives
Can you please elaborate, perhaps in a new thread?

Thanks,

JW
 

Offline PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 1548
  • Country: au
Re: STM8S003 flash endurance
« Reply #7 on: August 21, 2022, 11:00:14 pm »
There are also many vendors offering '003 pinout alternatives
Can you please elaborate, perhaps in a new thread?


If you go to LCSC and search for '003' in Microcontrollers, that's now a common suffix for TSSOP20 'pin compatible' parts. (at least  VSS and VDD are on pins 7 and 9, often VCAP is another port pin )

eg  8051 cores
X003
N76E003
SC9xFx003
HC89S003
OB38S003W20EP
RJM8L003F6P6R   32kF  4kRAM  16bit multiplication and division and 32/16bit division   see https://www.runjetic.com/product/769.html
ES7P003
OB38S003,OB38S013,OB38S023,OB38S033

and some parts have less obvious compatible names
eg Nuvoton MS51FB9AE


and some are showing with a M0 core

PY32F003F
APT32S003F8PT
CW32F003x3/x4
APM32F003F6P6
MM32F003TW

An example table is here
https://sinomicon.com/about/newsDetail/3

« Last Edit: August 22, 2022, 04:42:29 am by PCB.Wiz »
 
The following users thanked this post: wek

Offline wek

  • Frequent Contributor
  • **
  • Posts: 495
  • Country: sk
Re: STM8S003 flash endurance
« Reply #8 on: August 22, 2022, 06:40:42 am »
Thanks. Didn't occur to me that the STM8 may be *that* popular to define a defacto standard... Good to know that there is at least one solid brand replacement among the Chinese smaller-village-made stuff.

Sorry for hijacking the thread, this is over.

JW
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf