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.

MSP430FR5989: Expected values for ESI registers and variables

Part Number: MSP430FR5989
Other Parts Discussed in Thread: TIDM-LC-WATERMTR

Hello,

I'm testing a device that uses an ESI module to read rotation disk from a watermeter. I'm not the author of the device. We have some problems with losing synchronization between the device and watermeter. I'm trying to investigate what is wrong.

I'm using slightly modified version of firmware from TIDM-LC-WATERMTR. Source code: https://ufile.io/ebqpz

Firstly, I had problems with the calibration, when Separation_factor was 4 then function Set_DAC completes without any rotation. After I changed factor to 20 I can calibrate DAC. However, in FlowESI there is a comment that specifies that the range should be 4-6 for this factor

The separation factor has an impact to the separation state value that is used by Set_DAC. The formula for separation state uses Noise_level and I think this is main problem.

In my scenario the Noise_level has values: 0, 1 or 2. When Noise_level is 0 - Set_DAC completes without rotation. When Noise_level is greater than 0 it looks like everything works - the flow is correctly counted.

So my main question is what is the expected value for Noise_level? How wide should the gap be beetwen ESIDAC1R0 and ESIDAC1R1?

I observed that gap in reference voltage hysteresis is small (2 or 4). Is it expected value?

Here is a dump from registers and variables after calibration: https://pastebin.com/PQyFJVCk

**Attention** This is a public forum