cancel
Showing results for 
Search instead for 
Did you mean: 

STM8S003 Trying to save 4 parms in EEROM.

CustomSarge
Associate III

Need to IAP save two 16(10) bit ADC values to EEROM. Done parm saves before in STM8S105, but want to see it in ICP mode.

In NXP MC9S08, I can turn off download, which cleared Its EEROM. That let me run the ADC "learn" of the values, save them to EEROM, then power cycle and see them retained.

I'm thinking running debug without download will be the same, but I can't find it.

SO, I want to test "stuff" two values to EEROM, power down / up, invoke Debug (ICP) and see them preserved.

Trusting IAP to get/save values without verifying doesn't sit well. Like Reagan: Engineers don't Trust - they Verify!

Deeply appreciate my "betters", everybody old enough has been on BOTH sides of this!!  Thanks, Kevin

1 ACCEPTED SOLUTION

Accepted Solutions
Peter BENSCH
ST Employee

You can at least use the register MASS (Memory Access Security System) to protect the contents of the EEPROM; deletion/modification is then only possible after access has been enabled. Details can be found in PM0051, section 3.3.

Hope that helps?

Regards
/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

2 REPLIES 2
Peter BENSCH
ST Employee

You can at least use the register MASS (Memory Access Security System) to protect the contents of the EEPROM; deletion/modification is then only possible after access has been enabled. Details can be found in PM0051, section 3.3.

Hope that helps?

Regards
/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
CustomSarge
Associate III

Given it's assembler, I was expecting immediate response from the EEROM system - NOPE.

I stumbled into the answer (as usual) - issue the unlock keys then loop until status bit changes.

Once lock bit is set, Wait to exit debugger and power cycle it. No valid reason, sometimes it just is.