This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430FR5889: Scanif how to pass without recalibration after restart

Part Number: MSP430FR5889


I have a simple and difficult problem. I based on LC Sensor Rotation Detection With MSP430TM Extended
Scan Interface (ESI) - SLAA639 – July 2014.

Calibration and recalibration seem to works well. My question is do it possible to somehow store calibration (TSM states and others scanif elements) parameters into FRAM and use them after MSP hardware restart. It is some chance to go to measurement immediately after restarting without calibration process again. I ask because I have a bootloader to update the firmware remotely (through the 3g modem) so after firmware finish restart is needed to load new code but it can be very problematic to make calibration again.

Can someone help me with my problem?


  • Hi Michal,

    I believe you should be able to save these parameters after you run the first calibration routine. I would save the data into FRAM after the calibration, and then alter the code to write to the appropriate registers on start up.

    I have a question:
    What kind of environment is your system in? If there are any environmental changes (temperature, humidity, moving the unit, etc) there is a risk that the real time readings will drift out of the previously calibrated range. In this case, recalibrating the system will be necessary.


  • Hi Mitch,

    The problem is that I don't know which parameters should be stored. I have the same circuit like in documentation I mention in my post, LC - watermeter. I take to account periodical recalibration using AFE2.

    Can You please share with me which one should be stored.


  • Hey Michal,

    I am looking further into this and will provide more information as soon as possible.


  • Hi Mitch,

    first thanks for participation. I think I found a solution. After proper calibration finish, I read and store following registers

      scanifcfg.ESIAFE_value = ESIAFE;
      scanifcfg.ESITSM_value = ESITSM;
      scanifcfg.ESIPSM_value = ESIPSM;
      scanifcfg.ESIOSC_value = ESIOSC;
      scanifcfg.ESICTL_value = ESICTL;
      scanifcfg.ESIDAC1R0_value = ESIDAC1R0;
      scanifcfg.ESIDAC1R1_value = ESIDAC1R1;
      scanifcfg.ESIDAC1R2_value = ESIDAC1R2;
      scanifcfg.ESIDAC1R3_value = ESIDAC1R3;
      scanifcfg.ESIDAC2R0_value = ESIDAC2R0;
      scanifcfg.ESIDAC2R1_value = ESIDAC2R1;
      scanifcfg.ESIDAC2R2_value = ESIDAC2R2;
      scanifcfg.ESIDAC2R3_value = ESIDAC2R3;
      scanifcfg.ESIINT2_value = ESIINT2;

    After the reset, I just update above registers and set some flags of course. Scanif working normally after that operation. Please confirm me if I'm right.

  • Hey Michal,

    What you're showing is in line with what I've found as well. I am attaching a picture of the ESI registers from the user's guide. It looks like you may not have to store the ESIDAC1, ESIDAC2, and ESITSM registers (see highlighted in picture) since they are "unchanged" in reset.

    Since these registers are "unchanged" on reset, they will retain their value after a reset. You can of course still save these in memory just to be safe. If you have any issues, I would suggest looking at the other read/write registers in the table.

    Here is a link to the user's guide for reference:

    Please let me know if you need anything else!


  • Hi Mitch,

    thanks for the very comprehensive answer. Yes, You right there is no need to update mentioned register, I also check it during debug. Such kind of settings allows to proper work of scanif interface. I have a two another questions about the scanif interface (AFE2 recalibration) but I think I going to create a new thread.

    Once again many thanks