Skip to main content
Explorer
March 23, 2025
Solved

STM8S003 Trying to save 4 parms in EEROM.

  • March 23, 2025
  • 2 replies
  • 484 views

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

    This topic has been closed for replies.
    Best answer by Peter BENSCH

    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

    2 replies

    Technical Moderator
    March 24, 2025

    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

    Explorer
    March 29, 2025

    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.